diff options
| author | Glenn Morris | 2011-01-24 19:47:47 -0800 |
|---|---|---|
| committer | Glenn Morris | 2011-01-24 19:47:47 -0800 |
| commit | 06d8ace51597cd41e110560a56a1abeb6cce23d6 (patch) | |
| tree | e893bab169f27821637fc07e3cd2414b4b9b7b68 /lib-src | |
| parent | c5ecc7690d4afafb42049634d64abd781ff76642 (diff) | |
| parent | 0d19d4feaa653a315853716e64bbaddb210a26ca (diff) | |
| download | emacs-06d8ace51597cd41e110560a56a1abeb6cce23d6.tar.gz emacs-06d8ace51597cd41e110560a56a1abeb6cce23d6.zip | |
Merge from emacs-23.
Note setting of CANNOT_DUMP on ia64 hpux is still to be merged manually.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 5 | ||||
| -rw-r--r-- | lib-src/movemail.c | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 74509f4ae5e..97124142867 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-01-25 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * movemail.c (main): Use setregid instead of setegid, which is | ||
| 4 | missing on older systems. Suggested by Peter O'Gorman (Bug#6811). | ||
| 5 | |||
| 1 | 2011-01-23 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2011-01-23 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | Check return values of some library calls. | 8 | Check return values of some library calls. |
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) | |||
| 354 | time_t touched_lock, now; | 354 | time_t touched_lock, now; |
| 355 | #endif | 355 | #endif |
| 356 | 356 | ||
| 357 | if (setuid (getuid ()) < 0 || setegid (real_gid) < 0) | 357 | if (setuid (getuid ()) < 0 || setregid (-1, real_gid) < 0) |
| 358 | fatal ("Failed to drop privileges", 0, 0); | 358 | fatal ("Failed to drop privileges", 0, 0); |
| 359 | 359 | ||
| 360 | #ifndef MAIL_USE_MMDF | 360 | #ifndef MAIL_USE_MMDF |
| @@ -381,7 +381,7 @@ main (int argc, char **argv) | |||
| 381 | if (outdesc < 0) | 381 | if (outdesc < 0) |
| 382 | pfatal_with_name (outname); | 382 | pfatal_with_name (outname); |
| 383 | 383 | ||
| 384 | if (setegid (priv_gid) < 0) | 384 | if (setregid (-1, priv_gid) < 0) |
| 385 | fatal ("Failed to regain privileges", 0, 0); | 385 | fatal ("Failed to regain privileges", 0, 0); |
| 386 | 386 | ||
| 387 | /* This label exists so we can retry locking | 387 | /* This label exists so we can retry locking |
| @@ -478,7 +478,7 @@ main (int argc, char **argv) | |||
| 478 | #endif | 478 | #endif |
| 479 | 479 | ||
| 480 | /* Prevent symlink attacks truncating other users' mailboxes */ | 480 | /* Prevent symlink attacks truncating other users' mailboxes */ |
| 481 | if (setegid (real_gid) < 0) | 481 | if (setregid (-1, real_gid) < 0) |
| 482 | fatal ("Failed to drop privileges", 0, 0); | 482 | fatal ("Failed to drop privileges", 0, 0); |
| 483 | 483 | ||
| 484 | /* Check to make sure no errors before we zap the inbox. */ | 484 | /* Check to make sure no errors before we zap the inbox. */ |
| @@ -514,7 +514,7 @@ main (int argc, char **argv) | |||
| 514 | #endif /* not MAIL_USE_SYSTEM_LOCK */ | 514 | #endif /* not MAIL_USE_SYSTEM_LOCK */ |
| 515 | 515 | ||
| 516 | /* End of mailbox truncation */ | 516 | /* End of mailbox truncation */ |
| 517 | if (setegid (priv_gid) < 0) | 517 | if (setregid (-1, priv_gid) < 0) |
| 518 | fatal ("Failed to regain privileges", 0, 0); | 518 | fatal ("Failed to regain privileges", 0, 0); |
| 519 | 519 | ||
| 520 | #ifdef MAIL_USE_MAILLOCK | 520 | #ifdef MAIL_USE_MAILLOCK |