summaryrefslogtreecommitdiff
path: root/modules/pam_keyinit
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_keyinit')
-rw-r--r--modules/pam_keyinit/pam_keyinit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/pam_keyinit/pam_keyinit.c b/modules/pam_keyinit/pam_keyinit.c
index 378a7723..4732f93b 100644
--- a/modules/pam_keyinit/pam_keyinit.c
+++ b/modules/pam_keyinit/pam_keyinit.c
@@ -143,7 +143,7 @@ static void kill_keyrings(pam_handle_t *pamh)
error(pamh, "Unable to change GID to %d temporarily\n",
revoke_as_gid);
- if (revoke_as_uid != old_uid && setreuid(-1, revoke_as_uid) < 0)
+ if (revoke_as_uid != old_uid && setresuid(-1, revoke_as_uid, old_uid) < 0)
error(pamh, "Unable to change UID to %d temporarily\n",
revoke_as_uid);