diff options
author | Tim Potter <tpot@samba.org> | 2001-11-15 06:55:56 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-11-15 06:55:56 +0000 |
commit | c32b4b61610338f12093f3ad552c27b4f972e8fd (patch) | |
tree | 6e75b4a4f64eb930e5566b6975f2e9ddae354b1f /source3/nsswitch/winbindd_group.c | |
parent | 1539c2f34b52b3fbc7ff2f9e7515f04f5aaf0f5d (diff) | |
download | samba-c32b4b61610338f12093f3ad552c27b4f972e8fd.tar.gz samba-c32b4b61610338f12093f3ad552c27b4f972e8fd.tar.bz2 samba-c32b4b61610338f12093f3ad552c27b4f972e8fd.zip |
Caching user, group and domain sam handles was a stupid idea.
Now we just keep a record of the open pipes.
(This used to be commit 77c287e9460eed7bde7004c7e6c8cb0099c6ba6f)
Diffstat (limited to 'source3/nsswitch/winbindd_group.c')
-rw-r--r-- | source3/nsswitch/winbindd_group.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c index 335f1d6514..3bee95b845 100644 --- a/source3/nsswitch/winbindd_group.c +++ b/source3/nsswitch/winbindd_group.c @@ -473,20 +473,30 @@ 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_dom_handle(ent->domain->name, - &ent->domain->sid))) + 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, &hnd->pol, + hnd->cli, mem_ctx, &dom_pol, &ent->grp_query_start_ndx, 0x8000, /* buffer size? */ (struct acct_info **) &sam_grp_entries, &num_entries); + cli_samr_close(hnd->cli, mem_ctx, &dom_pol); + /* Copy entries into return buffer */ if (num_entries) { |