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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user