blob: 35aee93a063a4c406166ef05cdc3243b86125158 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
$NetBSD: patch-ay,v 1.6 2006/01/29 02:40:40 wiz 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);
|