FTPD refuses to let /bin/sh users log in; bug report 4.3BSD/etc/19
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 19 Nov 1986 12:44:27 +0000 (04:44 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 19 Nov 1986 12:44:27 +0000 (04:44 -0800)
SCCS-vsn: libexec/ftpd/ftpd.c 5.8

usr/src/libexec/ftpd/ftpd.c

index 5ca76ba..f904209 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)ftpd.c     5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)ftpd.c     5.8 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -942,10 +942,11 @@ checkuser(name)
        pw = getpwnam(name);
        if (pw == NULL)
                return (0);
        pw = getpwnam(name);
        if (pw == NULL)
                return (0);
+       if (pw ->pw_shell == NULL || pw->pw_shell[0] == NULL)
+               pw->pw_shell = "/bin/sh";
        while ((cp = getusershell()) != NULL)
                if (strcmp(cp, pw->pw_shell) == 0)
                        break;
        while ((cp = getusershell()) != NULL)
                if (strcmp(cp, pw->pw_shell) == 0)
                        break;
-       endpwent();
        endusershell();
        if (cp == NULL)
                return (0);
        endusershell();
        if (cp == NULL)
                return (0);