]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Translate POSIX errorcode EROFS to ISC_R_NOPERM
authorMidnight Veil <midnightveil@fea.st>
Thu, 8 Jun 2023 07:11:37 +0000 (17:11 +1000)
committerTony Finch <fanf@isc.org>
Wed, 14 Jun 2023 12:48:25 +0000 (13:48 +0100)
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

index a6646d2181bc657bc2117976c97edcb9078521d0..1ef0c884d5eb7815d9f627a438dfeda96fdb5501 100644 (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);