wb-ndr: remove unused WINBINDD_DUAL_DSGETDCNAME support
authorStefan Metzmacher <metze@sernet.de>
Fri, 7 Dec 2007 23:26:34 +0000 (00:26 +0100)
committerStefan Metzmacher <metze@sernet.de>
Fri, 2 May 2008 14:12:34 +0000 (16:12 +0200)
metze

source/winbindd/winbindd_locator.c

index 25314c16588050a60b51dab1948d11edabffa7dc..009fd64421533cd69f068b16c3bbcf9b842a33bc 100644 (file)
@@ -87,46 +87,6 @@ nomem:
        return;
 }
 
-static enum winbindd_result dual_dsgetdcname(struct winbindd_domain *domain,
-                                            struct winbindd_cli_state *state)
-{
-       NTSTATUS result;
-       struct netr_DsRGetDCNameInfo *info = NULL;
-       const char *dc = NULL;
-
-       state->request.domain_name
-               [sizeof(state->request.domain_name)-1] = '\0';
-
-       DEBUG(3, ("[%5lu]: dsgetdcname for %s\n", (unsigned long)state->pid,
-                 state->request.domain_name));
-
-       result = dsgetdcname(state->mem_ctx, state->request.domain_name,
-                            NULL, NULL, state->request.flags, &info);
-
-       if (!NT_STATUS_IS_OK(result)) {
-               return WINBINDD_ERROR;
-       }
-
-       if (info->dc_address) {
-               dc = info->dc_address;
-               if ((dc[0] == '\\') && (dc[1] == '\\')) {
-                       dc += 2;
-               }
-       }
-
-       if ((!dc || !is_ipaddress_v4(dc)) && info->dc_unc) {
-               dc = info->dc_unc;
-       }
-
-       if (!dc || !*dc) {
-               return WINBINDD_ERROR;
-       }
-
-       fstrcpy(state->response.data.dc_name, dc);
-
-       return WINBINDD_OK;
-}
-
 static void ndr_child_get_dc_info_comapt_ds(struct winbindd_domain *domain,
                                            struct winbindd_cli_state *state,
                                            struct winbind_get_dc_info *r)
@@ -196,10 +156,6 @@ void winbindd_ndr_locator_child_get_dc_info(struct winbindd_domain *domain,
 
 static const struct winbindd_child_dispatch_table locator_dispatch_table[] = {
        {
-               .name           = "DSGETDCNAME",
-               .struct_cmd     = WINBINDD_DSGETDCNAME,
-               .struct_fn      = dual_dsgetdcname,
-       },{
                .name           = "NDR_WINBIND_GET_DC_INFO",
                .ndr_opnum      = NDR_WINBIND_GET_DC_INFO,
                .ndr_fn         = winbindd_ndr_locator_child_get_dc_info,