diff options
-rw-r--r-- | source3/passdb/pdb_ldap.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 1b1e22f2c8..fc736c2e3e 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -3710,6 +3710,9 @@ static NTSTATUS ldapsam_alias_memberships(struct pdb_methods *methods, char *filter; enum lsa_SidType type = SID_NAME_USE_NONE; + *pp_alias_rids = NULL; + *p_num_alias_rids = 0; + if (sid_check_is_builtin(domain_sid)) { type = SID_NAME_ALIAS; } @@ -3724,6 +3727,10 @@ static NTSTATUS ldapsam_alias_memberships(struct pdb_methods *methods, return NT_STATUS_UNSUCCESSFUL; } + if (num_members == 0) { + return NT_STATUS_OK; + } + filter = talloc_asprintf(mem_ctx, "(&(|(objectclass=%s)(sambaGroupType=%d))(|", LDAP_OBJ_GROUPMAP, type); |