mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-30 05:48:18 +00:00
Only need to do 'lc = login_getclass(NULL)' if lc == NULL
This commit is contained in:
parent
3f97a5e44f
commit
cf92836ecf
3
sudo.c
3
sudo.c
@ -887,7 +887,8 @@ set_loginclass(pw)
|
||||
lc = login_getclass(login_class);
|
||||
if (!lc || !lc->lc_class || strcmp(lc->lc_class, login_class) != 0) {
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user