diff options
author | Tim Potter <tpot@samba.org> | 2001-10-05 00:20:06 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-10-05 00:20:06 +0000 |
commit | 482a9ef278567a35d3bcad1c2048ee97d86bfb9c (patch) | |
tree | a4cf752314cb3605aaa9c204c873f8b221df03ff /source3/nsswitch/winbindd_group.c | |
parent | 18190fc0513d6fa8824fa0b105aeb16dd428106b (diff) | |
download | samba-482a9ef278567a35d3bcad1c2048ee97d86bfb9c.tar.gz samba-482a9ef278567a35d3bcad1c2048ee97d86bfb9c.tar.bz2 samba-482a9ef278567a35d3bcad1c2048ee97d86bfb9c.zip |
This is the start of a bit of a rewrite of winbindd's connection handling.
I've wrapped up all the decisions about managing, making and closing
connections into a connection manager in nsswitch/winbindd_cm.c.
It's rather incomplete at the moment - only querying basic user info works
at the moment (i.e finger -m DOMAIN/user) and everything else is broken.
Jeremy, please take a look and I'll start moving across the rest of
winbindd to this new system.
(This used to be commit c369cf5af787ed9c642778d21f162716fbf0620e)
Diffstat (limited to 'source3/nsswitch/winbindd_group.c')
-rw-r--r-- | source3/nsswitch/winbindd_group.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c index ab693eff63..40ad100fc5 100644 --- a/source3/nsswitch/winbindd_group.c +++ b/source3/nsswitch/winbindd_group.c @@ -23,6 +23,8 @@ #include "winbindd.h" +#if 0 + /* Fill a grent structure from various other information */ static BOOL fill_grent(struct winbindd_gr *gr, char *gr_name, @@ -496,15 +498,18 @@ static BOOL get_sam_group_entries(struct getent_state *ent) do { struct acct_info *sam_grp_entries = NULL; + CLI_POLICY_HND *hnd; num_entries = 0; - status = wb_samr_enum_dom_groups(&ent->domain->sam_dom_handle, - &ent->grp_query_start_ndx, - 0x8000, /* buffer size? */ - (struct acct_info **) - &sam_grp_entries, - &num_entries); + if (!(hnd = cm_get_sam_dom_handle(ent->domain->name))) + break; + + status = cli_samr_enum_dom_groups( + hnd->cli, hnd->cli->mem_ctx, hnd->pol, + &ent->grp_query_start_ndx, + 0x8000, /* buffer size? */ + (struct acct_info **) &sam_grp_entries, &num_entries); /* Copy entries into return buffer */ @@ -983,3 +988,5 @@ enum winbindd_result winbindd_getgroups(struct winbindd_cli_state *state) return result; } + +#endif |