2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

We need to init the auth system regardless of whether we need a

password since we will be closing the PAM session in the monitor
process.  Fixes a crash in the monitor on Solaris; bugzilla #518
This commit is contained in:
Todd C. Miller
2011-10-25 10:08:26 -04:00
parent ab75dd2e30
commit 9b2c889812
2 changed files with 32 additions and 28 deletions

View File

@@ -440,13 +440,9 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[],
rebuild_env();
/* Require a password if sudoers says so. */
if (def_authenticate) {
int rc = check_user(validated, sudo_mode);
if (rc != TRUE) {
rval = rc;
goto done;
}
}
rval = check_user(validated, sudo_mode);
if (rval != TRUE)
goto done;
/* If run as root with SUDO_USER set, set sudo_user.pw to that user. */
/* XXX - causes confusion when root is not listed in sudoers */