SHA256
1
0
forked from pool/systemd
systemd/0004-core-don-t-try-to-relabel-mounts-before-we-loaded-th.patch

30 lines
968 B
Diff
Raw Normal View History

From c4bfd1691f4d3e26d6d7f34dbca941e119956e8a Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 24 Mar 2014 21:04:02 +0100
Subject: [PATCH] core: don't try to relabel mounts before we loaded the
policy
---
src/core/mount-setup.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git src/core/mount-setup.c src/core/mount-setup.c
index 147333a..0a45b24 100644
--- src/core/mount-setup.c
+++ src/core/mount-setup.c
@@ -172,7 +172,10 @@ static int mount_one(const MountPoint *p, bool relabel) {
/* The access mode here doesn't really matter too much, since
* the mounted file system will take precedence anyway. */
- mkdir_p_label(p->where, 0755);
+ if (relabel)
+ mkdir_p_label(p->where, 0755);
+ else
+ mkdir_p(p->where, 0755);
log_debug("Mounting %s to %s of type %s with options %s.",
p->what,
--
1.7.9.2