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:
@@ -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
|
||||
|
Reference in New Issue
Block a user