blob: cc647a42d9790699079bdbde640eec604a3b6f85 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
$NetBSD: patch-ay,v 1.5 2004/04/15 22:28:36 wiz Exp $
--- src/run.c.orig Thu Apr 1 20:53:22 2004
+++ src/run.c
@@ -191,6 +191,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);
|