version 1.77.2.2, 2019/12/09 04:50:42 |
version 1.78, 2019/12/04 09:51:09 |
|
|
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; |
|
|
} |
} |
|
|
/* 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) |