summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-01-13 11:10:27 +1100
committerAndrew Tridgell <tridge@samba.org>2011-01-14 16:39:32 +1100
commit74493af86f953d209c57649178421929e8061c99 (patch)
tree95821c9ecb9a417b6a5c4f79ab0bca4eb7c63c1c
parent27d7f6a31203c6ab3c5b1e3d667fc1c4c79d334f (diff)
downloadsamba-74493af86f953d209c57649178421929e8061c99.tar.gz
samba-74493af86f953d209c57649178421929e8061c99.tar.bz2
samba-74493af86f953d209c57649178421929e8061c99.zip
s4-dns: renamed DNS_TYPE_ZERO to DNS_TYPE_TOMBSTONE
we now know that these are tombstone records, with a timestamp Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--librpc/idl/dnsp.idl3
-rw-r--r--source4/dns_server/dlz_bind9.c10
2 files changed, 7 insertions, 6 deletions
diff --git a/librpc/idl/dnsp.idl b/librpc/idl/dnsp.idl
index 495a3e2af2..f8cf1d43be 100644
--- a/librpc/idl/dnsp.idl
+++ b/librpc/idl/dnsp.idl
@@ -24,7 +24,7 @@ import "misc.idl";
interface dnsp
{
typedef [enum16bit] enum {
- DNS_TYPE_ZERO = 0x0,
+ DNS_TYPE_TOMBSTONE = 0x0,
DNS_TYPE_A = 0x1,
DNS_TYPE_NS = 0x2,
DNS_TYPE_MD = 0x3,
@@ -109,6 +109,7 @@ interface dnsp
} dnsp_srv;
typedef [nodiscriminant,gensize] union {
+ [case(DNS_TYPE_TOMBSTONE)] NTTIME timestamp;
[case(DNS_TYPE_A)] [flag(NDR_BIG_ENDIAN)] ipv4address ipv4;
[case(DNS_TYPE_NS)] dnsp_name ns;
[case(DNS_TYPE_CNAME)] dnsp_name cname;
diff --git a/source4/dns_server/dlz_bind9.c b/source4/dns_server/dlz_bind9.c
index d2fa81aee2..7dd06c1b2c 100644
--- a/source4/dns_server/dlz_bind9.c
+++ b/source4/dns_server/dlz_bind9.c
@@ -220,15 +220,16 @@ static bool b9_single_valued(enum dns_record_type dns_type)
/*
see if a DNS type is single valued
*/
-static enum dns_record_type b9_dns_type(const char *type)
+static bool b9_dns_type(const char *type, enum dns_record_type *dtype)
{
int i;
for (i=0; i<ARRAY_SIZE(dns_typemap); i++) {
if (strcasecmp(dns_typemap[i].typestr, type) == 0) {
- return dns_typemap[i].dns_type;
+ *dtype = dns_typemap[i].dns_type;
+ return true;
}
}
- return DNS_TYPE_ZERO;
+ return false;
}
@@ -1410,8 +1411,7 @@ _PUBLIC_ isc_result_t dlz_delrdataset(const char *name, const char *type, void *
return ISC_R_FAILURE;
}
- dns_type = b9_dns_type(type);
- if (dns_type == DNS_TYPE_ZERO) {
+ if (!b9_dns_type(type, &dns_type)) {
state->log(ISC_LOG_INFO, "samba_dlz: bad dns type %s in delete", type);
return ISC_R_FAILURE;
}