summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_group.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nsswitch/winbindd_group.c')
-rw-r--r--source3/nsswitch/winbindd_group.c24
1 files changed, 6 insertions, 18 deletions
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 */