samba-tool dns add 172.31.9.161 s4xdom.base . NS mydns.org. gives a no memory error, while samba-tool dns add 172.31.9.161 s4xdom.base @ NS mydns.org. works fine. A Windows server allows both. dns_split_node_name() return NULL for node_name == '.' called from dnsserver_update_record() /* If node_name is @ or zone name, dns record is @ */ if (strcmp(node_name, "@") == 0 || strcasecmp(node_name, z->name) == 0) { name = talloc_strdup(tmp_ctx, "@"); } else { name = dns_split_node_name(tmp_ctx, node_name, z->name); } W_ERROR_HAVE_NO_MEMORY_AND_FREE(name, tmp_ctx); Maybe we should have an additional strcmp(node_name, '.') == 0 for the name = talloc_strdup(tmp_ctx, "@") case.
Yes, that's the correct fix. I will add the patches for fix and new test.
Created attachment 10155 [details] Code fix
Created attachment 10156 [details] New test
Added two patches -- code fix and new test.
Created attachment 10157 [details] Patches for v4-1-test
Created attachment 10158 [details] Patches for v4-0-test
Pushed to autobuild-v4-[0|1]-test.
(In reply to comment #7) > Pushed to autobuild-v4-[0|1]-test. Pushed to both branches. Closing out bug report. Thanks!