diff options
author | Glenn Morris <rgm@gnu.org> | 2011-01-24 19:47:47 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2011-01-24 19:47:47 -0800 |
commit | 06d8ace51597cd41e110560a56a1abeb6cce23d6 (patch) | |
tree | e893bab169f27821637fc07e3cd2414b4b9b7b68 /lib-src/movemail.c | |
parent | c5ecc7690d4afafb42049634d64abd781ff76642 (diff) | |
parent | 0d19d4feaa653a315853716e64bbaddb210a26ca (diff) | |
download | emacs-06d8ace51597cd41e110560a56a1abeb6cce23d6.tar.gz |
Merge from emacs-23.
Note setting of CANNOT_DUMP on ia64 hpux is still to be merged manually.
Diffstat (limited to 'lib-src/movemail.c')
-rw-r--r-- | lib-src/movemail.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib-src/movemail.c b/lib-src/movemail.c index f492188963d..143ee4e29c1 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -354,7 +354,7 @@ main (int argc, char **argv) time_t touched_lock, now; #endif - if (setuid (getuid ()) < 0 || setegid (real_gid) < 0) + if (setuid (getuid ()) < 0 || setregid (-1, real_gid) < 0) fatal ("Failed to drop privileges", 0, 0); #ifndef MAIL_USE_MMDF @@ -381,7 +381,7 @@ main (int argc, char **argv) if (outdesc < 0) pfatal_with_name (outname); - if (setegid (priv_gid) < 0) + if (setregid (-1, priv_gid) < 0) fatal ("Failed to regain privileges", 0, 0); /* This label exists so we can retry locking @@ -478,7 +478,7 @@ main (int argc, char **argv) #endif /* Prevent symlink attacks truncating other users' mailboxes */ - if (setegid (real_gid) < 0) + if (setregid (-1, real_gid) < 0) fatal ("Failed to drop privileges", 0, 0); /* Check to make sure no errors before we zap the inbox. */ @@ -514,7 +514,7 @@ main (int argc, char **argv) #endif /* not MAIL_USE_SYSTEM_LOCK */ /* End of mailbox truncation */ - if (setegid (priv_gid) < 0) + if (setregid (-1, priv_gid) < 0) fatal ("Failed to regain privileges", 0, 0); #ifdef MAIL_USE_MAILLOCK |