openbsd-ports/net/uucp/patches/patch-unix_spawn_c
2003-12-14 01:39:18 +00:00

18 lines
572 B
Plaintext

Deal with _POSIX_SAVED_IDS when relinquishing privileges
$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
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
{