summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1995-05-22 11:03:55 +0000
committerDavid Greenman <dg@FreeBSD.org>1995-05-22 11:03:55 +0000
commit956455631cc48e19327b53f79cbd43f02ec2cfa8 (patch)
treee0bce3ddcb38be3778778bd21f29bdd84a440f60 /libexec
parent82c76939c1b5010bf28fb251c15853712e94cb40 (diff)
Notes
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ftpd/ftpd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 79c20f163fe7..885166cfbc05 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -29,6 +29,8 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * $Id$
*/
#ifndef lint
@@ -632,7 +634,8 @@ pass(passwd)
/*
* Set home directory so that use of ~ (tilde) works correctly.
*/
- setenv("HOME", getcwd(homedir, MAXPATHLEN), 1);
+ if (getcwd(homedir, MAXPATHLEN) != NULL)
+ setenv("HOME", homedir, 1);
/*
* Display a login message, if it exists.