wb-ndr: remove unused WINBINDD_LOOKUPRIDS (dual) support
authorStefan Metzmacher <metze@sernet.de>
Tue, 29 Jan 2008 08:53:50 +0000 (09:53 +0100)
committerStefan Metzmacher <metze@sernet.de>
Fri, 2 May 2008 14:13:23 +0000 (16:13 +0200)
metze

source/winbindd/winbindd_async.c
source/winbindd/winbindd_domain.c

index 779831aeedb4ceca57ddfff6b0d593be8ad6654f..9f4142990e384f0aff7f897b5cda24ddba567479 100644 (file)
@@ -681,67 +681,6 @@ bool parse_ridlist(TALLOC_CTX *mem_ctx, char *ridstr,
        return True;
 }
 
-enum winbindd_result winbindd_dual_lookuprids(struct winbindd_domain *domain,
-                                             struct winbindd_cli_state *state)
-{
-       uint32 *rids = NULL;
-       size_t i, buflen, num_rids = 0;
-       ssize_t len;
-       DOM_SID domain_sid;
-       char *domain_name;
-       char **names;
-       enum lsa_SidType *types;
-       NTSTATUS status;
-       char *result;
-
-       DEBUG(10, ("Looking up RIDs for domain %s (%s)\n",
-                  state->request.domain_name,
-                  state->request.data.sid));
-
-       if (!parse_ridlist(state->mem_ctx, state->request.extra_data.data,
-                          &rids, &num_rids)) {
-               DEBUG(5, ("Could not parse ridlist\n"));
-               return WINBINDD_ERROR;
-       }
-
-       if (!string_to_sid(&domain_sid, state->request.data.sid)) {
-               DEBUG(5, ("Could not parse domain sid %s\n",
-                         state->request.data.sid));
-               return WINBINDD_ERROR;
-       }
-
-       status = domain->methods->rids_to_names(domain, state->mem_ctx,
-                                               &domain_sid, rids, num_rids,
-                                               &domain_name,
-                                               &names, &types);
-
-       if (!NT_STATUS_IS_OK(status) &&
-           !NT_STATUS_EQUAL(status, STATUS_SOME_UNMAPPED)) {
-               return WINBINDD_ERROR;
-       }
-
-       len = 0;
-       buflen = 0;
-       result = NULL;
-
-       for (i=0; i<num_rids; i++) {
-               sprintf_append(state->mem_ctx, &result, &len, &buflen,
-                              "%d %s\n", types[i], names[i]);
-       }
-
-       fstrcpy(state->response.data.domain_name, domain_name);
-
-       if (result != NULL) {
-               state->response.extra_data.data = SMB_STRDUP(result);
-               if (!state->response.extra_data.data) {
-                       return WINBINDD_ERROR;
-               }
-               state->response.length += len+1;
-       }
-
-       return WINBINDD_OK;
-}
-
 static void winbindd_lookup_recv(TALLOC_CTX *mem_ctx, bool success,
                                 struct winbindd_ndr_call *c,
                                 void *_r,
index bfd5d10a181d94783d32fdc02e9f2abe78af1b7e..7f346e79d4520c39ae8e28d4cc440a3615ca002a 100644 (file)
@@ -38,10 +38,6 @@ void setup_domain_child(struct winbindd_domain *domain,
 
 static const struct winbindd_child_dispatch_table domain_dispatch_table[] = {
        {
-               .name           = "LOOKUPRIDS",
-               .struct_cmd     = WINBINDD_LOOKUPRIDS,
-               .struct_fn      = winbindd_dual_lookuprids,
-       },{
                .name           = "NDR_WINBIND_LOOKUP",
                .ndr_opnum      = NDR_WINBIND_LOOKUP,
                .ndr_fn         = winbindd_ndr_domain_child_lookup,