mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Only need to do 'lc = login_getclass(NULL)' if lc == NULL
This commit is contained in:
3
sudo.c
3
sudo.c
@@ -887,7 +887,8 @@ set_loginclass(pw)
|
|||||||
lc = login_getclass(login_class);
|
lc = login_getclass(login_class);
|
||||||
if (!lc || !lc->lc_class || strcmp(lc->lc_class, login_class) != 0) {
|
if (!lc || !lc->lc_class || strcmp(lc->lc_class, login_class) != 0) {
|
||||||
log_error(errflags, "unknown login class: %s", login_class);
|
log_error(errflags, "unknown login class: %s", login_class);
|
||||||
lc = login_getclass(NULL); /* Fall back on default login class */
|
if (!lc)
|
||||||
|
lc = login_getclass(NULL); /* needed for login_getstyle() later */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user