+ static struct bsdauth_state state;
+ debug_decl(bsdauth_init, SUDO_DEBUG_AUTH)
+
+ /* Get login class based on auth user, which may not be invoking user. */
+ if (pw->pw_class && *pw->pw_class)
+ state.lc = login_getclass(pw->pw_class);
+ else
+ state.lc = login_getclass(pw->pw_uid ? LOGIN_DEFCLASS : LOGIN_DEFROOTCLASS);
+ if (state.lc == NULL) {
+ log_warning(USE_ERRNO|NO_MAIL,
+ N_("unable to get login class for user %s"), pw->pw_name);
+ debug_return_int(AUTH_FATAL);
+ }