From d550c631e90f50dd1bd567a967ae864463e9d6e4 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Sun, 5 May 1996 04:39:12 +0000 Subject: [PATCH] Do not use getlogin, it's different (and/or broken) on AIX Removed external variable `sp' git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@495 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/ftp/ftp/main.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/appl/ftp/ftp/main.c b/appl/ftp/ftp/main.c index 0da90fb8f..c0b170c14 100644 --- a/appl/ftp/ftp/main.c +++ b/appl/ftp/ftp/main.c @@ -43,6 +43,7 @@ main(int argc, char **argv) int ch, top; struct passwd *pw = NULL; char *cp, homedir[MAXPATHLEN]; + struct servent *sp; sp = getservbyname("ftp", "tcp"); if (sp == 0) @@ -98,12 +99,7 @@ main(int argc, char **argv) /* * Set up the home directory in case we're globbing. */ - cp = getlogin(); - if (cp != NULL) { - pw = getpwnam(cp); - } - if (pw == NULL) - pw = getpwuid(getuid()); + pw = getpwuid(getuid()); if (pw != NULL) { home = homedir; (void) strcpy(home, pw->pw_dir);