1 |
commit: f6525253d524b401f10e3496aaa1a08eb69ff61f |
2 |
Author: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be> |
3 |
AuthorDate: Tue Oct 30 21:51:56 2012 +0000 |
4 |
Commit: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be> |
5 |
CommitDate: Wed Oct 31 17:59:34 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=f6525253 |
7 |
|
8 |
Update files_manage_generic_locks with directory permissions |
9 |
|
10 |
Currently, the files_manage_generic_locks only handles the lock files. If a |
11 |
domain needs to manage both lock files and the lock directories (like specific |
12 |
subdirectories in /var/lock that are not owned by a single other domain, such as |
13 |
Gentoo's /var/lock/subsys location) it also needs the manage permissions on the |
14 |
directory. |
15 |
|
16 |
This is to support OpenRC's migration of /var/lock to /run/lock which otherwise |
17 |
fails: |
18 |
|
19 |
* Migrating /var/lock to /run/lock |
20 |
cp: cannot create directory '/run/lock/subsys': Permission denied |
21 |
rm: cannot remove '/var/lock/subsys': Permission denied |
22 |
|
23 |
Signed-off-by: Sven Vermeulen <sven.vermeulen <AT> siphos.be> |
24 |
|
25 |
--- |
26 |
policy/modules/kernel/files.if | 1 + |
27 |
1 files changed, 1 insertions(+), 0 deletions(-) |
28 |
|
29 |
diff --git a/policy/modules/kernel/files.if b/policy/modules/kernel/files.if |
30 |
index 40ed96f..b1c7e5d 100644 |
31 |
--- a/policy/modules/kernel/files.if |
32 |
+++ b/policy/modules/kernel/files.if |
33 |
@@ -5877,6 +5877,7 @@ interface(`files_manage_generic_locks',` |
34 |
|
35 |
allow $1 var_t:dir search_dir_perms; |
36 |
allow $1 var_lock_t:lnk_file read_lnk_file_perms; |
37 |
+ manage_dirs_pattern($1, var_lock_t, var_lock_t) |
38 |
manage_files_pattern($1, var_lock_t, var_lock_t) |
39 |
') |