You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-cvs@httpd.apache.org by st...@apache.org on 2003/12/16 21:24:15 UTC
cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestRun.pm
stas 2003/12/16 12:24:15
Modified: perl-framework/Apache-Test/lib/Apache TestRun.pm
Log:
to get the process fully drop privs, ensure that the call to setgroups()
with an empty list is done
Revision Changes Path
1.125 +3 -2 httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm
Index: TestRun.pm
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -u -r1.124 -r1.125
--- TestRun.pm 14 Dec 2003 02:09:04 -0000 1.124
+++ TestRun.pm 16 Dec 2003 20:24:15 -0000 1.125
@@ -814,8 +814,9 @@
sub run_root_fs_test {
my($uid, $gid, $dir) = @_;
- # first must change gid and egid
- $( = $) = $gid+0;
+ # first must change gid and egid ("$gid $gid" for an empty
+ # setgroups() call as explained in perlvar.pod)
+ $( = $) = "$gid $gid";
die "failed to change gid to $gid" unless $( == $gid;
# only now can change uid and euid