samba.tests.dns.__main__.TestZones.test_dns_tombstone_custom_match_rule_fail\(rodc:local\)
samba.tests.dns.__main__.TestZones.test_dynamic_record_static_update\(rodc:local\)
samba.tests.dns.__main__.TestZones.test_static_record_dynamic_update\(rodc:local\)
-samba.tests.dns.__main__.TestZones.test_fully_qualified_zone
+samba.tests.dns.__main__.TestZones.test_fully_qualified_zone\(rodc:local\)
samba.tests.dns.__main__.TestZones.test_set_aging\(vampire_dc:local\)
samba.tests.dns.__main__.TestZones.test_aging_update\(vampire_dc:local\)
} else if (strcasecmp(operation, "ZoneCreate") == 0) {
struct dnsserver_zone *z, *z2;
WERROR status;
+ int len;
z = talloc_zero(mem_ctx, struct dnsserver_zone);
W_ERROR_HAVE_NO_MEMORY(z);
W_ERROR_HAVE_NO_MEMORY_AND_FREE(z->zoneinfo, z);
if (typeid == DNSSRV_TYPEID_ZONE_CREATE_W2K) {
- z->name = talloc_strdup(z, r->ZoneCreateW2K->pszZoneName);
+ len = strlen(r->ZoneCreateW2K->pszZoneName);
+ if (r->ZoneCreateW2K->pszZoneName[len-1] == '.') {
+ len -= 1;
+ }
+ z->name = talloc_strndup(z, r->ZoneCreateW2K->pszZoneName, len);
z->zoneinfo->dwZoneType = r->ZoneCreateW2K->dwZoneType;
z->zoneinfo->fAllowUpdate = r->ZoneCreateW2K->fAllowUpdate;
z->zoneinfo->fAging = r->ZoneCreateW2K->fAging;
z->zoneinfo->Flags = r->ZoneCreateW2K->dwFlags;
} else if (typeid == DNSSRV_TYPEID_ZONE_CREATE_DOTNET) {
- z->name = talloc_strdup(z, r->ZoneCreateDotNet->pszZoneName);
+ len = strlen(r->ZoneCreateDotNet->pszZoneName);
+ if (r->ZoneCreateDotNet->pszZoneName[len-1] == '.') {
+ len -= 1;
+ }
+ z->name = talloc_strndup(z, r->ZoneCreateDotNet->pszZoneName, len);
z->zoneinfo->dwZoneType = r->ZoneCreateDotNet->dwZoneType;
z->zoneinfo->fAllowUpdate = r->ZoneCreateDotNet->fAllowUpdate;
z->zoneinfo->fAging = r->ZoneCreateDotNet->fAging;
z->zoneinfo->Flags = r->ZoneCreateDotNet->dwFlags;
z->partition->dwDpFlags = r->ZoneCreateDotNet->dwDpFlags;
} else if (typeid == DNSSRV_TYPEID_ZONE_CREATE) {
- z->name = talloc_strdup(z, r->ZoneCreate->pszZoneName);
+ len = strlen(r->ZoneCreate->pszZoneName);
+ if (r->ZoneCreate->pszZoneName[len-1] == '.') {
+ len -= 1;
+ }
+ z->name = talloc_strndup(z, r->ZoneCreate->pszZoneName, len);
z->zoneinfo->dwZoneType = r->ZoneCreate->dwZoneType;
z->zoneinfo->fAllowUpdate = r->ZoneCreate->fAllowUpdate;
z->zoneinfo->fAging = r->ZoneCreate->fAging;
#include "includes.h"
#include "dnsserver.h"
#include "rpc_server/common/common.h"
+#include "dns_server/dnsserver_common.h"
#include "dsdb/samdb/samdb.h"
#include "lib/socket/netif.h"
#include "lib/util/util_net.h"
struct dnsserver_zone *z = NULL;
for (z = zones; z; z = z->next) {
- if (strcasecmp(zone_name, z->name) == 0) {
+ if (dns_name_equal(zone_name, z->name)) {
break;
}
}