s3: Remove unused winbindd_dual_lookupname
authorVolker Lendecke <vl@samba.org>
Mon, 21 Dec 2009 13:55:02 +0000 (14:55 +0100)
committerVolker Lendecke <vl@samba.org>
Mon, 21 Dec 2009 15:27:19 +0000 (16:27 +0100)
source3/winbindd/winbindd_async.c
source3/winbindd/winbindd_domain.c
source3/winbindd/winbindd_proto.h

index 459fbb348a05decd60050340e4edbfe2dfa0a8a8..5a350b99bc3d70c0f261247957cca0bd9dc68cbc 100644 (file)
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND
 
-enum winbindd_result winbindd_dual_lookupname(struct winbindd_domain *domain,
-                                             struct winbindd_cli_state *state)
-{
-       enum lsa_SidType type;
-       char *name_domain, *name_user;
-       DOM_SID sid;
-       char *p;
-
-       /* Ensure null termination */
-       state->request->data.name.dom_name[sizeof(state->request->data.name.dom_name)-1]='\0';
-
-       /* Ensure null termination */
-       state->request->data.name.name[sizeof(state->request->data.name.name)-1]='\0';
-
-       /* cope with the name being a fully qualified name */
-       p = strstr(state->request->data.name.name, lp_winbind_separator());
-       if (p) {
-               *p = 0;
-               name_domain = state->request->data.name.name;
-               name_user = p+1;
-       } else {
-               name_domain = state->request->data.name.dom_name;
-               name_user = state->request->data.name.name;
-       }
-
-       DEBUG(3, ("[%5lu]: lookupname %s%s%s\n", (unsigned long)state->pid,
-                 name_domain, lp_winbind_separator(), name_user));
-
-       /* Lookup name from DC using lsa_lookup_names() */
-       if (!winbindd_lookup_sid_by_name(state->mem_ctx, state->request->original_cmd, domain, name_domain,
-                                        name_user, &sid, &type)) {
-               return WINBINDD_ERROR;
-       }
-
-       sid_to_fstring(state->response->data.sid.sid, &sid);
-       state->response->data.sid.type = type;
-
-       return WINBINDD_OK;
-}
-
 bool print_sidlist(TALLOC_CTX *mem_ctx, const DOM_SID *sids,
                   size_t num_sids, char **result, ssize_t *len)
 {
index 3c1dc0661534343d91821ed30e38cc289a1b7f2c..304761f4842890de0343da77ae899f3fc8580222 100644 (file)
@@ -30,10 +30,6 @@ static const struct winbindd_child_dispatch_table domain_dispatch_table[] = {
                .name           = "PING",
                .struct_cmd     = WINBINDD_PING,
                .struct_fn      = winbindd_dual_ping,
-       },{
-               .name           = "LOOKUPNAME",
-               .struct_cmd     = WINBINDD_LOOKUPNAME,
-               .struct_fn      = winbindd_dual_lookupname,
        },{
                .name           = "LIST_TRUSTDOM",
                .struct_cmd     = WINBINDD_LIST_TRUSTDOM,
index cb156cd152a2163ca8b5edd1a576b567b4881046..5f99d8ebbab66df27a90c13fae5828eb0c01b533 100644 (file)
@@ -82,8 +82,6 @@ NTSTATUS winbindd_lookup_names(TALLOC_CTX *mem_ctx,
 
 /* The following definitions come from winbindd/winbindd_async.c  */
 
-enum winbindd_result winbindd_dual_lookupname(struct winbindd_domain *domain,
-                                             struct winbindd_cli_state *state);
 void winbindd_listent_async(TALLOC_CTX *mem_ctx,
                               struct winbindd_domain *domain,
                               void (*cont)(void *private_data, bool success,