Avoid reinitializing other auth methods.

This commit is contained in:
Todd C. Miller
2021-09-21 20:05:35 -06:00
parent 4a49f16967
commit b9b8451830
6 changed files with 33 additions and 7 deletions

View File

@@ -55,6 +55,10 @@ sudo_secureware_init(struct passwd *pw, sudo_auth *auth)
{
debug_decl(sudo_secureware_init, SUDOERS_DEBUG_AUTH);
/* Only initialize once. */
if (auth->data != NULL)
debug_return_int(AUTH_SUCCESS);
#ifdef __alpha
if (crypt_type == INT_MAX)
debug_return_int(AUTH_FAILURE); /* no shadow */