dryang / rpms / systemd

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