aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Overbruck <mail@duncano.de>2020-11-14 16:28:27 +0100
committerDuncan Overbruck <mail@duncano.de>2020-11-14 16:44:02 +0100
commita1ab056bccfe66d4f03b96e3f83168a3732e56f4 (patch)
treed9664a09f505aa809243b35b9107a7e96466a9e7
parentb3e966b7f3b921a686a7665f4b265b19c79c46f3 (diff)
downloadopendoas-a1ab056bccfe66d4f03b96e3f83168a3732e56f4.tar.gz
pam: use PAM_REINITIALIZE_CRED
Both work fine, PAM_REINITIALIZE_CRED is the more correct choice and is required on Solaris, see sudo bug #642; https://bugzilla.sudo.ws/show_bug.cgi?id=642
-rw-r--r--pam.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pam.c b/pam.c
index 8148380..68294b2 100644
--- a/pam.c
+++ b/pam.c
@@ -313,9 +313,9 @@ pamauth(const char *user, const char *myname, int interactive, int nopass, int p
warn("pam_set_item(?, PAM_USER, \"%s\"): %s", user,
pam_strerror(pamh, ret));
- ret = pam_setcred(pamh, PAM_ESTABLISH_CRED);
+ ret = pam_setcred(pamh, PAM_REINITIALIZE_CRED);
if (ret != PAM_SUCCESS)
- warn("pam_setcred(?, PAM_ESTABLISH_CRED): %s", pam_strerror(pamh, ret));
+ warn("pam_setcred(?, PAM_REINITIALIZE_CRED): %s", pam_strerror(pamh, ret));
else
cred = 1;