]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
src/gpasswd.c: Reduce scope of cpp conditional
authorAlejandro Colomar <alx@kernel.org>
Sat, 2 Sep 2023 14:19:58 +0000 (16:19 +0200)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Mon, 4 Dec 2023 10:45:09 +0000 (11:45 +0100)
This prepares for the next patch, which will invert the logic of the
conditional.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/gpasswd.c

index 57b9fc0b0c7bdbbdb21ff04ed03ef61d26904191..bab9bf1935a6eadcd5f89d2c3c5847105b000de2 100644 (file)
@@ -712,7 +712,6 @@ static void check_perms (const struct group *gr)
        } else
 #endif                         /* SHADOWGRP */
        if (!amroot) {
-#ifdef FIRST_MEMBER_IS_ADMIN
                /*
                 * The policy here for changing a group is that
                 * 1) you must be root or
@@ -727,6 +726,7 @@ static void check_perms (const struct group *gr)
                 * first group member might be just a normal user.
                 * --marekm
                 */
+#if defined(FIRST_MEMBER_IS_ADMIN)
                if (gr->gr_mem[0] == NULL)
                        failure();