[BACK]Return to auth.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/auth.c between version 1.20 and 1.21

version 1.20, 2001/03/17 17:27:59 version 1.21, 2001/03/19 17:07:23
Line 50 
Line 50 
 allowed_user(struct passwd * pw)  allowed_user(struct passwd * pw)
 {  {
         struct stat st;          struct stat st;
         char *shell, *cp;          char *shell;
         int i;          int i;
   
         /* Shouldn't be called if pw is NULL, but better safe than sorry... */          /* Shouldn't be called if pw is NULL, but better safe than sorry... */
Line 62 
Line 62 
          * legal, and means /bin/sh.           * legal, and means /bin/sh.
          */           */
         shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell;          shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell;
   
         /* disallow anyone who does not have a standard shell */  
         setusershell();  
         while ((cp = getusershell()) != NULL)  
                 if (strcmp(cp, shell) == 0)  
                         break;  
         endusershell();  
         if (cp == NULL)  
                 return 0;  
   
         /* deny if shell does not exists or is not executable */          /* deny if shell does not exists or is not executable */
         if (stat(shell, &st) != 0)          if (stat(shell, &st) != 0)

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21