diff options
author | Tomas Mraz <tm@t8m.info> | 2008-10-17 11:09:25 +0000 |
---|---|---|
committer | Tomas Mraz <tm@t8m.info> | 2008-10-17 11:09:25 +0000 |
commit | 955caa5f8c4840931ce49bcd8f59c8803c8f0266 (patch) | |
tree | 206498448ee2b8d4c468fa39965da71191a0cb2b /modules | |
parent | 79cc62c4b0425326469c3667810ccbc76cbdad05 (diff) | |
download | pam-955caa5f8c4840931ce49bcd8f59c8803c8f0266.tar.gz pam-955caa5f8c4840931ce49bcd8f59c8803c8f0266.tar.bz2 pam-955caa5f8c4840931ce49bcd8f59c8803c8f0266.zip |
Relevant BUGIDs:
Purpose of commit: bugfix
Commit summary:
---------------
2008-10-15 Tomas Mraz <t8m@centrum.cz>
* modules/pam_keyinit/pam_keyinit.c (kill_keyrings): Save the old
euid to suid to be able to restore it.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/pam_keyinit/pam_keyinit.c | 2 |
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); |