source:
npl/system/netkit-ftp/patches/32-netkit-ftp-0.17-getlogin.patch
Last change on this file was c5c522c, checked in by , 8 years ago | |
---|---|
|
|
File size: 1.1 KB |
-
netkit-ftp-0.
old new dologin(const char *host) 328 328 return(0); 329 329 } 330 330 while (luser == NULL) { 331 char *myname = getlogin();331 char *myname = NULL; 332 332 333 if (myname == NULL) { 334 struct passwd *pp = getpwuid(getuid()); 333 struct passwd *pp = getpwuid(getuid()); 335 334 336 if (pp != NULL) 337 myname = pp->pw_name; 338 } 335 if (pp != NULL) 336 myname = pp->pw_name; 339 337 if (myname) 340 338 printf("Name (%s:%s): ", host, myname); 341 339 else -
netkit-ftp-0.
old new main(volatile int argc, char **volatile 204 204 /* 205 205 * Set up the home directory in case we're globbing. 206 206 */ 207 cp = getlogin(); 208 if (cp != NULL) { 209 pw = getpwnam(cp); 210 } 211 if (pw == NULL) 212 pw = getpwuid(getuid()); 207 pw = getpwuid(getuid()); 213 208 if (pw != NULL) { 214 209 strncpy(homedir, pw->pw_dir, sizeof(homedir)); 215 210 homedir[sizeof(homedir)-1] = 0;
Note: See TracBrowser
for help on using the repository browser.