From dd6acc1cac3b0df8770641839fe0d000f4db611d Mon Sep 17 00:00:00 2001 From: Midnight Veil Date: Thu, 8 Jun 2023 17:11:37 +1000 Subject: [PATCH 1/2] 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. --- 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); From 82401f0f0e5a5cc81e545ffe85415d29a16e15e3 Mon Sep 17 00:00:00 2001 From: Tony Finch Date: Fri, 9 Jun 2023 08:22:47 +0100 Subject: [PATCH 2/2] CHANGES note for [GL #4134] [cleanup] Report "permission denied" instead of "unexpected error" when trying to update a zone file is on a read-only file system. Thanks to Midnight Veil. [GL #4134] --- CHANGES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES b/CHANGES index 55fb5fcf45..05ba201d90 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +6196. [cleanup] Report "permission denied" instead of "unexpected error" + when trying to update a zone file on a read-only file + system. Thanks to Midnight Veil. [GL #4134] + 6195. [bug] Use rcu to reference view->adb. [GL #4021] 6194. [func] Change function 'find_zone_keys()' to look for signing