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