2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

[master] check new-zones-directory

4789.	[cleanup]	Check writability of new-zones-directory. [RT #46308]
This commit is contained in:
Evan Hunt
2017-10-25 01:19:46 -07:00
parent aebdc6cd7d
commit eb2ef7b53e
5 changed files with 39 additions and 1 deletions

View File

@@ -7051,6 +7051,13 @@ setup_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
dir, isc_result_totext(result));
return (result);
}
if (access(dir, DIR_PERM_OK) != 0) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"new-zones-directory '%s' "
"is not writable", dir);
return (ISC_R_NOPERM);
}
dns_view_setnewzonedir(view, dir);
}