Gentoo Archives: gentoo-commits

From: Jason Zaman <perfinion@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/contrib/
Date: Sun, 30 Apr 2017 09:33:11
Message-Id: 1493543572.8c603f3c8d2287b778473a09b4576bee12401b59.perfinion@gentoo
1 commit: 8c603f3c8d2287b778473a09b4576bee12401b59
2 Author: Chris PeBenito <pebenito <AT> ieee <DOT> org>
3 AuthorDate: Wed Apr 19 01:17:16 2017 +0000
4 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 30 09:12:52 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=8c603f3c
7
8 kmod, lvm, brctl patches from Russell Coker
9
10 Patches for modutils, at least one of which is needed to generate an initramfs
11 on Debian.
12
13 Patch to allow lvm to talk to fifos from dpkg_script_t for postinst scripts
14 etc.
15
16 Patch for brctl to allow it to create sysfs files.
17
18 policy/modules/contrib/brctl.te | 3 ++-
19 policy/modules/contrib/dpkg.if | 39 +++++++++++++++++++++++++++++++++++++++
20 policy/modules/contrib/dpkg.te | 2 +-
21 3 files changed, 42 insertions(+), 2 deletions(-)
22
23 diff --git a/policy/modules/contrib/brctl.te b/policy/modules/contrib/brctl.te
24 index c5a91138..fd789b5f 100644
25 --- a/policy/modules/contrib/brctl.te
26 +++ b/policy/modules/contrib/brctl.te
27 @@ -1,4 +1,4 @@
28 -policy_module(brctl, 1.7.0)
29 +policy_module(brctl, 1.7.1)
30
31 ########################################
32 #
33 @@ -29,6 +29,7 @@ kernel_read_sysctl(brctl_t)
34
35 corenet_rw_tun_tap_dev(brctl_t)
36
37 +dev_create_sysfs_files(brctl_t)
38 dev_rw_sysfs(brctl_t)
39 dev_write_sysfs_dirs(brctl_t)
40
41
42 diff --git a/policy/modules/contrib/dpkg.if b/policy/modules/contrib/dpkg.if
43 index fdc06d69..081134f2 100644
44 --- a/policy/modules/contrib/dpkg.if
45 +++ b/policy/modules/contrib/dpkg.if
46 @@ -62,6 +62,25 @@ interface(`dpkg_domtrans_script',`
47
48 ########################################
49 ## <summary>
50 +## access dpkg_script fifos
51 +## </summary>
52 +## <param name="domain">
53 +## <summary>
54 +## Domain allowed access
55 +## </summary>
56 +## </param>
57 +#
58 +interface(`dpkg_script_rw_pipes',`
59 + gen_require(`
60 + type dpkg_script_t;
61 + ')
62 +
63 + allow $1 dpkg_script_t:fd use;
64 + allow $1 dpkg_script_t:fifo_file rw_file_perms;
65 +')
66 +
67 +########################################
68 +## <summary>
69 ## Execute dpkg programs in the dpkg domain.
70 ## </summary>
71 ## <param name="domain">
72 @@ -242,3 +261,23 @@ interface(`dpkg_lock_db',`
73 allow $1 dpkg_var_lib_t:dir list_dir_perms;
74 allow $1 dpkg_lock_t:file manage_file_perms;
75 ')
76 +
77 +########################################
78 +## <summary>
79 +## manage dpkg_script_tmp_t files and dirs
80 +## </summary>
81 +## <param name="domain">
82 +## <summary>
83 +## Domain allowed access.
84 +## </summary>
85 +## </param>
86 +#
87 +interface(`dpkg_manage_script_tmp_files',`
88 + gen_require(`
89 + type dpkg_script_tmp_t;
90 + ')
91 +
92 + files_search_tmp($1)
93 + allow $1 dpkg_script_tmp_t:dir manage_dir_perms;
94 + allow $1 dpkg_script_tmp_t:file manage_file_perms;
95 +')
96
97 diff --git a/policy/modules/contrib/dpkg.te b/policy/modules/contrib/dpkg.te
98 index a3d3f2e5..a91e4896 100644
99 --- a/policy/modules/contrib/dpkg.te
100 +++ b/policy/modules/contrib/dpkg.te
101 @@ -1,4 +1,4 @@
102 -policy_module(dpkg, 1.11.5)
103 +policy_module(dpkg, 1.11.6)
104
105 ########################################
106 #