summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_msrpc.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2017-01-02 15:56:48 +0000
committerVolker Lendecke <vl@samba.org>2017-01-04 12:22:12 +0100
commit241c81b2763392439043261cf179cd2c8793faed (patch)
tree09d7f16cff2fe7b667013899b22ba0db76c3982d /source3/winbindd/winbindd_msrpc.c
parent81f340097436280a90ba252d00f37c644a6be084 (diff)
downloadsamba-241c81b2763392439043261cf179cd2c8793faed.tar.gz
winbind: Remove "query_user" backend function
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/winbindd/winbindd_msrpc.c')
-rw-r--r--source3/winbindd/winbindd_msrpc.c79
1 files changed, 0 insertions, 79 deletions
diff --git a/source3/winbindd/winbindd_msrpc.c b/source3/winbindd/winbindd_msrpc.c
index 42ca142360a..1aa162c5a10 100644
--- a/source3/winbindd/winbindd_msrpc.c
+++ b/source3/winbindd/winbindd_msrpc.c
@@ -403,84 +403,6 @@ static NTSTATUS msrpc_rids_to_names(struct winbindd_domain *domain,
return result;
}
-/* Lookup user information from a rid or username. */
-static NTSTATUS msrpc_query_user(struct winbindd_domain *domain,
- TALLOC_CTX *mem_ctx,
- const struct dom_sid *user_sid,
- struct wbint_userinfo *user_info)
-{
- struct rpc_pipe_client *samr_pipe;
- struct policy_handle dom_pol;
- struct netr_SamInfo3 *user;
- TALLOC_CTX *tmp_ctx;
- NTSTATUS status;
-
- DEBUG(3,("msrpc_query_user sid=%s\n", sid_string_dbg(user_sid)));
-
- tmp_ctx = talloc_stackframe();
- if (tmp_ctx == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
- if (user_info) {
- user_info->homedir = NULL;
- user_info->shell = NULL;
- user_info->primary_gid = (gid_t)-1;
- }
-
- /* try netsamlogon cache first */
- user = netsamlogon_cache_get(tmp_ctx, user_sid);
- if (user != NULL) {
- DEBUG(5,("msrpc_query_user: Cache lookup succeeded for %s\n",
- sid_string_dbg(user_sid)));
-
- sid_compose(&user_info->user_sid, &domain->sid, user->base.rid);
- sid_compose(&user_info->group_sid, &domain->sid,
- user->base.primary_gid);
-
- user_info->acct_name = talloc_strdup(user_info,
- user->base.account_name.string);
- user_info->full_name = talloc_strdup(user_info,
- user->base.full_name.string);
-
- if (user_info->full_name == NULL) {
- /* this might fail so we don't check the return code */
- wcache_query_user_fullname(domain,
- mem_ctx,
- user_sid,
- &user_info->full_name);
- }
-
- status = NT_STATUS_OK;
- goto done;
- }
-
- if ( !winbindd_can_contact_domain( domain ) ) {
- DEBUG(10,("query_user: No incoming trust for domain %s\n",
- domain->name));
- /* Tell the cache manager not to remember this one */
- status = NT_STATUS_SYNCHRONIZATION_REQUIRED;
- goto done;
- }
-
- /* no cache; hit the wire */
- status = cm_connect_sam(domain, tmp_ctx, false, &samr_pipe, &dom_pol);
- if (!NT_STATUS_IS_OK(status)) {
- goto done;
- }
-
- status = rpc_query_user(tmp_ctx,
- samr_pipe,
- &dom_pol,
- &domain->sid,
- user_sid,
- user_info);
-
-done:
- TALLOC_FREE(tmp_ctx);
- return status;
-}
-
/* Lookup groups a user is a member of. I wish Unix had a call like this! */
static NTSTATUS msrpc_lookup_usergroups(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
@@ -1249,7 +1171,6 @@ struct winbindd_methods msrpc_methods = {
msrpc_name_to_sid,
msrpc_sid_to_name,
msrpc_rids_to_names,
- msrpc_query_user,
msrpc_lookup_usergroups,
msrpc_lookup_useraliases,
msrpc_lookup_groupmem,