blob: a999e321287dbafdddd667beadee526ba4601787 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
$NetBSD: patch-ay,v 1.4 2003/07/12 09:19:20 wiz Exp $
--- src/run.c.orig Wed Feb 5 20:46:52 2003
+++ src/run.c
@@ -189,6 +189,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);
|