X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Flabel.c;h=7aa362106e39871077a6d1e6c47d27e41bd2bf17;hb=b5b46d599524341ddd7407e5dff1021af8ff5089;hp=9a5f79d7aef91d928d448557fc5a55bb15443006;hpb=0f9963a8b8c1d60a467c0cdc04d5e7bfce9d7c75;p=elogind.git diff --git a/src/shared/label.c b/src/shared/label.c index 9a5f79d7a..7aa362106 100644 --- a/src/shared/label.c +++ b/src/shared/label.c @@ -99,7 +99,7 @@ int label_init(const char *prefix) { return r; } -int label_fix(const char *path, bool ignore_enoent) { +int label_fix(const char *path, bool ignore_enoent, bool ignore_erofs) { int r = 0; #ifdef HAVE_SELINUX @@ -132,6 +132,9 @@ int label_fix(const char *path, bool ignore_enoent) { if (ignore_enoent && errno == ENOENT) return 0; + if (ignore_erofs && errno == EROFS) + return 0; + log_full(security_getenforce() == 1 ? LOG_ERR : LOG_DEBUG, "Unable to fix label of %s: %m", path); r = security_getenforce() == 1 ? -errno : 0;