Unset AUTHSTATE after calling authenticate() as it may not be correct for

the user we are running the command as.
This commit is contained in:
Todd C. Miller
2008-11-06 00:08:24 +00:00
parent 8654dec3c0
commit 50d8974753
2 changed files with 6 additions and 1 deletions

View File

@@ -70,6 +70,8 @@ aixauth_verify(pw, prompt, auth)
/* XXX - should probably print message on failure. */
if (authenticate(pw->pw_name, pass, &reenter, &message) == 0)
rval = AUTH_SUCCESS;
/* Unset AUTHSTATE as it may not be correct for the runas user. */
sudo_unsetenv("AUTHSTATE");
free(message);
zero_bytes(pass, strlen(pass));
}