2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-05 00:55:24 +00:00

[master] add hash to map files

3562.	[func]		Update map file header format to include a SHA-1 hash
			of the database content, so that corrupted map files
			can be rejected at load time. [RT #32459]
This commit is contained in:
Evan Hunt
2013-05-01 22:20:02 -07:00
parent a4fe161bd3
commit 03b5d2689d
7 changed files with 244 additions and 61 deletions

View File

@@ -2193,7 +2193,7 @@ openfile_map(dns_loadctx_t *lctx, const char *master_file) {
*/
static isc_result_t
load_map(dns_loadctx_t *lctx) {
isc_result_t result;
isc_result_t result = ISC_R_SUCCESS;
dns_rdatacallbacks_t *callbacks;
REQUIRE(DNS_LCTX_VALID(lctx));
@@ -2205,12 +2205,12 @@ load_map(dns_loadctx_t *lctx) {
if (result != ISC_R_SUCCESS)
return (result);
(*callbacks->deserialize)(callbacks->deserialize_private,
lctx->f,
sizeof(dns_masterrawheader_t));
result = (*callbacks->deserialize)
(callbacks->deserialize_private,
lctx->f, sizeof(dns_masterrawheader_t));
}
return (ISC_R_SUCCESS);
return (result);
}
static isc_result_t