Bug 9599 - dns zonecreate creates zones without flags
Summary: dns zonecreate creates zones without flags
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: DNS server (show other bugs)
Version: 4.0.1
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-25 15:38 UTC by Björn Jacke
Modified: 2013-09-09 10:12 UTC (History)
3 users (show)

See Also:


Attachments
Pass additional flags when creating new zone (2.08 KB, patch)
2013-05-30 09:03 UTC, Amitay Isaacs
kai: review+
Details
Set secure update flag on zone in separate operation (2.76 KB, patch)
2013-05-30 09:04 UTC, Amitay Isaacs
kai: review+
Details
0001-samba-tool-dns-Set-secure-zone-update-flag-after-cre.patch (2.80 KB, patch)
2013-09-06 20:47 UTC, Björn Jacke
bjacke: review+
metze: review+
Details
0002-samba-tool-dns-Pass-on-additional-flags-when-creatin.patch (2.08 KB, patch)
2013-09-06 20:47 UTC, Björn Jacke
bjacke: review+
metze: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Jacke 2013-01-25 15:38:36 UTC
zones that are being created on a w2k8r2 server via samba-tool don't have any flags. In the following output you can see some zones on the server, the zones test.foo.lan and 3.2.1.in-addr.arpa have been created by "samba-tool dns zonecreate <server-ip> <zonename> -Uadministrator --client-version w2k" (--client-version w2k was required because the default made the server reply with WERR_INVALID_PARAM ...)

samba-tool dns zonelist 10.105.20.100 -Uadministrator
  5 zone(s) found

  pszZoneName                 : _msdcs.foo.lan
  Flags                       : DNS_RPC_ZONE_DSINTEGRATED DNS_RPC_ZONE_UPDATE_UNSECURE 
  ZoneType                    : DNS_ZONE_TYPE_PRIMARY
  Version                     : 50
  dwDpFlags                   : DNS_DP_AUTOCREATED DNS_DP_FOREST_DEFAULT DNS_DP_ENLISTED 
  pszDpFqdn                   : ForestDnsZones.foo.lan

  pszZoneName                 : 3.2.1.in-addr.arpa
  Flags                       : DNS_RPC_ZONE_REVERSE
  ZoneType                    : DNS_ZONE_TYPE_PRIMARY
  Version                     : 50
  dwDpFlags                   : NONE
  pszDpFqdn                   : None

  pszZoneName                 : 7.16.172.in-addr.arpa
  Flags                       : DNS_RPC_ZONE_REVERSE DNS_RPC_ZONE_DSINTEGRATED DNS_RPC_ZONE_UPDATE_SECURE
  ZoneType                    : DNS_ZONE_TYPE_PRIMARY
  Version                     : 50
  dwDpFlags                   : DNS_DP_AUTOCREATED DNS_DP_DOMAIN_DEFAULT DNS_DP_ENLISTED
  pszDpFqdn                   : DomainDnsZones.foo.lan

  pszZoneName                 : foo.lan
  Flags                       : DNS_RPC_ZONE_DSINTEGRATED DNS_RPC_ZONE_UPDATE_UNSECURE
  ZoneType                    : DNS_ZONE_TYPE_PRIMARY
  Version                     : 50
  dwDpFlags                   : DNS_DP_AUTOCREATED DNS_DP_DOMAIN_DEFAULT DNS_DP_ENLISTED
  pszDpFqdn                   : DomainDnsZones.foo.lan

  pszZoneName                 : created-on-win.foo.lan
  Flags                       : DNS_RPC_ZONE_DSINTEGRATED DNS_RPC_ZONE_UPDATE_SECURE
  ZoneType                    : DNS_ZONE_TYPE_PRIMARY
  Version                     : 50
  dwDpFlags                   : DNS_DP_AUTOCREATED DNS_DP_DOMAIN_DEFAULT DNS_DP_ENLISTED
  pszDpFqdn                   : DomainDnsZones.foo.lan

  pszZoneName                 : test.foo.lan
  Flags                       : NONE
  ZoneType                    : DNS_ZONE_TYPE_PRIMARY
  Version                     : 50
  dwDpFlags                   : NONE
  pszDpFqdn                   : None
