]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Split error messages for failures to drop real uid and gid.
authorJoey Hess <joey@kodama.kitenet.net>
Tue, 1 Jan 2008 23:48:34 +0000 (18:48 -0500)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 1 Jan 2008 23:48:34 +0000 (18:48 -0500)
* Retry dropping uid and gid, possibly this will help with the "Resource
  temporarily unavailable" failures I've experienced under xen.

IkiWiki/Wrapper.pm
debian/changelog

index dcf3e5c364ba2380ba04f3c78f0fca551f0badc3..16e5bd3501541aa9fab36f82d2d3a02420f707fd 100644 (file)
@@ -91,8 +91,14 @@ $envsave
        newenviron[i]=NULL;
        environ=newenviron;
 
-       if (setregid(getegid(), -1) != 0 || setreuid(geteuid(), -1) != 0) {
-               perror("failed to drop real uid/gid");
+       if (setregid(getegid(), -1) != 0 &&
+           setregid(getegid(), -1) != 0) {
+               perror("failed to drop real gid");
+               exit(1);
+       }
+       if (setreuid(geteuid(), -1) != 0 &&
+           setreuid(geteuid(), -1) != 0) {
+               perror("failed to drop real uid");
                exit(1);
        }
 
index 640192d55913fb950d5fb122c5d0996e7b5a3760..1fe89256c3838496ce716f604b0ef6bf814bbf9e 100644 (file)
@@ -1,3 +1,11 @@
+ikiwiki (2.18) UNRELEASED; urgency=low
+
+  * Split error messages for failures to drop real uid and gid.
+  * Retry dropping uid and gid, possibly this will help with the "Resource
+    temporarily unavailable" failures I've experienced under xen.
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 01 Jan 2008 18:46:59 -0500
+
 ikiwiki (2.17) unstable; urgency=low
 
   * Improved parentlinks special case for index pages.