]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:client: Correctly call setgroups() (CID 1449449)
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Fri, 6 Oct 2023 00:25:16 +0000 (13:25 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 13 Oct 2023 02:18:31 +0000 (02:18 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/client/smbspool_krb5_wrapper.c

index 9abd1c6b868e30a797069705951db1fdc8a383dc..34553d616e6c9ed08020ddf9513de62e7279e88a 100644 (file)
@@ -267,7 +267,7 @@ int main(int argc, char *argv[])
 
        CUPS_SMB_DEBUG("Adding group 'lp' (%u)", g->gr_gid);
        groups[0] = g->gr_gid;
-       rc = setgroups(sizeof(groups), groups);
+       rc = setgroups(ARRAY_SIZE(groups), groups);
        if (rc != 0) {
                CUPS_SMB_ERROR("Failed to set groups for 'lp' - %s",
                               strerror(errno));