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.

(cherry picked from commit dd6acc1cac)
This commit is contained in:
Midnight Veil 2023-06-08 17:11:37 +10:00 committed by Tony Finch
parent 025110b07a
commit 5172f4c32a

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);