summaryrefslogtreecommitdiffstats
path: root/recipes-security/refpolicy/refpolicy-2.20190201/0001-fc-subs-volatile-alias-common-var-volatile-paths.patch
blob: 2692ffadbdc5cf89da3b50a31d6484ea54fc438d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 49dd08e69938debc792ac9c3ac3e81a38929d11f Mon Sep 17 00:00:00 2001
From: Joe MacDonald <joe_macdonald@mentor.com>
Date: Thu, 28 Mar 2019 16:14:09 -0400
Subject: [PATCH 01/34] fc/subs/volatile: alias common /var/volatile paths

Ensure /var/volatile paths get the appropriate base file context.

Upstream-Status: Pending

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
---
 config/file_contexts.subs_dist | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/config/file_contexts.subs_dist b/config/file_contexts.subs_dist
index 346d920e..be532d7f 100644
--- a/config/file_contexts.subs_dist
+++ b/config/file_contexts.subs_dist
@@ -31,3 +31,13 @@
 # not for refpolicy intern, but for /var/run using applications,
 # like systemd tmpfiles or systemd socket configurations
 /var/run /run
+
+# volatile aliases
+# ensure the policy applied to the base filesystem objects are reflected in the
+# volatile hierarchy.
+/var/volatile/log /var/log
+/var/volatile/run /var/run
+/var/volatile/cache /var/cache
+/var/volatile/tmp /var/tmp
+/var/volatile/lock /var/lock
+/var/volatile/run/lock /var/lock
-- 
2.19.1