Imported Upstream version 1.8.5
[debian/sudo] / plugins / sudoers / auth / sudo_auth.c
index dded9cc531dc6b017c9d82e43f76cdc860cedee8..3216582d4d3775c4efa58613524d3b39febf8353 100644 (file)
@@ -114,7 +114,7 @@ sudo_auth_init(struct passwd *pw)
     standalone = IS_STANDALONE(&auth_switch[0]);
     if (standalone && auth_switch[1].name != NULL) {
        audit_failure(NewArgv, "invalid authentication methods");
-       log_error(0, _("Invalid authentication methods compiled into sudo!  "
+       log_fatal(0, _("Invalid authentication methods compiled into sudo!  "
            "You may mix standalone and non-standalone authentication."));
        debug_return_int(-1);
     }
@@ -195,7 +195,7 @@ verify_user(struct passwd *pw, char *prompt)
     /* XXX - check FLAG_DISABLED too */
     if (auth_switch[0].name == NULL) {
        audit_failure(NewArgv, "no authentication methods");
-       log_error(0,
+       log_fatal(0,
            _("There are no authentication methods compiled into sudo!  "
            "If you want to turn off authentication, use the "
            "--disable-authentication configure option."));
@@ -268,7 +268,7 @@ done:
                    flags = 0;
                else
                    flags = NO_MAIL;
-               log_error(flags, ngettext("%d incorrect password attempt",
+               log_fatal(flags, ngettext("%d incorrect password attempt",
                    "%d incorrect password attempts",
                    def_passwd_tries - counter), def_passwd_tries - counter);
            }
@@ -286,7 +286,7 @@ done:
 }
 
 int
-sudo_auth_begin_session(struct passwd *pw)
+sudo_auth_begin_session(struct passwd *pw, char **user_env[])
 {
     sudo_auth *auth;
     int status;
@@ -294,7 +294,7 @@ sudo_auth_begin_session(struct passwd *pw)
 
     for (auth = auth_switch; auth->name; auth++) {
        if (auth->begin_session && !IS_DISABLED(auth)) {
-           status = (auth->begin_session)(pw, auth);
+           status = (auth->begin_session)(pw, user_env, auth);
            if (status == AUTH_FATAL) {
                /* XXX log */
                audit_failure(NewArgv, "authentication failure");