Gentoo Archives: gentoo-commits

From: Jason Zaman <perfinion@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-refpolicy:next commit in: policy/modules/kernel/, policy/modules/system/
Date: Sun, 10 Sep 2017 14:03:59
Message-Id: 1505048436.df80c8bf3a5c5e581370d75bf6ea5154a8b02b0b.perfinion@gentoo
1 commit: df80c8bf3a5c5e581370d75bf6ea5154a8b02b0b
2 Author: Jason Zaman <jason <AT> perfinion <DOT> com>
3 AuthorDate: Sun Sep 10 13:00:36 2017 +0000
4 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 10 13:00:36 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=df80c8bf
7
8 Allow sysadm to map all non auth files
9
10 policy/modules/kernel/files.if | 20 ++++++++++++++++++++
11 policy/modules/system/userdomain.if | 1 +
12 2 files changed, 21 insertions(+)
13
14 diff --git a/policy/modules/kernel/files.if b/policy/modules/kernel/files.if
15 index f2b76f86..35dcfe7b 100644
16 --- a/policy/modules/kernel/files.if
17 +++ b/policy/modules/kernel/files.if
18 @@ -1474,6 +1474,26 @@ interface(`files_manage_non_auth_files',`
19
20 ########################################
21 ## <summary>
22 +## Mmap non-authentication related
23 +## files.
24 +## </summary>
25 +## <param name="domain">
26 +## <summary>
27 +## Domain allowed access.
28 +## </summary>
29 +## </param>
30 +## <rolecap/>
31 +#
32 +interface(`files_map_non_auth_files',`
33 + gen_require(`
34 + attribute non_auth_file_type;
35 + ')
36 +
37 + allow $1 non_auth_file_type:file map;
38 +')
39 +
40 +########################################
41 +## <summary>
42 ## Relabel all non-authentication related
43 ## files.
44 ## </summary>
45
46 diff --git a/policy/modules/system/userdomain.if b/policy/modules/system/userdomain.if
47 index 84e9c57e..16789a3c 100644
48 --- a/policy/modules/system/userdomain.if
49 +++ b/policy/modules/system/userdomain.if
50 @@ -1256,6 +1256,7 @@ template(`userdom_admin_user_template',`
51 auth_getattr_shadow($1_t)
52 # Manage almost all files
53 files_manage_non_auth_files($1_t)
54 + files_map_non_auth_files($1_t)
55 # Relabel almost all files
56 files_relabel_non_auth_files($1_t)