21 lines
670 B
Plaintext
21 lines
670 B
Plaintext
|
$OpenBSD: patch-src_system_c,v 1.1 2007/11/18 12:55:58 jasper Exp $
|
||
|
--- src/system.c.orig Wed Nov 14 17:23:12 2007
|
||
|
+++ src/system.c Wed Nov 14 17:24:12 2007
|
||
|
@@ -99,8 +99,16 @@ system_no_wait(char *command)
|
||
|
D_OPTIONS(("system_no_wait(%s) called.\n", command));
|
||
|
|
||
|
if (!(pid = fork())) {
|
||
|
+#ifdef HAVE_SETEUID
|
||
|
+ seteuid(my_ruid);
|
||
|
+#else
|
||
|
setreuid(my_ruid, my_ruid);
|
||
|
+#endif
|
||
|
+#ifdef HAVE_SETEGID
|
||
|
+ setegid(my_rgid);
|
||
|
+#else
|
||
|
setregid(my_rgid, my_rgid);
|
||
|
+#endif
|
||
|
execl("/bin/sh", "sh", "-c", command, (char *) NULL);
|
||
|
libast_print_error("execl(%s) failed -- %s\n", command, strerror(errno));
|
||
|
exit(EXIT_FAILURE);
|