summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/login/login.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c
index 967463c..c53ba6a 100644
--- a/usr.bin/login/login.c
+++ b/usr.bin/login/login.c
@@ -714,6 +714,10 @@ auth_pam()
} else
syslog(LOG_ERR, "Couldn't get PAM_USER: %s",
pam_strerror(pamh, e));
+ if ((e = pam_setcred(pamh, PAM_ESTABLISH_CRED)) !=
+ PAM_SUCCESS)
+ syslog(LOG_ERR, "Couldn't establish credentials: %s",
+ pam_strerror(pamh, e));
rval = 0;
break;
OpenPOWER on IntegriCloud