summaryrefslogtreecommitdiff
path: root/modules/pam_mail/pam_mail.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2010-09-20 20:16:30 +0000
committerDmitry V. Levin <ldv@altlinux.org>2010-09-20 20:16:30 +0000
commite2f2489b397720eaf176aaa16c7188ee92050dd8 (patch)
tree9a2653355b4bde6676cf60a28c7fdc010d9ef25c /modules/pam_mail/pam_mail.c
parent08e55be772e8dabf62dc21010751a80ed905f750 (diff)
Relevant BUGIDs:
Purpose of commit: cleanup Commit summary: --------------- 2010-09-16 Dmitry V. Levin <ldv@altlinux.org> * modules/pam_env/pam_env.c (handle_env): Use setfsuid() return code. * modules/pam_mail/pam_mail.c (_do_mail): Likewise. * modules/pam_xauth/pam_xauth.c (check_acl, pam_sm_open_session, pam_sm_close_session): Likewise.
Diffstat (limited to 'modules/pam_mail/pam_mail.c')
-rw-r--r--modules/pam_mail/pam_mail.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/pam_mail/pam_mail.c b/modules/pam_mail/pam_mail.c
index 089c398c..c19cbbe3 100644
--- a/modules/pam_mail/pam_mail.c
+++ b/modules/pam_mail/pam_mail.c
@@ -444,11 +444,9 @@ static int _do_mail(pam_handle_t *pamh, int flags, int argc,
if ((est && !(ctrl & PAM_NO_LOGIN))
|| (!est && (ctrl & PAM_LOGOUT_TOO))) {
- uid_t euid = geteuid();
-
- setfsuid (pwd->pw_uid);
+ uid_t fsuid = setfsuid(pwd->pw_uid);
type = get_mail_status(pamh, ctrl, folder);
- setfsuid (euid);
+ setfsuid(fsuid);
if (type != 0) {
retval = report_mail(pamh, ctrl, type, folder);