]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/adouble/ad_open.c
sys_lsetxattr error messages when mounting read only filesystem
[netatalk.git] / libatalk / adouble / ad_open.c
index cd45fef2e20ddf9c526b08a07f7c2a6f9c8a5717..4e1253d1febf6e70b8cef6576b54b98015385eb9 100644 (file)
@@ -1087,6 +1087,10 @@ static int ad_open_hf_ea(const char *path, int adflags, int mode, struct adouble
             errno = ENOENT;
             EC_FAIL;
         }
+        if ((adflags & ADFLAGS_CREATE) && (ad->ad_options & ADVOL_RO)) {
+            errno = EROFS;
+            EC_FAIL;
+        }
 
         LOG(log_debug, logtype_ad, "ad_open_hf_ea(\"%s\"): creating metadata EA", path);