[71240] trunk/base/src/pextlib1.0/system.c
jmr at macports.org
jmr at macports.org
Sun Sep 5 15:48:36 PDT 2010
Revision: 71240
http://trac.macports.org/changeset/71240
Author: jmr at macports.org
Date: 2010-09-05 15:48:36 -0700 (Sun, 05 Sep 2010)
Log Message:
-----------
set gid as well as uid for child in SystemCmd
Modified Paths:
--------------
trunk/base/src/pextlib1.0/system.c
Modified: trunk/base/src/pextlib1.0/system.c
===================================================================
--- trunk/base/src/pextlib1.0/system.c 2010-09-05 22:38:40 UTC (rev 71239)
+++ trunk/base/src/pextlib1.0/system.c 2010-09-05 22:48:36 UTC (rev 71240)
@@ -149,7 +149,8 @@
}
/* drop privileges entirely for child */
if (getuid() == 0 && (euid = geteuid()) != 0) {
- if (seteuid(0) || setuid(euid)) {
+ gid_t egid = getegid();
+ if (seteuid(0) || setgid(egid) || setuid(euid)) {
_exit(1);
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100905/ab749cba/attachment.html>
More information about the macports-changes
mailing list