diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/label.c | 5 | ||||
-rw-r--r-- | src/shared/label.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/shared/label.c b/src/shared/label.c index 9a5f79d7ae..7aa362106e 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; diff --git a/src/shared/label.h b/src/shared/label.h index 4f404b2f20..8d832f9a59 100644 --- a/src/shared/label.h +++ b/src/shared/label.h @@ -29,7 +29,7 @@ int label_init(const char *prefix); void label_finish(void); -int label_fix(const char *path, bool ignore_enoent); +int label_fix(const char *path, bool ignore_enoent, bool ignore_erofs); int label_socket_set(const char *label); void label_socket_clear(void); |