From 78169af90a3594a574f0e19cd60f27c870a9bcd2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 3 Dec 2001 01:23:42 +0000 Subject: split winbindd_enum_dom_groups into the new backend structure also created winbindd_rpc.c which contains the functions that have been converted to the new structure. There will soon be a winbindd_ads.c for the ldap backend (This used to be commit e4ccc602ba65838646f2632120069f3274619dd9) --- source3/nsswitch/winbindd_group.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'source3/nsswitch/winbindd_group.c') diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c index e65d2bc29e..a183f25926 100644 --- a/source3/nsswitch/winbindd_group.c +++ b/source3/nsswitch/winbindd_group.c @@ -511,28 +511,16 @@ static BOOL get_sam_group_entries(struct getent_state *ent) do { struct acct_info *sam_grp_entries = NULL; - uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED; - CLI_POLICY_HND *hnd; - POLICY_HND dom_pol; num_entries = 0; - if (!(hnd = cm_get_sam_handle(ent->domain->name))) - break; - - status = cli_samr_open_domain(hnd->cli, mem_ctx, - &hnd->pol, des_access, &ent->domain->sid, &dom_pol); - - if (!NT_STATUS_IS_OK(status)) - break; - - status = cli_samr_enum_dom_groups( - hnd->cli, mem_ctx, &dom_pol, - &ent->grp_query_start_ndx, - 0x8000, /* buffer size? */ - (struct acct_info **) &sam_grp_entries, &num_entries); + status = ent->domain->methods->enum_dom_groups(ent->domain, + mem_ctx, + &ent->grp_query_start_ndx, + &num_entries, + &sam_grp_entries); - cli_samr_close(hnd->cli, mem_ctx, &dom_pol); + if (!NT_STATUS_IS_OK(status)) break; /* Copy entries into return buffer */ -- cgit