[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.6 and 1.7

version 1.6, 2000/04/26 21:28:31 version 1.7, 2000/05/17 21:37:24
Line 45 
Line 45 
 {  {
         struct stat st;          struct stat st;
         struct group *grp;          struct group *grp;
           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... */
         if (!pw)          if (!pw)
                 return 0;                  return 0;
   
           /*
            * Get the shell from the password data.  An empty shell field is
            * legal, and means /bin/sh.
            */
           shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell;
   
         /* deny if shell does not exists or is not executable */          /* deny if shell does not exists or is not executable */
         if (stat(pw->pw_shell, &st) != 0)          if (stat(shell, &st) != 0)
                 return 0;                  return 0;
         if (!((st.st_mode & S_IFREG) && (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP))))          if (!((st.st_mode & S_IFREG) && (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP))))
                 return 0;                  return 0;

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7