anitazha / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone

Blame SOURCES/0538-core-namespace-Protect-usr-instead-of-home-with-Prot.patch

dd65c9
From 38d653dbd39cd1e3370e49c5cc7b031a93532e10 Mon Sep 17 00:00:00 2001
dd65c9
From: Jason Pleau <jason@jpleau.ca>
dd65c9
Date: Sun, 31 May 2015 12:51:17 -0400
dd65c9
Subject: [PATCH] core/namespace: Protect /usr instead of /home with
dd65c9
 ProtectSystem=yes
dd65c9
dd65c9
A small typo in ee818b8 caused /home to be put in read-only instead of
dd65c9
/usr when ProtectSystem was enabled (ie: not set to "no").
dd65c9
dd65c9
(cherry picked from commit d38e01dc96c5cae1986561c4f3bc7f760560bf2a)
dd65c9
dd65c9
Resolves: #1493047
dd65c9
---
dd65c9
 src/core/namespace.c | 2 +-
dd65c9
 1 file changed, 1 insertion(+), 1 deletion(-)
dd65c9
dd65c9
diff --git a/src/core/namespace.c b/src/core/namespace.c
dd65c9
index 574746273..217dd36cb 100644
dd65c9
--- a/src/core/namespace.c
dd65c9
+++ b/src/core/namespace.c
dd65c9
@@ -521,7 +521,7 @@ int setup_namespace(
dd65c9
                 if (protect_system != PROTECT_SYSTEM_NO) {
dd65c9
                         const char *usr_dir, *boot_dir, *etc_dir;
dd65c9
 
dd65c9
-                        usr_dir = prefix_roota(root_directory, "/home");
dd65c9
+                        usr_dir = prefix_roota(root_directory, "/usr");
dd65c9
                         boot_dir = prefix_roota(root_directory, "/boot");
dd65c9
                         boot_dir = strjoina("-", boot_dir);
dd65c9
                         etc_dir = prefix_roota(root_directory, "/etc");