Gentoo Archives: gentoo-commits

From: Sven Vermeulen <swift@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/contrib/
Date: Tue, 29 Jul 2014 14:07:34
Message-Id: 1406642720.ad9cc622fb5bef6e37054150efd55ecead438889.swift@gentoo
1 commit: ad9cc622fb5bef6e37054150efd55ecead438889
2 Author: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
3 AuthorDate: Sat Jul 5 16:19:14 2014 +0000
4 Commit: Sven Vermeulen <swift <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 29 14:05:20 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=ad9cc622
7
8 Enable asound.state.lock support
9
10 asound.state.lock file when managing alsa state operations.
11
12 Signed-off-by: Sven Vermeulen <sven.vermeulen <AT> siphos.be>
13
14 ---
15 policy/modules/contrib/alsa.fc | 2 ++
16 policy/modules/contrib/alsa.te | 6 ++++++
17 2 files changed, 8 insertions(+)
18
19 diff --git a/policy/modules/contrib/alsa.fc b/policy/modules/contrib/alsa.fc
20 index 33d9d31..6c3c0ba 100644
21 --- a/policy/modules/contrib/alsa.fc
22 +++ b/policy/modules/contrib/alsa.fc
23 @@ -24,3 +24,5 @@ ifdef(`distro_debian',`
24 /usr/share/alsa/pcm(/.*)? gen_context(system_u:object_r:alsa_etc_rw_t,s0)
25
26 /var/lib/alsa(/.*)? gen_context(system_u:object_r:alsa_var_lib_t,s0)
27 +
28 +/var/lock/asound\.state\.lock -- gen_context(system_u:object_r:alsa_var_lock_t,s0)
29
30 diff --git a/policy/modules/contrib/alsa.te b/policy/modules/contrib/alsa.te
31 index 5b04663..4b818a0 100644
32 --- a/policy/modules/contrib/alsa.te
33 +++ b/policy/modules/contrib/alsa.te
34 @@ -24,6 +24,9 @@ files_tmpfs_file(alsa_tmpfs_t)
35 type alsa_var_lib_t;
36 files_type(alsa_var_lib_t)
37
38 +type alsa_var_lock_t;
39 +files_lock_file(alsa_var_lock_t)
40 +
41 type alsa_home_t;
42 userdom_user_home_content(alsa_home_t)
43
44 @@ -57,6 +60,9 @@ fs_tmpfs_filetrans(alsa_t, alsa_tmpfs_t, file)
45 manage_dirs_pattern(alsa_t, alsa_var_lib_t, alsa_var_lib_t)
46 manage_files_pattern(alsa_t, alsa_var_lib_t, alsa_var_lib_t)
47
48 +allow alsa_t alsa_var_lock_t:file manage_file_perms;
49 +files_lock_filetrans(alsa_t, alsa_var_lock_t, file);
50 +
51 kernel_read_system_state(alsa_t)
52
53 corecmd_exec_bin(alsa_t)