2
0
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:
Todd C. Miller
2001-12-13 02:42:45 +00:00
parent 3f97a5e44f
commit cf92836ecf

3
sudo.c
View File

@@ -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