summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-08-03 16:28:59 +0200
committerGünther Deschner <gd@samba.org>2009-08-03 16:32:15 +0200
commit20225d83dd1d09274bd913d1713c56268a069628 (patch)
tree1a4dbba4225e291ac711ce5f21f28710fc482a32
parent64b4d020325534cbdfb82366543ab947feb70c97 (diff)
downloadsamba-20225d83dd1d09274bd913d1713c56268a069628.tar.gz
samba-20225d83dd1d09274bd913d1713c56268a069628.tar.bz2
samba-20225d83dd1d09274bd913d1713c56268a069628.zip
s3-pdb_ldap: Make ldapsam_alias_memberships behave like the tdbsam equivalent.
This lets samr_GetAliasMembership return with NT_STATUS_OK when called with 0 sids (just what w2k3 does). Guenther
-rw-r--r--source3/passdb/pdb_ldap.c7
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);