From 06b018767b6e6f3ee0221c3aee142cb2b4836fc9 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 25 Feb 2009 12:55:47 +0100 Subject: Fix an incompatible pointer passed to winbind_get_groups This is the same bug that was fixed in other places of the code a few times already: A C compiler ONLY does automatic type conversions during an assignment. Passing down a pointer to type A to a function taking type B as an argument does NOT do any automatic type conversions. If required, I can dig up the relevant portions of the C standard. --- source3/passdb/pdb_wbc_sam.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/passdb') diff --git a/source3/passdb/pdb_wbc_sam.c b/source3/passdb/pdb_wbc_sam.c index 33dc03fe4cd..d2c7fda2936 100644 --- a/source3/passdb/pdb_wbc_sam.c +++ b/source3/passdb/pdb_wbc_sam.c @@ -115,10 +115,12 @@ static NTSTATUS pdb_wbc_sam_enum_group_memberships(struct pdb_methods *methods, { size_t i; const char *username = pdb_get_username(user); + uint32_t num_groups; - if (!winbind_get_groups(mem_ctx, username, p_num_groups, pp_gids)) { + if (!winbind_get_groups(mem_ctx, username, &num_groups, pp_gids)) { return NT_STATUS_NO_SUCH_USER; } + *p_num_groups = num_groups; if (*p_num_groups == 0) { smb_panic("primary group missing"); -- cgit v1.2.1