=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sudo/Attic/sudo.c,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- src/usr.bin/sudo/Attic/sudo.c 2013/04/29 00:28:23 1.46 +++ src/usr.bin/sudo/Attic/sudo.c 2013/11/06 21:30:56 1.47 @@ -1199,6 +1199,9 @@ { int errflags; + if (!def_use_loginclass) + return; + /* * Don't make it a fatal error if the user didn't specify the login * class themselves. We do this because if login.conf gets @@ -1220,11 +1223,11 @@ (pw->pw_uid == 0) ? LOGIN_DEFROOTCLASS : LOGIN_DEFCLASS; } + /* Make sure specified login class is valid. */ 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); - if (!lc) - lc = login_getclass(NULL); /* needed for login_getstyle() later */ + def_use_loginclass = FALSE; } } #else