dns_server: Remove parameter 'dns recursive queries' and base this on 'dns forwarder'
authorAndrew Bartlett <abartlet@samba.org>
Wed, 12 Sep 2012 08:07:58 +0000 (18:07 +1000)
committerStefan Metzmacher <metze@samba.org>
Wed, 12 Sep 2012 14:51:29 +0000 (16:51 +0200)
This simplifies a very common configuration.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
lib/param/loadparm.c
lib/param/param_functions.c
lib/param/param_table.c
source4/dns_server/dns_server.c

index 277a92124b345a01026f42a0d863301475021c07..990dd294b9114de1c0b2df5dfc8b53e28aa911cf 100644 (file)
@@ -2215,7 +2215,6 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
        lpcfg_do_global_parameter(lp_ctx, "nsupdate command", "/usr/bin/nsupdate -g");
 
         lpcfg_do_global_parameter(lp_ctx, "allow dns updates", "secure only");
-        lpcfg_do_global_parameter(lp_ctx, "dns recursive queries", "False");
         lpcfg_do_global_parameter(lp_ctx, "dns forwarder", "");
 
        for (i = 0; parm_table[i].label; i++) {
index bf6863e76d564b04e7a44adf74b1ab4defa4fc58..ce2f671d73889da6a92f94a0789eb1f639f2182a 100644 (file)
@@ -179,7 +179,6 @@ FN_GLOBAL_BOOL(defer_sharing_violations, bDeferSharingViolations)
 FN_GLOBAL_BOOL(disable_netbios, bDisableNetbios)
 FN_GLOBAL_BOOL(_disable_spoolss, bDisableSpoolss)
 FN_GLOBAL_BOOL(_domain_logons, bDomainLogons)
-FN_GLOBAL_BOOL(dns_recursive_queries, dns_recursive_queries)
 FN_GLOBAL_BOOL(enable_asu_support, bASUSupport)
 FN_GLOBAL_BOOL(enable_core_files, bEnableCoreFiles)
 FN_GLOBAL_BOOL(enable_privileges, bEnablePrivileges)
index cb9596c5f7dc253b8627dac913305cf2ed2b58a0..325f2953423dcef9fe16e3e69ce38aa7f30e3b01 100644 (file)
@@ -4260,14 +4260,6 @@ static struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED,
        },
-       {
-               .label          = "dns recursive queries",
-               .type           = P_BOOL,
-               .p_class        = P_GLOBAL,
-               .offset         = GLOBAL_VAR(dns_recursive_queries),
-               .special        = NULL,
-               .enum_list      = NULL
-       },
        {
                .label          = "dns update command",
                .type           = P_CMDLIST,
index be1fecc008cda6e2338797a60886ab428baeb3bb..c88ea83f3f90ec19c00a318eba70e239cb2b1cf6 100644 (file)
@@ -117,7 +117,7 @@ static struct tevent_req *dns_process_send(TALLOC_CTX *mem_ctx,
        struct dns_process_state *state;
        enum ndr_err_code ndr_err;
        WERROR ret;
-
+       const char *forwarder = lpcfg_dns_forwarder(dns->task->lp_ctx);
        req = tevent_req_create(mem_ctx, &state, struct dns_process_state);
        if (req == NULL) {
                return NULL;
@@ -156,7 +156,8 @@ static struct tevent_req *dns_process_send(TALLOC_CTX *mem_ctx,
        state->state.flags = state->in_packet.operation;
        state->state.flags |= DNS_FLAG_REPLY;
 
-       if (lpcfg_dns_recursive_queries(dns->task->lp_ctx)) {
+       
+       if (forwarder && *forwarder) {
                state->state.flags |= DNS_FLAG_RECURSION_AVAIL;
        }