summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-12-21 14:32:34 +0100
committerVolker Lendecke <vl@samba.org>2009-12-21 16:27:18 +0100
commit0c3e3b7ab09eee927f8fbe8cabc1819ddde7c215 (patch)
tree115978c7057c31e3cd2835b70997be86501b6548 /source3
parentebcb28ca73eb17d1dcdc8c5a3f9ffca28ad348fb (diff)
downloadsamba-0c3e3b7ab09eee927f8fbe8cabc1819ddde7c215.tar.gz
samba-0c3e3b7ab09eee927f8fbe8cabc1819ddde7c215.tar.bz2
samba-0c3e3b7ab09eee927f8fbe8cabc1819ddde7c215.zip
s3: Remove unused winbindd_lookupname_async
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_async.c150
-rw-r--r--source3/winbindd/winbindd_proto.h7
2 files changed, 0 insertions, 157 deletions
diff --git a/source3/winbindd/winbindd_async.c b/source3/winbindd/winbindd_async.c
index bd1697e150..efdcbc1281 100644
--- a/source3/winbindd/winbindd_async.c
+++ b/source3/winbindd/winbindd_async.c
@@ -151,156 +151,6 @@ enum winbindd_result winbindd_dual_lookupsid(struct winbindd_domain *domain,
return WINBINDD_OK;
}
-/********************************************************************
- This is the second callback after contacting the forest root
-********************************************************************/
-
-struct lookupname_state {
- char *dom_name;
- char *name;
- void *caller_private_data;
-};
-
-
-static void lookupname_recv2(TALLOC_CTX *mem_ctx, bool success,
- struct winbindd_response *response,
- void *c, void *private_data)
-{
- void (*cont)(void *priv, bool succ, const DOM_SID *sid,
- enum lsa_SidType type) =
- (void (*)(void *, bool, const DOM_SID *, enum lsa_SidType))c;
- DOM_SID sid;
- struct lookupname_state *s = talloc_get_type_abort( private_data,
- struct lookupname_state );
-
- if (!success) {
- DEBUG(5, ("Could not trigger lookup_name\n"));
- cont(s->caller_private_data, False, NULL, SID_NAME_UNKNOWN);
- return;
- }
-
- if (response->result != WINBINDD_OK) {
- DEBUG(5, ("lookup_name returned an error\n"));
- cont(s->caller_private_data, False, NULL, SID_NAME_UNKNOWN);
- return;
- }
-
- if (!string_to_sid(&sid, response->data.sid.sid)) {
- DEBUG(0, ("Could not convert string %s to sid\n",
- response->data.sid.sid));
- cont(s->caller_private_data, False, NULL, SID_NAME_UNKNOWN);
- return;
- }
-
- cont(s->caller_private_data, True, &sid,
- (enum lsa_SidType)response->data.sid.type);
-}
-
-/********************************************************************
- This is the first callback after contacting our own domain
-********************************************************************/
-
-static void lookupname_recv(TALLOC_CTX *mem_ctx, bool success,
- struct winbindd_response *response,
- void *c, void *private_data)
-{
- void (*cont)(void *priv, bool succ, const DOM_SID *sid,
- enum lsa_SidType type) =
- (void (*)(void *, bool, const DOM_SID *, enum lsa_SidType))c;
- DOM_SID sid;
- struct lookupname_state *s = talloc_get_type_abort( private_data,
- struct lookupname_state );
-
- if (!success) {
- DEBUG(5, ("lookupname_recv: lookup_name() failed!\n"));
- cont(s->caller_private_data, False, NULL, SID_NAME_UNKNOWN);
- return;
- }
-
- if (response->result != WINBINDD_OK) {
- /* Try again using the forest root */
- struct winbindd_domain *root_domain = find_root_domain();
- struct winbindd_request request;
-
- if ( !root_domain ) {
- DEBUG(5,("lookupname_recv: unable to determine forest root\n"));
- cont(s->caller_private_data, False, NULL, SID_NAME_UNKNOWN);
- return;
- }
-
- ZERO_STRUCT(request);
- request.cmd = WINBINDD_LOOKUPNAME;
-
- fstrcpy( request.data.name.dom_name, s->dom_name );
- fstrcpy( request.data.name.name, s->name );
-
- do_async_domain(mem_ctx, root_domain, &request, lookupname_recv2,
- (void *)cont, s);
-
- return;
- }
-
- if (!string_to_sid(&sid, response->data.sid.sid)) {
- DEBUG(0, ("Could not convert string %s to sid\n",
- response->data.sid.sid));
- cont(s->caller_private_data, False, NULL, SID_NAME_UNKNOWN);
- return;
- }
-
- cont(s->caller_private_data, True, &sid,
- (enum lsa_SidType)response->data.sid.type);
-}
-
-/********************************************************************
- The lookup name call first contacts a DC in its own domain
- and fallbacks to contact a DC if the forest in our domain doesn't
- know the name.
-********************************************************************/
-
-void winbindd_lookupname_async(TALLOC_CTX *mem_ctx,
- const char *dom_name, const char *name,
- void (*cont)(void *private_data, bool success,
- const DOM_SID *sid,
- enum lsa_SidType type),
- enum winbindd_cmd orig_cmd,
- void *private_data)
-{
- struct winbindd_request request;
- struct winbindd_domain *domain;
- struct lookupname_state *s;
-
- domain = find_lookup_domain_from_name(dom_name);
- if (domain == NULL) {
- DEBUG(5, ("Could not find domain for name '%s'\n", dom_name));
- cont(private_data, False, NULL, SID_NAME_UNKNOWN);
- return;
- }
-
- ZERO_STRUCT(request);
- request.cmd = WINBINDD_LOOKUPNAME;
- request.original_cmd = orig_cmd;
- fstrcpy(request.data.name.dom_name, dom_name);
- fstrcpy(request.data.name.name, name);
-
- if ( (s = TALLOC_ZERO_P(mem_ctx, struct lookupname_state)) == NULL ) {
- DEBUG(0, ("winbindd_lookupname_async: talloc failed\n"));
- cont(private_data, False, NULL, SID_NAME_UNKNOWN);
- return;
- }
-
- s->dom_name = talloc_strdup( s, dom_name );
- s->name = talloc_strdup( s, name );
- if (!s->dom_name || !s->name) {
- cont(private_data, False, NULL, SID_NAME_UNKNOWN);
- return;
- }
-
- s->caller_private_data = private_data;
-
- do_async_domain(mem_ctx, domain, &request, lookupname_recv,
- (void *)cont, s);
-}
-
enum winbindd_result winbindd_dual_lookupname(struct winbindd_domain *domain,
struct winbindd_cli_state *state)
{
diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h
index 6cd1799d17..69ce15116c 100644
--- a/source3/winbindd/winbindd_proto.h
+++ b/source3/winbindd/winbindd_proto.h
@@ -90,13 +90,6 @@ void do_async(TALLOC_CTX *mem_ctx, struct winbindd_child *child,
void *c, void *private_data);
enum winbindd_result winbindd_dual_lookupsid(struct winbindd_domain *domain,
struct winbindd_cli_state *state);
-void winbindd_lookupname_async(TALLOC_CTX *mem_ctx,
- const char *dom_name, const char *name,
- void (*cont)(void *private_data, bool success,
- const DOM_SID *sid,
- enum lsa_SidType type),
- enum winbindd_cmd orig_cmd,
- void *private_data);
enum winbindd_result winbindd_dual_lookupname(struct winbindd_domain *domain,
struct winbindd_cli_state *state);
void winbindd_listent_async(TALLOC_CTX *mem_ctx,