Translate POSIX errorcode EROFS to ISC_R_NOPERM

Report "permission denied" instead of "unexpected error"
when trying to update a zone file on a read-only file system.
This commit is contained in:
Midnight Veil
2023-06-08 17:11:37 +10:00
committed by Tony Finch
parent 06bbe6a2db
commit dd6acc1cac

View File

@@ -45,6 +45,7 @@ isc___errno2result(int posixerrno, bool dolog, const char *file,
return (ISC_R_FILENOTFOUND);
case EACCES:
case EPERM:
case EROFS:
return (ISC_R_NOPERM);
case EEXIST:
return (ISC_R_FILEEXISTS);