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:
Assar Westerlund
1996-05-05 04:39:12 +00:00
parent 9ee4b90dd8
commit d550c631e9

View File

@@ -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,11 +99,6 @@ 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());
if (pw != NULL) {
home = homedir;