summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-02-25 12:55:47 +0100
committerVolker Lendecke <vl@samba.org>2009-02-25 13:04:19 +0100
commit06b018767b6e6f3ee0221c3aee142cb2b4836fc9 (patch)
tree24ced12d10d2fec9448ce97436f2bb26490e1f81 /source3
parent423c1d88fcd0f128bceaf8b0c371281aa4a41003 (diff)
downloadsamba-06b018767b6e6f3ee0221c3aee142cb2b4836fc9.tar.gz
samba-06b018767b6e6f3ee0221c3aee142cb2b4836fc9.tar.bz2
samba-06b018767b6e6f3ee0221c3aee142cb2b4836fc9.zip
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.
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/pdb_wbc_sam.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/passdb/pdb_wbc_sam.c b/source3/passdb/pdb_wbc_sam.c
index 33dc03fe4c..d2c7fda293 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");