Comment 1 Kai Blin 2013-05-25 10:04:40 UTC
dnsserver RPC issue.
Comment 2 Amitay Isaacs 2013-05-30 09:03:51 UTC
Created attachment 8932 [details]
Pass additional flags when creating new zone

commit c22eb103d865ed50a6c3ca89750245b92e17b493
Comment 3 Amitay Isaacs 2013-05-30 09:04:39 UTC
Created attachment 8933 [details]
Set secure update flag on zone in separate operation

commit 05578dcdbfa1734ae7bafb70859a76f4cd2a023d
Comment 4 Amitay Isaacs 2013-05-30 09:07:41 UTC
The two patches fix the problem of correctly creating zone with all client versions.
Comment 5 Kai Blin 2013-07-05 09:07:13 UTC
Looks good to me. Karolin, please pick these up for 4.0.next
Comment 6 Karolin Seeger 2013-07-08 10:00:46 UTC
(In reply to comment #5)
> Looks good to me. Karolin, please pick these up for 4.0.next

Need a second review first...
Comment 7 Björn Jacke 2013-07-09 10:29:37 UTC
it looks better now but I'm not sure it is entirely right now:

a zone created via samba-tool:

  pszZoneName                 : foo.faa
  Flags                       : DNS_RPC_ZONE_DSINTEGRATED DNS_RPC_ZONE_UPDATE_SECURE 
  ZoneType                    : DNS_ZONE_TYPE_PRIMARY
  Version                     : 50
  dwDpFlags                   : DNS_DP_LEGACY DNS_DP_ENLISTED 
  pszDpFqdn                   : MicrosoftDNS


a zone created in the w2k8r2 by GUI:

  pszZoneName                 : windows.test
  Flags                       : DNS_RPC_ZONE_DSINTEGRATED DNS_RPC_ZONE_UPDATE_SECURE 
  ZoneType                    : DNS_ZONE_TYPE_PRIMARY
  Version                     : 50
  dwDpFlags                   : DNS_DP_AUTOCREATED DNS_DP_DOMAIN_DEFAULT DNS_DP_ENLISTED
  pszDpFqdn                   : DomainDnsZones.my-ad-domain.private

1) the window zone has not DNS_DP_LEGACY but it has "DNS_DP_AUTOCREATED DNS_DP_DOMAIN_DEFAULT" instead. Don't know if this is right or not

2) the samba-tool created zone has dwDpFlags "MicrosoftDNS" instead of the DomainDnsZones.fqdn-of-the-domain

Amitay, Kai: this is intended?
Comment 8 Björn Jacke 2013-09-06 20:47:43 UTC
updated patches with cherry-pick information
Comment 9 Björn Jacke 2013-09-06 20:47:44 UTC
Created attachment 9197 [details]
0001-samba-tool-dns-Set-secure-zone-update-flag-after-cre.patch
Comment 10 Björn Jacke 2013-09-06 20:47:44 UTC
Created attachment 9198 [details]
0002-samba-tool-dns-Pass-on-additional-flags-when-creatin.patch
Comment 11 Björn Jacke 2013-09-06 20:52:22 UTC
Comment on attachment 9197 [details]
0001-samba-tool-dns-Set-secure-zone-update-flag-after-cre.patch

added review+ on behalf of metze.
Comment 12 Björn Jacke 2013-09-06 20:53:08 UTC
Karo please pick the two patches to 4.0. They are already in master and 4.1.
Comment 13 Karolin Seeger 2013-09-09 08:08:24 UTC
Pushed to autobuild-v4-0-test.
Comment 14 Karolin Seeger 2013-09-09 10:12:02 UTC
Pushed to v4-0-test.
Closing out bug report.

Thanks!