[Reproducible-commits] [dpkg] 47/61: s-s-d: Do not set changegroup unconditionally

Jérémy Bobbio lunar at moszumanska.debian.org
Mon Sep 21 09:57:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch pu/reproducible_builds
in repository dpkg.

commit 176098fb7eb9279339f418ac6c11653ddbe5a859
Author: Sven Joachim <svenjoac at gmx.de>
Date:   Thu Sep 17 17:31:29 2015 +0200

    s-s-d: Do not set changegroup unconditionally
    
    Commit 3db7a6eb4fd16b4cea475009bd80be3a41ada014 would always set
    changegroup in the --chuid option, even if no colon is given on the
    commandline.
    
    [guillem at debian.org:
     - Avoid an else from a fatal if. ]
    
    Signed-off-by: Guillem Jover <guillem at debian.org>
---
 utils/start-stop-daemon.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
index 0f4c326..c844f2e 100644
--- a/utils/start-stop-daemon.c
+++ b/utils/start-stop-daemon.c
@@ -1038,10 +1038,11 @@ parse_options(int argc, char * const *argv)
 			 * argument later. */
 			changeuser_len = strcspn(optarg, ":");
 			changeuser = xstrndup(optarg, changeuser_len);
-			if (optarg[changeuser_len] == ':' &&
-			    optarg[changeuser_len + 1] == '\0')
-				fatal("missing group name");
-			changegroup = optarg + changeuser_len + 1;
+			if (optarg[changeuser_len] == ':') {
+				if (optarg[changeuser_len + 1] == '\0')
+					fatal("missing group name");
+				changegroup = optarg + changeuser_len + 1;
+			}
 			break;
 		case 'g':  /* --group <group>|<gid> */
 			changegroup = optarg;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list