mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
librpc/idl: dnsp tombstone timestamp name matches MS-DNSP
MS-DNSP uses the term "EntombedTime" in e.g. "2.2.2.2.4.23 DNS_RPC_RECORD_TS" which is more descriptive than the generic "timestamp", and less likely to be confused with dwTimestamp, which has been our curse. Let's make it grep-able, google-able, and evocative. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
5f4b739011
commit
162e6fb25a
@ -200,7 +200,7 @@ interface dnsp
|
||||
} dnsp_string_list;
|
||||
|
||||
typedef [nodiscriminant,gensize] union {
|
||||
[case(DNS_TYPE_TOMBSTONE)] NTTIME timestamp;
|
||||
[case(DNS_TYPE_TOMBSTONE)] NTTIME EntombedTime;
|
||||
[case(DNS_TYPE_A)] [flag(NDR_BIG_ENDIAN)] ipv4address ipv4;
|
||||
[case(DNS_TYPE_NS)] dnsp_name ns;
|
||||
[case(DNS_TYPE_CNAME)] dnsp_name cname;
|
||||
|
@ -118,7 +118,7 @@ import "misc.idl", "dnsp.idl";
|
||||
DNS_RPC_RECORD_SRV;
|
||||
|
||||
typedef [nodiscriminant,gensize,flag(NDR_NOALIGN)] union {
|
||||
[case(DNS_TYPE_TOMBSTONE)] NTTIME timestamp;
|
||||
[case(DNS_TYPE_TOMBSTONE)] NTTIME EntombedTime;
|
||||
[case(DNS_TYPE_A)] [flag(NDR_BIG_ENDIAN)] ipv4address ipv4;
|
||||
[case(DNS_TYPE_NS)] DNS_RPC_NAME name;
|
||||
[case(DNS_TYPE_MD)] DNS_RPC_NAME name;
|
||||
|
@ -214,7 +214,7 @@ WERROR dns_common_lookup(struct ldb_context *samdb,
|
||||
* a tombstone, this will be used
|
||||
* in dns_common_replace()
|
||||
*/
|
||||
.data.timestamp = 1,
|
||||
.data.EntombedTime = 1,
|
||||
};
|
||||
|
||||
*tombstoned = true;
|
||||
@ -1008,7 +1008,7 @@ WERROR dns_common_replace(struct ldb_context *samdb,
|
||||
enum ndr_err_code ndr_err;
|
||||
|
||||
if (records[i].wType == DNS_TYPE_TOMBSTONE) {
|
||||
if (records[i].data.timestamp != 0) {
|
||||
if (records[i].data.EntombedTime != 0) {
|
||||
was_tombstoned = true;
|
||||
}
|
||||
continue;
|
||||
@ -1074,7 +1074,7 @@ WERROR dns_common_replace(struct ldb_context *samdb,
|
||||
tbs = (struct dnsp_DnssrvRpcRecord) {
|
||||
.wType = DNS_TYPE_TOMBSTONE,
|
||||
.dwSerial = serial,
|
||||
.data.timestamp = timeval_to_nttime(&tv),
|
||||
.data.EntombedTime = timeval_to_nttime(&tv),
|
||||
};
|
||||
|
||||
ndr_err = ndr_push_struct_blob(v, el->values, &tbs,
|
||||
|
@ -334,7 +334,7 @@ NTSTATUS dns_tombstone_records(TALLOC_CTX *mem_ctx,
|
||||
t /= 3600;
|
||||
|
||||
tombstone_struct = (struct dnsp_DnssrvRpcRecord){
|
||||
.wType = DNS_TYPE_TOMBSTONE, .data = {.timestamp = t}};
|
||||
.wType = DNS_TYPE_TOMBSTONE, .data = {.EntombedTime = t}};
|
||||
|
||||
true_struct = (struct ldb_val){.data = true_str, .length = 4};
|
||||
|
||||
@ -453,7 +453,7 @@ NTSTATUS dns_delete_tombstones(TALLOC_CTX *mem_ctx,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (rec->data.timestamp > tombstone_time) {
|
||||
if (rec->data.EntombedTime > tombstone_time) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -306,7 +306,7 @@ void dnsp_to_dns_copy(TALLOC_CTX *mem_ctx, struct dnsp_DnssrvRpcRecord *dnsp,
|
||||
switch (dnsp->wType) {
|
||||
|
||||
case DNS_TYPE_TOMBSTONE:
|
||||
dns->data.timestamp = dnsp->data.timestamp;
|
||||
dns->data.EntombedTime = dnsp->data.EntombedTime;
|
||||
break;
|
||||
|
||||
case DNS_TYPE_A:
|
||||
@ -437,7 +437,7 @@ WERROR dns_to_dnsp_convert(TALLOC_CTX *mem_ctx, struct DNS_RPC_RECORD *dns,
|
||||
switch (dns->wType) {
|
||||
|
||||
case DNS_TYPE_TOMBSTONE:
|
||||
dnsp->data.timestamp = dns->data.timestamp;
|
||||
dnsp->data.EntombedTime = dns->data.EntombedTime;
|
||||
break;
|
||||
|
||||
case DNS_TYPE_A:
|
||||
|
Loading…
Reference in New Issue
Block a user