If you call samba_dnsupdate with a --configfile option, this wasn't
passed through to the samba-tool commands the script tries to run.
Normally, samba_dnsupdate would only be run on the DC itself, so it
shouldn't be a big deal, however, this may be a problem if you install
the samba database into a non-default location (i.e. not
/usr/local/samba).
This patch passes through the smb.conf file, if one was specified.
Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
else:
IP4s.append(i)
+smb_conf = sambaopts.get_loadparm_path()
if opts.verbose:
print("IPs: %s" % IPs)
if d.type == "NS":
args = [rpc_server_ip, zone, short_name, "NS", d.dest]
+ if smb_conf and args:
+ args += ["--configfile=" + smb_conf]
+
global error_count
try:
cmd = cmd_dns()