Gentoo Archives: gentoo-hardened

From: Richard Simpson <richard.simpson@×××××.com>
To: Brian Fernald <bfernald@×××××.com>, gentoo-hardened@l.g.o
Subject: RE: [gentoo-hardened] building gentoo hardened - selinux
Date: Wed, 15 Sep 2004 00:02:20
Message-Id: BJENLMGHDPAAAGKKPOFOCECGCFAA.richard.simpson@wgint.com
In Reply to: [gentoo-hardened] building gentoo hardened - selinux by Brian Fernald
1 MessageBrian-
2
3 Look in /usr/src/linux/security/selinux/include/security.h to see what
4 policy versions your kernel is compatible with. My 2.6.7-r8 kernel lists 15
5 min and 17 max, so I was able to use POLICYCOMPAT = -c 17. AFAIK the policy
6 compiler is only backwards compatible 1 version level.
7
8 For some reason emerge chose to merge selinux-base-policy-20040906 on my
9 system too even though that package is flagged ~x86, and I found out after
10 the fact that it's not compatible with my kernel. I would like to see
11 hardened-dev-sources noted in the changelog what policy versions it
12 supports, rather than having to dig through the headers after its emerged.
13
14 Richard.
15 -----Original Message-----
16 From: Brian Fernald [mailto:bfernald@×××××.com]
17 Sent: Tuesday, September 14, 2004 4:47 PM
18 To: gentoo-hardened@l.g.o
19 Subject: [gentoo-hardened] building gentoo hardened - selinux
20
21
22 Hi,
23
24 I have just walked through the Gentoo SELinux handbook to build a new
25 system. Whenever I come to the point of loading the security policy, it
26 attempts to build a Policy of version 18 .. It reports the following :
27
28 make load
29 * Creating policy.conf
30 * Policy version: 18
31 * Kernel version: 16
32 * WARNING: Policy version mismatch. Is your POLICYCOMPAT set correctly?
33 * See http://hardened.gentoo.org/selinux/selinux-policy.xml#doc_chap6
34 * for more information.
35 * Compiling and installing policy.18
36 /usr/bin/checkpolicy: loading policy configuration from
37 /etc/security/selinux/src/policy.conf
38 security: 3 users, 5 roles, 367 types, 1 bools
39 security: 51 classes, 24552 rules
40 /usr/bin/checkpolicy: policy configuration loaded
41 /usr/bin/checkpolicy: writing binary representation (version 18) to
42 /etc/security/selinux/policy.18
43 * Building file_contexts
44 * Installing file_contexts
45 * Loading policy.18
46 /usr/sbin/load_policy: security_load_policy failed
47 make: *** [tmp/load] Error 3
48
49
50 ... i then changed POLICYCOMPAT to be 16 and tried again :
51
52 make load
53 * Policy version: 16
54 * Kernel version: 16
55 * Compiling and installing policy.16
56 /usr/bin/checkpolicy: loading policy configuration from
57 /etc/security/selinux/src/policy.conf
58 security: 3 users, 5 roles, 367 types, 1 bools
59 security: 51 classes, 24552 rules
60 /usr/bin/checkpolicy: policy configuration loaded
61 /usr/bin/checkpolicy: writing binary representation (version 16) to
62 /etc/security/selinux/policy.16
63 * Loading policy.16
64 /usr/sbin/load_policy: security_load_policy failed
65 make: *** [tmp/load] Error 3
66
67
68 it still fails.
69
70 The system is currently booted to the LiveCD (as per instructions).. the
71 kernel downloaded and build was 2.6.7-hardened-r8 (emerge
72 hardened-dev-sources) ..
73
74 Could anyone shed some light on what I am doing incorrectly ?
75
76 Thanks,
77
78 Brian

Replies

Subject Author
RE: [gentoo-hardened] building gentoo hardened - selinux Chris PeBenito <pebenito@g.o>