X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=plugins%2Fsudoers%2Fauth%2Fbsdauth.c;h=e0eeb4ea3d9100c64f45efb6897bd794518976e2;hb=e8db7f6eea9b35527ddd4532affabd18a30549b5;hp=3597e56eeecb286cd0b2e0975adbcebcfca8da65;hpb=2e444a5714593fb7659157cee2e7037577c0bdcd;p=debian%2Fsudo diff --git a/plugins/sudoers/auth/bsdauth.c b/plugins/sudoers/auth/bsdauth.c index 3597e56..e0eeb4e 100644 --- a/plugins/sudoers/auth/bsdauth.c +++ b/plugins/sudoers/auth/bsdauth.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2005, 2007-2008, 2010-2011 + * Copyright (c) 2000-2005, 2007-2008, 2010-2013 * Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any @@ -22,7 +22,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include @@ -74,14 +73,14 @@ bsdauth_init(struct passwd *pw, sudo_auth *auth) else state.lc = login_getclass(pw->pw_uid ? LOGIN_DEFCLASS : LOGIN_DEFROOTCLASS); if (state.lc == NULL) { - log_error(USE_ERRNO|NO_MAIL, - _("unable to get login class for user %s"), pw->pw_name); + log_warning(USE_ERRNO|NO_MAIL, + N_("unable to get login class for user %s"), pw->pw_name); debug_return_int(AUTH_FATAL); } if ((state.as = auth_open()) == NULL) { - log_error(USE_ERRNO|NO_MAIL, - _("unable to begin bsd authentication")); + log_warning(USE_ERRNO|NO_MAIL, + N_("unable to begin bsd authentication")); login_close(state.lc); debug_return_int(AUTH_FATAL); } @@ -89,7 +88,7 @@ bsdauth_init(struct passwd *pw, sudo_auth *auth) /* XXX - maybe sanity check the auth style earlier? */ login_style = login_getstyle(state.lc, login_style, "auth-sudo"); if (login_style == NULL) { - log_error(NO_MAIL, _("invalid authentication type")); + log_warning(NO_MAIL, N_("invalid authentication type")); auth_close(state.as); login_close(state.lc); debug_return_int(AUTH_FATAL); @@ -98,7 +97,7 @@ bsdauth_init(struct passwd *pw, sudo_auth *auth) if (auth_setitem(state.as, AUTHV_STYLE, login_style) < 0 || auth_setitem(state.as, AUTHV_NAME, pw->pw_name) < 0 || auth_setitem(state.as, AUTHV_CLASS, login_class) < 0) { - log_error(NO_MAIL, _("unable to setup authentication")); + log_warning(NO_MAIL, N_("unable to setup authentication")); auth_close(state.as); login_close(state.lc); debug_return_int(AUTH_FATAL); @@ -170,7 +169,7 @@ bsdauth_verify(struct passwd *pw, char *prompt, sudo_auth *auth) debug_return_int(AUTH_INTR); if ((s = auth_getvalue(as, "errormsg")) != NULL) - log_error(NO_MAIL, "%s", s); + log_warning(NO_MAIL, "%s", s); debug_return_int(AUTH_FAILURE); }