the user we are running the command as.
/* 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));
}
#ifdef _AIX
"LDR_*",
"LIBPATH",
+ "AUTHSTATE",
#endif
#ifdef __APPLE__
"DYLD_*",
}
insert_env(estring, dupcheck, TRUE);
}
+#endif /* HAVE_LDAP */
+#if defined(HAVE_LDAP) || defined(HAVE_AIXAUTH)
/*
* Similar to unsetenv(3) but operates on sudo's private copy of the
* environment.
}
}
}
-#endif /* HAVE_LDAP */
+#endif /* HAVE_LDAP || HAVE_AIXAUTH */
/*
* Insert str into env.envp, assumes str has an '=' in it.