From: Gary Lockyer Date: Wed, 11 Jul 2018 04:30:38 +0000 (+1200) Subject: smb.conf: add dns_zone_scavenging X-Git-Tag: tdb-1.3.16~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d871e0c84c761877563652558f44d8a3df4c49a3;p=thirdparty%2Fsamba.git smb.conf: add dns_zone_scavenging Add parameter dns_zone_scavenging to control dns zone scavenging. Scavenging is disabled by default, as due to https://bugzilla.samba.org/show_bug.cgi?id=12451 the ageing properties of existing DNS entries are incorrect. Signed-off-by: Gary Lockyer --- diff --git a/docs-xml/smbdotconf/domain/dnszonescavenging.xml b/docs-xml/smbdotconf/domain/dnszonescavenging.xml new file mode 100644 index 00000000000..80ec1445765 --- /dev/null +++ b/docs-xml/smbdotconf/domain/dnszonescavenging.xml @@ -0,0 +1,23 @@ + + + + When enabled (the default is disabled) unused dynamic dns records are + periodically removed. + + + This option should not be enabled for installations created with + versions of samba before 4.9. Doing this will result in the loss of + static DNS entries. This is due to a bug in previous versions + of samba (BUG 12451) which marked dynamic DNS records as static and + static records as dynamic. + + + If one record for a DNS name is static (non-aging) then no other record + for that DNS name will be scavenged. + + +no + diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index 75ee6685b72..1debcfff127 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -2778,6 +2778,7 @@ 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 zone scavenging", "False"); lpcfg_do_global_parameter(lp_ctx, "dns forwarder", ""); lpcfg_do_global_parameter(lp_ctx, "algorithmic rid base", "1000"); diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 5f646d63ce0..291ba57e0bb 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -895,6 +895,7 @@ static void init_globals(struct loadparm_context *lp_ctx, bool reinit_globals) Globals._preferred_master = Auto; Globals.allow_dns_updates = DNS_UPDATE_SIGNED; + Globals.dns_zone_scavenging = false; lpcfg_string_set(Globals.ctx, &Globals.ntp_signd_socket_directory, get_dyn_NTP_SIGND_SOCKET_DIR());