Gentoo Archives: gentoo-hardened

From: Victor Banatean <Pie_Oh_Pah@×××.net>
To:
Cc: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] building gentoo hardened - selinux
Date: Wed, 15 Sep 2004 15:11:52
Message-Id: 41485DCC.3020404@gmx.net
In Reply to: Re: [gentoo-hardened] building gentoo hardened - selinux by Victor Banatean
1 Hi everyone,
2
3 again me I think I got an idea,maybe it will work.
4
5 I want to try the following:
6 - do a make in than boot in the new selinux system
7 - login as root
8 - cd /etc/security/selinux/src/policy/
9 - make load
10 - make relabel
11 - make policy
12 - make install
13
14 So I will try and report in a second.
15
16 See you.
17
18 Victor
19
20 Victor Banatean wrote:
21
22 > Hi Chris,
23 >
24 > is there a work around,e.g. to mount a part of
25 > the new iso and try make load again?
26 >
27 > Thanks in advance.
28 >
29 > Victor
30 >
31 > Chris PeBenito wrote:
32 >
33 >> I just modified the current livecd and put in a new policy. I'm
34 >> uploading it to http://dev.gentoo.org/~pebenito/. I've got slow upload,
35 >> so check back in at least an hour. Someone please test to verify it
36 >> fixes the load problem.
37 >>
38 >> On Wed, 2004-09-15 at 06:59, Chris PeBenito wrote:
39 >>
40 >>
41 >>> This all has to do with the headers update that has been going on for
42 >>> the last couple weeks. The livecd has to be updated too, and I
43 >>> overlooked this fact. I'll try to get a new livecd out ASAP.
44 >>>
45 >>>
46 >>> On Tue, 2004-09-14 at 20:04, Richard Simpson wrote:
47 >>>
48 >>>
49 >>>> Brian-
50 >>>>
51 >>>> Look in /usr/src/linux/security/selinux/include/security.h to see what
52 >>>> policy versions your kernel is compatible with. My 2.6.7-r8 kernel
53 >>>> lists 15 min and 17 max, so I was able to use POLICYCOMPAT = -c 17.
54 >>>> AFAIK the policy compiler is only backwards compatible 1 version
55 >>>> level.
56 >>>>
57 >>>> For some reason emerge chose to merge selinux-base-policy-20040906 on
58 >>>> my system too even though that package is flagged ~x86, and I found
59 >>>> out after the fact that it's not compatible with my kernel. I would
60 >>>> like to see hardened-dev-sources noted in the changelog what policy
61 >>>> versions it supports, rather than having to dig through the headers
62 >>>> after its emerged.
63 >>>>
64 >>>> Richard.
65 >>>> -----Original Message-----
66 >>>> From: Brian Fernald [mailto:bfernald@×××××.com]
67 >>>> Sent: Tuesday, September 14, 2004 4:47 PM
68 >>>> To: gentoo-hardened@l.g.o
69 >>>> Subject: [gentoo-hardened] building gentoo hardened - selinux
70 >>>> Hi,
71 >>>> I have just walked through the Gentoo SELinux
72 >>>> handbook to
73 >>>> build a new system. Whenever I come to the point of loading
74 >>>> the security policy, it attempts to build a Policy of version
75 >>>> 18 .. It reports the following :
76 >>>> make load
77 >>>> * Creating policy.conf
78 >>>> * Policy version: 18
79 >>>> * Kernel version: 16
80 >>>> * WARNING: Policy version mismatch. Is your POLICYCOMPAT set
81 >>>> correctly?
82 >>>> * See
83 >>>> http://hardened.gentoo.org/selinux/selinux-policy.xml#doc_chap6
84 >>>> * for more information.
85 >>>> * Compiling and installing policy.18
86 >>>> /usr/bin/checkpolicy: loading policy configuration from
87 >>>> /etc/security/selinux/src/policy.conf
88 >>>> security: 3 users, 5 roles, 367 types, 1 bools
89 >>>> security: 51 classes, 24552 rules
90 >>>> /usr/bin/checkpolicy: policy configuration loaded
91 >>>> /usr/bin/checkpolicy: writing binary representation (version
92 >>>> 18) to /etc/security/selinux/policy.18
93 >>>> * Building file_contexts
94 >>>> * Installing file_contexts
95 >>>> * Loading policy.18
96 >>>> /usr/sbin/load_policy: security_load_policy failed
97 >>>> make: *** [tmp/load] Error 3
98 >>>> ... i then changed POLICYCOMPAT to be 16
99 >>>> and tried again :
100 >>>> make load
101 >>>> * Policy version: 16
102 >>>> * Kernel version: 16
103 >>>> * Compiling and installing policy.16
104 >>>> /usr/bin/checkpolicy: loading policy configuration from
105 >>>> /etc/security/selinux/src/policy.conf
106 >>>> security: 3 users, 5 roles, 367 types, 1 bools
107 >>>> security: 51 classes, 24552 rules
108 >>>> /usr/bin/checkpolicy: policy configuration loaded
109 >>>> /usr/bin/checkpolicy: writing binary representation (version
110 >>>> 16) to /etc/security/selinux/policy.16
111 >>>> * Loading policy.16
112 >>>> /usr/sbin/load_policy: security_load_policy failed
113 >>>> make: *** [tmp/load] Error 3
114 >>>> it still fails. The system
115 >>>> is currently booted to the LiveCD (as per
116 >>>> instructions).. the kernel downloaded and build was
117 >>>> 2.6.7-hardened-r8 (emerge hardened-dev-sources) ..
118 >>>> Could anyone shed some light on what I am doing
119 >>>> incorrectly ?
120 >>>> Thanks,
121 >>>> Brian
122 >>>>
123 >>>
124 >
125 > --
126 > gentoo-hardened@g.o mailing list
127 >
128 >
129
130 --
131 gentoo-hardened@g.o mailing list

Replies

Subject Author
Re: [gentoo-hardened] building gentoo hardened - selinux Joshua Brindle <method@g.o>