openbsd-ports/x11/eterm/patches/patch-src_system_c
jasper fa54b126e9 - update eterm to 0.9.4
- rename/regen some patches
2007-11-18 12:55:58 +00:00

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);