s4-libcli Remove resolve_name() as it conflicts with Samba3.
authorAndrew Bartlett <abartlet@samba.org>
Mon, 2 May 2011 06:36:48 +0000 (16:36 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 3 May 2011 05:37:07 +0000 (07:37 +0200)
This was just a wrapper around resolve_name_ex(), so just call that
instead.

Andrew Bartlett

libcli/echo/tests/echo.c
source4/libcli/raw/clisocket.c
source4/libcli/resolve/resolve.c
source4/libnet/libnet_site.c
source4/torture/drs/rpc/dssync.c
source4/torture/ldap/cldapbench.c
source4/torture/libnet/libnet_BecomeDC.c
source4/torture/nbt/dgram.c
source4/torture/nbt/nbt.c

index c47b7d0d0fcc6edb2f284db13294d3c9c825613c..6424c8100163544c57a53c8ec2ace1ded49392a0 100644 (file)
@@ -64,8 +64,10 @@ static bool torture_echo_udp(struct torture_context *tctx)
 
        make_nbt_name_server(&name,
                             torture_setting_string(tctx, "host", NULL));
-       status = resolve_name(lpcfg_resolve_context(tctx->lp_ctx), &name, tctx,
-                             &address, tctx->ev);
+       status = resolve_name_ex(lpcfg_resolve_context(tctx->lp_ctx),
+                                0, 0,
+                                &name, tctx,
+                                &address, tctx->ev);
        if (!NT_STATUS_IS_OK(status)) {
                printf("Failed to resolve %s - %s\n", name.name,
                       nt_errstr(status));
index 84bf250f6a1f1dba082c7836394a65d2a5a5a6d5..bf608f1ec1576c090da8b8838a3ce23e01fdeda6 100644 (file)
@@ -229,7 +229,7 @@ _PUBLIC_ struct smbcli_socket *smbcli_sock_connect_byname(const char *host, cons
 
        make_nbt_name(&nbt_name, host, name_type);
        
-       status = resolve_name(resolve_ctx, &nbt_name, tmp_ctx, &address, event_ctx);
+       status = resolve_name_ex(resolve_ctx, 0, 0, &nbt_name, tmp_ctx, &address, event_ctx);
        if (!NT_STATUS_IS_OK(status)) {
                talloc_free(tmp_ctx);
                return NULL;
index c17e93a1f65aa9d0183d03738fc3785118a65e09..ef61c38f79ff24a445beb0ecf8aabde9428c91ce 100644 (file)
@@ -316,18 +316,6 @@ NTSTATUS resolve_name_ex(struct resolve_context *ctx,
 }
 
 
-/*
-  general name resolution - sync call
- */
-NTSTATUS resolve_name(struct resolve_context *ctx,
-                     struct nbt_name *name,
-                     TALLOC_CTX *mem_ctx,
-                     const char **reply_addr,
-                     struct tevent_context *ev)
-{
-       return resolve_name_ex(ctx, 0, 0, name, mem_ctx, reply_addr, ev);
-}
-
 /* Initialise a struct nbt_name with a NULL scope */
 
 void make_nbt_name(struct nbt_name *nbt, const char *name, int type)
index 9bfca74a368544d7810d8c0ff09ad28b6c7072fe..f49108b28a96dcf7ac6571cbef254e6bda06bea1 100644 (file)
@@ -168,7 +168,9 @@ NTSTATUS libnet_JoinSite(struct libnet_context *ctx,
        }
 
        make_nbt_name_client(&name, libnet_r->out.samr_binding->host);
-       status = resolve_name(lpcfg_resolve_context(ctx->lp_ctx), &name, r, &dest_addr, ctx->event_ctx);
+       status = resolve_name_ex(lpcfg_resolve_context(ctx->lp_ctx),
+                                0, 0,
+                                &name, r, &dest_addr, ctx->event_ctx);
        if (!NT_STATUS_IS_OK(status)) {
                libnet_r->out.error_string = NULL;
                talloc_free(tmp_ctx);
index 2ec3ded28775fc365a93dcbc22d84bdd0ff73d8f..733e55ded507142ea491b9ff3a4cfe4c339efad2 100644 (file)
@@ -105,8 +105,9 @@ static struct DsSyncTest *test_create_context(struct torture_context *tctx)
        make_nbt_name_server(&name, ctx->drsuapi_binding->host);
 
        /* do an initial name resolution to find its IP */
-       status = resolve_name(lpcfg_resolve_context(tctx->lp_ctx), &name, tctx,
-                             &ctx->dest_address, tctx->ev);
+       status = resolve_name_ex(lpcfg_resolve_context(tctx->lp_ctx),
+                                0, 0, &name, tctx,
+                                &ctx->dest_address, tctx->ev);
        if (!NT_STATUS_IS_OK(status)) {
                printf("Failed to resolve %s - %s\n",
                       name.name, nt_errstr(status));
index 5c7e56f40bd13a2edc54b7ef5f0c06e4385a0dec..7d02a2580b10ceea454527a954a3cae5dce03a6c 100644 (file)
@@ -215,7 +215,8 @@ bool torture_bench_cldap(struct torture_context *torture)
        make_nbt_name_server(&name, torture_setting_string(torture, "host", NULL));
 
        /* do an initial name resolution to find its IP */
-       status = resolve_name(lpcfg_resolve_context(torture->lp_ctx), &name, torture, &address, torture->ev);
+       status = resolve_name_ex(lpcfg_resolve_context(torture->lp_ctx),
+                                0, 0, &name, torture, &address, torture->ev);
        if (!NT_STATUS_IS_OK(status)) {
                printf("Failed to resolve %s - %s\n",
                       name.name, nt_errstr(status));
index 0fbad00d7b89cbcce3e581a5d740d42053d48635..b532e071c77ee180fcbbe9bd7ccfcba53e90b10b 100644 (file)
@@ -67,8 +67,9 @@ bool torture_net_become_dc(struct torture_context *torture)
        make_nbt_name_server(&name, torture_setting_string(torture, "host", NULL));
 
        /* do an initial name resolution to find its IP */
-       status = resolve_name(lpcfg_resolve_context(torture->lp_ctx),
-                             &name, torture, &address, torture->ev);
+       status = resolve_name_ex(lpcfg_resolve_context(torture->lp_ctx),
+                                0, 0,
+                                &name, torture, &address, torture->ev);
        torture_assert_ntstatus_ok(torture, status, talloc_asprintf(torture,
                                   "Failed to resolve %s - %s\n",
                                   name.name, nt_errstr(status)));
index 36914bdcc36a87c3a7e8942c34264918313332b2..7306c54deb110b3ca3fd5168ed1d932d054a8c2f 100644 (file)
@@ -86,7 +86,9 @@ static bool nbt_test_netlogon(struct torture_context *tctx)
 
        /* do an initial name resolution to find its IP */
        torture_assert_ntstatus_ok(tctx, 
-                                  resolve_name(lpcfg_resolve_context(tctx->lp_ctx), &name, tctx, &address, tctx->ev),
+                                  resolve_name_ex(lpcfg_resolve_context(tctx->lp_ctx),
+                                                  0, 0,
+                                                  &name, tctx, &address, tctx->ev),
                                   talloc_asprintf(tctx, "Failed to resolve %s", name.name));
 
        load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
@@ -180,7 +182,9 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
 
        /* do an initial name resolution to find its IP */
        torture_assert_ntstatus_ok(tctx, 
-                                  resolve_name(lpcfg_resolve_context(tctx->lp_ctx), &name, tctx, &address, tctx->ev),
+                                  resolve_name_ex(lpcfg_resolve_context(tctx->lp_ctx),
+                                                  0, 0,
+                                                  &name, tctx, &address, tctx->ev),
                                   talloc_asprintf(tctx, "Failed to resolve %s", name.name));
 
        load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
@@ -450,7 +454,8 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
 
        /* do an initial name resolution to find its IP */
        torture_assert_ntstatus_ok(tctx, 
-                                  resolve_name(lpcfg_resolve_context(tctx->lp_ctx), &name, tctx, &address, tctx->ev),
+                                  resolve_name_ex(lpcfg_resolve_context(tctx->lp_ctx),
+                                                  0, 0, &name, tctx, &address, tctx->ev),
                                   talloc_asprintf(tctx, "Failed to resolve %s", name.name));
 
        load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
index 7c45f867e7424aaa1bba4f48e94caeacf1094088..1b7fe49cf84d100e0709863a63e3301dad170209 100644 (file)
@@ -39,7 +39,9 @@ bool torture_nbt_get_name(struct torture_context *tctx,
 
        /* do an initial name resolution to find its IP */
        torture_assert_ntstatus_ok(tctx, 
-                                  resolve_name(lpcfg_resolve_context(tctx->lp_ctx), name, tctx, address, tctx->ev),
+                                  resolve_name_ex(lpcfg_resolve_context(tctx->lp_ctx),
+                                                  0, 0,
+                                                  name, tctx, address, tctx->ev),
                                   talloc_asprintf(tctx, 
                                                   "Failed to resolve %s", name->name));