mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
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.
This commit is contained in:
parent
423c1d88fc
commit
06b018767b
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user