summaryrefslogtreecommitdiff
path: root/source4/dns_server/dns_update.c
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2010-10-03 00:40:32 +0200
committerKai Blin <kai@samba.org>2010-10-23 10:17:06 +0000
commit005a65660d1d5a39cccdabca1970b7e56537df17 (patch)
tree1a978cef2485dd981f6f886675c3882456711bae /source4/dns_server/dns_update.c
parent1e670dff6a0b9b5e42849817deb3c79e4ea30f57 (diff)
downloadsamba-005a65660d1d5a39cccdabca1970b7e56537df17.tar.gz
s4 dns: Add stub checking if updates are allowed
Diffstat (limited to 'source4/dns_server/dns_update.c')
-rw-r--r--source4/dns_server/dns_update.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/dns_server/dns_update.c b/source4/dns_server/dns_update.c
index 72944730a6f..81e3fce5997 100644
--- a/source4/dns_server/dns_update.c
+++ b/source4/dns_server/dns_update.c
@@ -101,7 +101,8 @@ WERROR dns_server_process_update(struct dns_server *dns,
struct dns_name_question *zone;
const struct dns_server_zone *z;
size_t host_part_len = 0;
- WERROR werror = WERR_DNS_ERROR_RCODE_NOT_IMPLEMENTED;
+ WERROR werror = DNS_ERR(NOT_IMPLEMENTED);
+ bool update_allowed = false;
if (in->qdcount != 1) {
return DNS_ERR(FORMAT_ERROR);
@@ -136,5 +137,12 @@ WERROR dns_server_process_update(struct dns_server *dns,
werror = check_prerequsites(dns, mem_ctx, in, prereqs, prereq_count);
W_ERROR_NOT_OK_RETURN(werror);
+ /* TODO: Check if update is allowed, we probably want "always",
+ * key-based GSSAPI, key-based bind-style TSIG and "never" as
+ * smb.conf options. */
+ if (!update_allowed) {
+ return DNS_ERR(REFUSED);
+ }
+
return werror;
}