From: Joseph Sutton Date: Fri, 6 Oct 2023 00:25:16 +0000 (+1300) Subject: s3:client: Correctly call setgroups() (CID 1449449) X-Git-Tag: tevent-0.16.0~71 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3179fc2a7032b8869109ebc6c6f771688aa8fbbc;p=thirdparty%2Fsamba.git s3:client: Correctly call setgroups() (CID 1449449) Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source3/client/smbspool_krb5_wrapper.c b/source3/client/smbspool_krb5_wrapper.c index 9abd1c6b868..34553d616e6 100644 --- a/source3/client/smbspool_krb5_wrapper.c +++ b/source3/client/smbspool_krb5_wrapper.c @@ -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));