mount-setup: don't complain if we try to fix the label of a dir beneath a mount but can't due to EROFS

This commit is contained in:
Lennart Poettering
2012-07-03 16:25:50 +02:00
parent 61b1477c81
commit c9bc076461
6 changed files with 13 additions and 10 deletions
+4 -1
View File
@@ -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;
+1 -1
View File
@@ -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);