diff options
-rw-r--r-- | lib/param/loadparm.c | 21 | ||||
-rw-r--r-- | source4/dns_server/dns_server.c | 5 |
2 files changed, 24 insertions, 2 deletions
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index bb59a79d0c..e3792b6195 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -1256,6 +1256,22 @@ static struct parm_struct parm_table[] = { .special = NULL, .enum_list = enum_dns_update_settings }, + { + .label = "dns forwarder", + .type = P_STRING, + .p_class = P_GLOBAL, + .offset = GLOBAL_VAR(dns_forwarder), + .special = NULL, + .enum_list = NULL + }, + { + .label = "dns recursive queries", + .type = P_BOOL, + .p_class = P_GLOBAL, + .offset = GLOBAL_VAR(dns_recursive_queries), + .special = NULL, + .enum_list = NULL + }, {NULL, P_BOOL, P_NONE, 0, NULL, NULL, 0} }; @@ -1536,7 +1552,10 @@ FN_GLOBAL_INTEGER(srv_minprotocol, srv_minprotocol) FN_GLOBAL_INTEGER(cli_maxprotocol, cli_maxprotocol) FN_GLOBAL_INTEGER(cli_minprotocol, cli_minprotocol) FN_GLOBAL_BOOL(paranoid_server_security, paranoid_server_security) + FN_GLOBAL_INTEGER(allow_dns_updates, allow_dns_updates) +FN_GLOBAL_CONST_STRING(dns_forwarder, dns_forwarder) +FN_GLOBAL_BOOL(dns_recursive_queries, dns_recursive_queries) FN_GLOBAL_INTEGER(server_signing, server_signing) FN_GLOBAL_INTEGER(client_signing, client_signing) @@ -3403,6 +3422,8 @@ 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", "False"); + 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++) { if (!(lp_ctx->flags[i] & FLAG_CMDLINE)) { diff --git a/source4/dns_server/dns_server.c b/source4/dns_server/dns_server.c index 9e88bd9ebf..789940ff94 100644 --- a/source4/dns_server/dns_server.c +++ b/source4/dns_server/dns_server.c @@ -139,8 +139,9 @@ static NTSTATUS dns_process(struct dns_server *dns, *out_packet = *in_packet; state->flags |= in_packet->operation | DNS_FLAG_REPLY; - /* TODO: Allow setting the forwarding in smb.conf or the like */ - state->flags |= DNS_FLAG_RECURSION_AVAIL; + if (lpcfg_dns_recursive_queries(dns->task->lp_ctx)) { + state->flags |= DNS_FLAG_RECURSION_AVAIL; + } switch (in_packet->operation & DNS_OPCODE) { case DNS_OPCODE_QUERY: |