From: Aki Tuomi Date: Thu, 11 May 2023 10:39:25 +0000 (+0300) Subject: lib: eaccess-error - Handle EROFS too X-Git-Tag: 2.4.0~2563 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e31180a35dd12a50cc9db5f95a4ab15d81c01ede;p=thirdparty%2Fdovecot%2Fcore.git lib: eaccess-error - Handle EROFS too This simplifies code since we can now call this if ENOACCESS macro return TRUE. --- diff --git a/src/lib/eacces-error.c b/src/lib/eacces-error.c index d140d826b5..e08be4922d 100644 --- a/src/lib/eacces-error.c +++ b/src/lib/eacces-error.c @@ -201,6 +201,13 @@ eacces_error_get_full(const char *func, const char *path, bool creating) break; } + if (orig_errno == EROFS) { + str_append(errmsg, " Read-only file system"); + str_append_c(errmsg, ')'); + errno = orig_errno; + return str_c(errmsg); + } + prev_path = path; ret = -1; while (strcmp(prev_path, "/") != 0) { if ((p = strrchr(prev_path, '/')) == NULL)