[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.73.2.1 and 1.73.2.2

version 1.73.2.1, 2019/12/04 09:51:49 version 1.73.2.2, 2019/12/09 04:51:48
Line 170 
Line 170 
                 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 205 
Line 207 
                 }                  }
   
                 /* If the user specified a login class, use it */                  /* If the user specified a login class, use it */
                 if (!class && pwd && pwd->pw_class && pwd->pw_class[0] != '\0')                  if (pw_class == NULL && pwd != NULL)
                         class = strdup(pwd->pw_class);                          pw_class = pwd->pw_class;
                 if ((lc = login_getclass(class)) == NULL)                  if ((lc = login_getclass(pw_class)) == NULL)
                         auth_errx(as, 1, "no such login class: %s",                          auth_errx(as, 1, "no such login class: %s",
                             class ? class : LOGIN_DEFCLASS);                              pw_class ? pw_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.73.2.1  
changed lines
  Added in v.1.73.2.2