[RFC][PATCH][CVS] chroot jailing support

Henrique de Moraes Holschuh hmh at debian.org
Sun Dec 29 22:15:10 EST 2002


Duh. Please apply the attached patch too.  I really should regression-test
these things BEFORE I send out patches...

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
-------------- next part --------------
--- master/master.c	2002-12-30 00:40:19.000000000 -0200
+++ master/master.c	2002-12-30 01:07:57.000000000 -0200
@@ -172,7 +178,9 @@
     if (uid && !jail) {
 #ifdef HAVE_SETEUID
 	if (reversible) return seteuid(uid);
-	if (seteuid(0)) return -1;
+	if (geteuid() != uid) {
+	    if (seteuid(0)) return -1;
+	}
 #endif
 	return setuid(uid);
     }


More information about the Info-cyrus mailing list