2001-07-12 22:27:16 -04:00
|
|
|
Deal with _POSIX_SAVED_IDS when relinquishing privileges
|
|
|
|
|
2003-12-13 20:39:18 -05:00
|
|
|
$OpenBSD: patch-unix_spawn_c,v 1.2 2003/12/14 01:39:18 naddy Exp $
|
|
|
|
--- unix/spawn.c.orig 2003-05-29 08:08:49.000000000 +0200
|
|
|
|
+++ unix/spawn.c 2003-11-11 21:28:58.000000000 +0100
|
|
|
|
@@ -352,8 +352,10 @@ ixsspawn (pazargs, aidescs, fkeepuid, fk
|
2001-07-12 22:27:16 -04:00
|
|
|
if (! fkeepuid)
|
|
|
|
{
|
|
|
|
/* Return to the uid of the invoking user. */
|
|
|
|
- (void) setuid (getuid ());
|
|
|
|
+ (void) setegid (getgid ());
|
|
|
|
(void) setgid (getgid ());
|
|
|
|
+ (void) seteuid (getuid ());
|
|
|
|
+ (void) setuid (getuid ());
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|