From 5172f4c32a7284fc2eb5380f4a147b9d3db01bf3 Mon Sep 17 00:00:00 2001 From: Midnight Veil Date: Thu, 8 Jun 2023 17:11:37 +1000 Subject: [PATCH] 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 dd6acc1cac3b0df8770641839fe0d000f4db611d) --- lib/isc/errno2result.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/isc/errno2result.c b/lib/isc/errno2result.c index a6646d2181..1ef0c884d5 100644 --- a/lib/isc/errno2result.c +++ b/lib/isc/errno2result.c @@ -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);