From 2269cfda301f0187d41b7b42e5f57f5783afdc11 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 1 Jan 2008 18:48:34 -0500 Subject: [PATCH] * 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. --- IkiWiki/Wrapper.pm | 10 ++++++++-- debian/changelog | 8 ++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm index dcf3e5c36..16e5bd350 100644 --- a/IkiWiki/Wrapper.pm +++ b/IkiWiki/Wrapper.pm @@ -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); } diff --git a/debian/changelog b/debian/changelog index 640192d55..1fe89256c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Tue, 01 Jan 2008 18:46:59 -0500 + ikiwiki (2.17) unstable; urgency=low * Improved parentlinks special case for index pages. -- 2.45.0