summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_util.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-12-04 06:17:39 +0000
committerAndrew Tridgell <tridge@samba.org>2001-12-04 06:17:39 +0000
commit8e8ce079b8c54b257111537d487a5419ce0d1479 (patch)
tree9938c5011a2259b69f576acb6e6fe687a9be5945 /source3/nsswitch/winbindd_util.c
parentde98a82052f7f8dbd0785d8d5e26f84e19c32252 (diff)
downloadsamba-8e8ce079b8c54b257111537d487a5419ce0d1479.tar.gz
samba-8e8ce079b8c54b257111537d487a5419ce0d1479.tar.bz2
samba-8e8ce079b8c54b257111537d487a5419ce0d1479.zip
added a query_user backend
fixed a winbindd crash when the group membership can't be looked up (This used to be commit 088f4cc5be4a1a38781e4d019146d53993ed8c6f)
Diffstat (limited to 'source3/nsswitch/winbindd_util.c')
-rw-r--r--source3/nsswitch/winbindd_util.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index 900fc900bf..d6f4ca0bcf 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -478,61 +478,6 @@ BOOL winbindd_lookup_name_by_sid(DOM_SID *sid,
return rv;
}
-/* Lookup user information from a rid */
-
-BOOL winbindd_lookup_userinfo(struct winbindd_domain *domain,
- TALLOC_CTX *mem_ctx, uint32 user_rid,
- SAM_USERINFO_CTR **user_info)
-{
- CLI_POLICY_HND *hnd;
- uint16 info_level = 0x15;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED;
- POLICY_HND dom_pol, user_pol;
- 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;
-
- /* Get user info */
-
- result = cli_samr_query_userinfo(hnd->cli, mem_ctx, &user_pol,
- info_level, user_info);
-
- cli_samr_close(hnd->cli, mem_ctx, &user_pol);
-
- 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 groups a user is a member of. I wish Unix had a call like this! */
BOOL winbindd_lookup_usergroups(struct winbindd_domain *domain,