anitazha / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone

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

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