diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-12-04 06:46:53 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-12-04 06:46:53 +0000 |
commit | 1d66a6beba888a1be33e4b48e2b0d2a51fdbcbc0 (patch) | |
tree | a11faf18a9f3b7da45cb9e5b21eb341cf17bd0a8 /source3/nsswitch/winbindd_util.c | |
parent | 1838d83e241ceaa73c61c53b50d5f7104b2f6143 (diff) | |
download | samba-1d66a6beba888a1be33e4b48e2b0d2a51fdbcbc0.tar.gz samba-1d66a6beba888a1be33e4b48e2b0d2a51fdbcbc0.tar.bz2 samba-1d66a6beba888a1be33e4b48e2b0d2a51fdbcbc0.zip |
moved lookup_usergroups() into the backend structure
(This used to be commit 689f45d2079d06b09947b2cdd314867df98c938d)
Diffstat (limited to 'source3/nsswitch/winbindd_util.c')
-rw-r--r-- | source3/nsswitch/winbindd_util.c | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index d6f4ca0bcf..d91b6cc95f 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -478,62 +478,6 @@ BOOL winbindd_lookup_name_by_sid(DOM_SID *sid, return rv; } -/* Lookup groups a user is a member of. I wish Unix had a call like this! */ - -BOOL winbindd_lookup_usergroups(struct winbindd_domain *domain, - TALLOC_CTX *mem_ctx, - uint32 user_rid, uint32 *num_groups, - DOM_GID **user_groups) -{ - CLI_POLICY_HND *hnd; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - POLICY_HND dom_pol, user_pol; - uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED; - BOOL got_dom_pol = False, got_user_pol = False; - - /* Get sam handle */ - - if (!(hnd = cm_get_sam_handle(domain->name))) - goto done; - - /* Get domain handle */ - - result = cli_samr_open_domain(hnd->cli, mem_ctx, &hnd->pol, - des_access, &domain->sid, &dom_pol); - - if (!NT_STATUS_IS_OK(result)) - goto done; - - got_dom_pol = True; - - /* Get user handle */ - - result = cli_samr_open_user(hnd->cli, mem_ctx, &dom_pol, - des_access, user_rid, &user_pol); - - if (!NT_STATUS_IS_OK(result)) - goto done; - - got_user_pol = True; - - /* Query user rids */ - - result = cli_samr_query_usergroups(hnd->cli, mem_ctx, &user_pol, - num_groups, user_groups); - - done: - - /* Clean up policy handles */ - - if (got_user_pol) - cli_samr_close(hnd->cli, mem_ctx, &user_pol); - - if (got_dom_pol) - cli_samr_close(hnd->cli, mem_ctx, &dom_pol); - - return NT_STATUS_IS_OK(result); -} - /* Lookup group membership given a rid. */ BOOL winbindd_lookup_groupmem(struct winbindd_domain *domain, |