From 3df9e62c97f3d90cd3f3ab72738bb6f6f7521590 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 15 Aug 2011 11:47:36 +1000 Subject: s3-passdb Use supplied pdb_methods in default passdb search handlers --- source3/passdb/pdb_interface.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'source3/passdb') diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index 44e7421a07..738b12fc27 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -1900,7 +1900,8 @@ static void search_end_groups(struct pdb_search *search) SAFE_FREE(state->groups); } -static bool pdb_search_grouptype(struct pdb_search *search, +static bool pdb_search_grouptype(struct pdb_methods *methods, + struct pdb_search *search, const struct dom_sid *sid, enum lsa_SidType type) { struct group_search *state; @@ -1911,8 +1912,9 @@ static bool pdb_search_grouptype(struct pdb_search *search, return False; } - if (!pdb_enum_group_mapping(sid, type, &state->groups, &state->num_groups, - True)) { + if (!NT_STATUS_IS_OK(methods->enum_group_mapping(methods, sid, type, + &state->groups, &state->num_groups, + True))) { DEBUG(0, ("Could not enum groups\n")); return False; } @@ -1927,7 +1929,7 @@ static bool pdb_search_grouptype(struct pdb_search *search, static bool pdb_default_search_groups(struct pdb_methods *methods, struct pdb_search *search) { - return pdb_search_grouptype(search, get_global_sam_sid(), SID_NAME_DOM_GRP); + return pdb_search_grouptype(methods, search, get_global_sam_sid(), SID_NAME_DOM_GRP); } static bool pdb_default_search_aliases(struct pdb_methods *methods, @@ -1935,7 +1937,7 @@ static bool pdb_default_search_aliases(struct pdb_methods *methods, const struct dom_sid *sid) { - return pdb_search_grouptype(search, sid, SID_NAME_ALIAS); + return pdb_search_grouptype(methods, search, sid, SID_NAME_ALIAS); } static struct samr_displayentry *pdb_search_getentry(struct pdb_search *search, -- cgit