blob: fb8638afbcfd2d6cc4ba7fccba0a569a377686f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
$NetBSD: patch-ay,v 1.1 2007/05/27 09:49:54 schmonz Exp $
--- src/run.c.orig 2005-06-07 00:23:30.000000000 +0200
+++ src/run.c
@@ -208,6 +208,13 @@ run_exec (stin, stout, sterr, flags)
#endif
if (pid == 0)
{
+#ifdef SETXID_SUPPORT
+ if (flags & RUN_UNSETXID) {
+ (void) setgid (getgid ());
+ (void) setuid (getuid ());
+ }
+#endif
+
if (shin != 0)
{
(void) dup2 (shin, 0);
|