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

Diff for /src/usr.bin/sudo/Attic/getspwuid.c between version 1.5 and 1.6

version 1.5, 2002/01/03 03:49:16 version 1.6, 2002/01/16 18:09:13
Line 84 
Line 84 
 #include "sudo.h"  #include "sudo.h"
   
 #ifndef lint  #ifndef lint
 static const char rcsid[] = "$Sudo: getspwuid.c,v 1.61 2001/12/14 19:52:47 millert Exp $";  static const char rcsid[] = "$Sudo: getspwuid.c,v 1.62 2002/01/15 23:43:59 millert Exp $";
 #endif /* lint */  #endif /* lint */
   
 /*  /*
Line 98 
Line 98 
 /*  /*
  * Local functions not visible outside getspwuid.c   * Local functions not visible outside getspwuid.c
  */   */
 static char *sudo_getshell              __P((struct passwd *));  
 static struct passwd *sudo_pwdup        __P((struct passwd *));  static struct passwd *sudo_pwdup        __P((struct passwd *));
   
   
 /*  /*
  * Return the user's shell based on either the SHELL environment variable  
  * (already assigned to user_shell) or, failing that, the passwd(5) entry.  
  */  
 static char *  
 sudo_getshell(pw)  
     struct passwd *pw;  
 {  
     char *pw_shell;  
   
     if ((pw_shell = user_shell) == NULL)  
         pw_shell = pw->pw_shell;  
   
     /* empty string "" means bourne shell */  
     if (*pw_shell == '\0')  
         pw_shell = _PATH_BSHELL;  
   
     return(pw_shell);  
 }  
   
 /*  
  * Return a copy of the encrypted password for the user described by pw.   * Return a copy of the encrypted password for the user described by pw.
  * If shadow passwords are in use, look in the shadow file.   * If shadow passwords are in use, look in the shadow file.
  */   */
Line 236 
Line 215 
     local_pw->pw_class = estrdup(pw->pw_class);      local_pw->pw_class = estrdup(pw->pw_class);
 #endif  #endif
   
     /* pw_shell is a special case since we overide with $SHELL */      /* If shell field is empty, expand to _PATH_BSHELL. */
     local_pw->pw_shell = estrdup(sudo_getshell(pw));      if (local_pw->pw_shell[0] == '\0')
           local_pw->pw_shell = _PATH_BSHELL;
       else
           local_pw->pw_shell = estrdup(pw->pw_shell);
   
     /* pw_passwd gets a shadow password if applicable */      /* pw_passwd gets a shadow password if applicable */
     local_pw->pw_passwd = sudo_getepw(pw);      local_pw->pw_passwd = sudo_getepw(pw);

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