[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.77.2.2 and 1.78

version 1.77.2.2, 2019/12/09 04:50:42 version 1.78, 2019/12/04 09:51:09
Line 172 
Line 172 
                 err(1, "unveil");                  err(1, "unveil");
   
         for (;;) {          for (;;) {
                 char *pw_class = class;  
   
                 /* get target user, default to root unless in -L mode */                  /* get target user, default to root unless in -L mode */
                 if (*argv) {                  if (*argv) {
                         user = *argv;                          user = *argv;
Line 209 
Line 207 
                 }                  }
   
                 /* If the user specified a login class, use it */                  /* If the user specified a login class, use it */
                 if (pw_class == NULL && pwd != NULL)                  if (!class && pwd && pwd->pw_class && pwd->pw_class[0] != '\0')
                         pw_class = pwd->pw_class;                          class = strdup(pwd->pw_class);
                 if ((lc = login_getclass(pw_class)) == NULL)                  if ((lc = login_getclass(class)) == NULL)
                         auth_errx(as, 1, "no such login class: %s",                          auth_errx(as, 1, "no such login class: %s",
                             pw_class ? pw_class : LOGIN_DEFCLASS);                              class ? class : LOGIN_DEFCLASS);
   
                 if ((ruid == 0 && !emlogin) ||                  if ((ruid == 0 && !emlogin) ||
                     verify_user(username, pwd, style, lc, as) == 0)                      verify_user(username, pwd, style, lc, as) == 0)

Legend:
Removed from v.1.77.2.2  
changed lines
  Added in v.1.78