+2008-01-22 Guillem Jover <guillem@debian.org>
+
+ * utils/start-stop-daemon.c (main): Move setuid code after initgroups
+ and setgid.
+
2008-01-21 Frank Lichtenheld <djpig@debian.org>
* configure.ac: Release 1.14.16.1
+dpkg (1.14.16.2) UNRELEASED; urgency=low
+
+ * Change uid after changing gid and initializing supplementary groups in
+ start-stop-daemon. Closes: #462018
+
+ -- Guillem Jover <guillem@debian.org> Tue, 22 Jan 2008 12:52:11 +0200
+
dpkg (1.14.16.1) unstable; urgency=low
* Add libtimedate-perl to dpkg-dev's Depends and to Build-Depends.
if (chdir(changedir) < 0)
fatal("Unable to chdir() to %s", changedir);
- if (changeuser != NULL && getuid() != (uid_t)runas_uid) {
- if (setuid(runas_uid))
- fatal("Unable to set uid to %s", changeuser);
- }
if (changegroup != NULL && *changegroup != '\0' &&
getgid() != (gid_t)runas_gid) {
if (!gid_in_current_groups(runas_gid))
if (setgid(runas_gid))
fatal("Unable to set gid to %d", runas_gid);
}
+ if (changeuser != NULL && getuid() != (uid_t)runas_uid) {
+ if (setuid(runas_uid))
+ fatal("Unable to set uid to %s", changeuser);
+ }
if (background) {
/* Continue background setup */