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

Diff for /src/usr.bin/su/su.c between version 1.8 and 1.9

version 1.8, 1996/10/12 20:40:37 version 1.9, 1996/10/16 00:37:11
Line 87 
Line 87 
         register struct passwd *pwd;          register struct passwd *pwd;
         register char *p, **g;          register char *p, **g;
         struct group *gr;          struct group *gr;
         uid_t ruid, getuid();          uid_t ruid;
         int asme, ch, asthem, fastlogin, prio;          int asme, ch, asthem, fastlogin, prio;
         enum { UNSET, YES, NO } iscsh = UNSET;          enum { UNSET, YES, NO } iscsh = UNSET;
         char *user, *shell, *avshell, *username, *cleanenv[10], **np;          char *user, *shell, *avshell, *username, *cleanenv[10], **np;
Line 137 
Line 137 
                 pwd = getpwuid(ruid);                  pwd = getpwuid(ruid);
         if (pwd == NULL)          if (pwd == NULL)
                 errx(1, "who are you?");                  errx(1, "who are you?");
         username = strdup(pwd->pw_name);          if ((username = strdup(pwd->pw_name)) == NULL)
                   err(1, "can't allocate memory");
         if (asme)          if (asme)
                 if (pwd->pw_shell && *pwd->pw_shell)                  if (pwd->pw_shell && *pwd->pw_shell)
                         shell = strcpy(shellbuf,  pwd->pw_shell);                          shell = strcpy(shellbuf, pwd->pw_shell);
                 else {                  else {
                         shell = _PATH_BSHELL;                          shell = _PATH_BSHELL;
                         iscsh = NO;                          iscsh = NO;
Line 274 
Line 275 
         (void)setpriority(PRIO_PROCESS, 0, prio);          (void)setpriority(PRIO_PROCESS, 0, prio);
   
         execv(shell, np);          execv(shell, np);
         err(1, "%s", shell);          err(1, shell);
 }  }
   
 int  int

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9