Gentoo Archives: gentoo-commits

From: Sven Vermeulen <swift@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-refpolicy:next commit in: policy/modules/kernel/, policy/
Date: Wed, 04 Mar 2015 17:40:08
Message-Id: 1425490779.cf050c09f77027dd6ae24e17e5035b617e2d682b.swift@gentoo
1 commit: cf050c09f77027dd6ae24e17e5035b617e2d682b
2 Author: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
3 AuthorDate: Wed Mar 4 17:14:12 2015 +0000
4 Commit: Sven Vermeulen <swift <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 4 17:39:39 2015 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=cf050c09
7
8 Mark storage as base module
9
10 All modules within the base should not depend on anything that is
11 modular. However recently we had to allow kernel_t certain privileges
12 which are covered not only by an interface of the storage module (which
13 is not an issue) but also by an attribute that is managed by that
14 module.
15
16 As a result, base fails to build:
17
18 $ make base
19 Compiling mcs base module
20 /usr/bin/checkmodule: loading policy configuration from base.conf
21 policy/modules/kernel/kernel.te:433:ERROR 'attribute fixed_disk_raw_read
22 is not declared' at token ';' on line 23210:
23 typeattribute kernel_t fixed_disk_raw_read;
24 \#line 433
25 /usr/bin/checkmodule: error(s) encountered while parsing configuration
26 Rules.modular:98: recipe for target 'tmp/base.mod' failed
27 make: *** [tmp/base.mod] Error 1
28
29 Moving storage as a base module.
30
31 X-Gentoo-Bug: 535992
32 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=535992
33
34 policy/modules.conf | 2 +-
35 policy/modules/kernel/storage.if | 4 ++++
36 2 files changed, 5 insertions(+), 1 deletion(-)
37
38 diff --git a/policy/modules.conf b/policy/modules.conf
39 index b9b41d9..5d9eee7 100644
40 --- a/policy/modules.conf
41 +++ b/policy/modules.conf
42 @@ -2306,7 +2306,7 @@ zosremote = module
43 #
44 # Policy controlling access to storage devices
45 #
46 -storage = module
47 +storage = base
48
49 # Layer: roles
50 # Module: auditadm
51
52 diff --git a/policy/modules/kernel/storage.if b/policy/modules/kernel/storage.if
53 index 5c1be6b..8a7119d 100644
54 --- a/policy/modules/kernel/storage.if
55 +++ b/policy/modules/kernel/storage.if
56 @@ -1,4 +1,8 @@
57 ## <summary>Policy controlling access to storage devices</summary>
58 +## <required val="true">
59 +## This module defines attributes that are used by other
60 +## required modules (such as kernel_t in the kernel module)
61 +## </required>
62
63 ########################################
64 ## <summary>