From: Ben Collins Date: Sat, 27 Nov 1999 14:49:13 +0000 (+0000) Subject: * utils/start-stop-daemon.c: call initgroups() prior to seteuid() X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68cdb9292250de24f13fffa5cdb3ddd00efb2f53;p=dpkg * utils/start-stop-daemon.c: call initgroups() prior to seteuid() --- diff --git a/ChangeLog b/ChangeLog index 6e09b9ab..5ad79a7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Nov 27 09:46:26 EST 1999 Ben Collins + + * utils/start-stop-daemon.c: call initgroups() prior to seteuid() + Fri Nov 26 18:36:22 EST 1999 Ben Collins * dselect/main.cc: fixed three cases where gettext usage was not diff --git a/debian/changelog b/debian/changelog index 0d32414a..7152a06d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,8 @@ dpkg (1.6.1) unstable; urgency=low * dselect/main.cc: fixed three cases where gettext usage was not possible die to macros inlined in the strings - + * utils/start-stop-daemon.c: call initgroups() prior to seteuid() + -- Wichert Akkerman UNRELEASED dpkg (1.6) unstable; urgency=low diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c index bf47531b..b84eda22 100644 --- a/utils/start-stop-daemon.c +++ b/utils/start-stop-daemon.c @@ -654,10 +654,10 @@ main(int argc, char **argv) printf("Starting %s...\n", startas); *--argv = startas; if (changeuser != NULL) { - if (seteuid(runas_uid)) - fatal("Unable to set effective uid to %s", changeuser); if (initgroups(changeuser, runas_gid)) fatal("Unable to set initgroups() with gid %d", runas_gid); + if (seteuid(runas_uid)) + fatal("Unable to set effective uid to %s", changeuser); } if (background) { /* ok, we need to detach this process */