The following commit has been merged in the master branch:
commit 49ad180074dd59337622c568391770936cf912c4
Author: Guillem Jover <[email protected]>
Date: Fri Sep 16 19:41:31 2011 +0200
s-s-d: Reset the user and group names from the password entry on --chuid
This guarantees the initgroups() call will not fail when the user
specified the user to change to as a uid instead of a username.
Closes: #641834
Reported-by: Andreas Pretzsch <[email protected]>
diff --git a/debian/changelog b/debian/changelog
index 7183743..bdcd368 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -218,6 +218,8 @@ dpkg (1.16.1) UNRELEASED; urgency=low
* Do not fail on --compare-version when generating parse warnings.
Existing packages with invalid versions should not fail on their
maintainer scripts due to that.
+ * Use the user name (instead of the user id) when setting the supplementary
+ groups in start-stop-daemon. Closes: #641834
[ Updated dpkg translations ]
* German (Sven Joachim). Closes: #620312
diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
index 7def952..03a7b57 100644
--- a/utils/start-stop-daemon.c
+++ b/utils/start-stop-daemon.c
@@ -1606,6 +1606,7 @@ main(int argc, char **argv)
struct group *gr = getgrnam(changegroup);
if (!gr)
fatal("group '%s' not found", changegroup);
+ changegroup = gr->gr_name;
runas_gid = gr->gr_gid;
}
if (changeuser) {
@@ -1618,6 +1619,7 @@ main(int argc, char **argv)
pw = getpwnam(changeuser);
if (!pw)
fatal("user '%s' not found", changeuser);
+ changeuser = pw->pw_name;
runas_uid = pw->pw_uid;
if (changegroup == NULL) {
/* Pass the default group of this user. */
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]