1 |
Matt Harrison wrote: |
2 |
> max wrote: |
3 |
>> Matt Harrison wrote: |
4 |
>>> Matt Harrison wrote: |
5 |
>>>> I previously installed a virtual machine with selinux etc to see if I |
6 |
>>>> could get my head round it and it all worked fine. |
7 |
>>> Actually this isn't true, when enabling enforce on my test machine it |
8 |
>>> locks me out of everything as well. |
9 |
>>> |
10 |
>>> This is a complete mystery to me and quite disappointing. |
11 |
>>> |
12 |
>> set selinux to permissive and check the logs when the box comes up |
13 |
>> |
14 |
> |
15 |
> Thanks for the reply, |
16 |
> |
17 |
> Ok, firstly if I boot up in enforcing mode it halts saying something |
18 |
> like access to /sbin/init was denied. |
19 |
> |
20 |
> If I boot up permissive I get tonnes of denied messages in dmesg. |
21 |
> There's far too many to list so I've attached a trimmed dmesg output, |
22 |
> starting from the first related message. |
23 |
> |
24 |
> From my untrained eye looking over these messages it seems that a lot of |
25 |
> core system stuff is being denied access, why I have no clue, everything |
26 |
> should be labelled and setup according to the gentoo selinux howto. |
27 |
> |
28 |
> Grateful for any input. |
29 |
> |
30 |
> Thanks |
31 |
> |
32 |
> Matt |
33 |
Do you happen to have the build.conf file for your policy? I am still |
34 |
working on building my gentoo box, i mainly run fedora but I notice |
35 |
that, at least on Fedora, the following is set to allow(From your dmesg): |
36 |
|
37 |
security: class peer not defined in policy |
38 |
security: class capability2 not defined in policy |
39 |
security: permission recvfrom in class node not defined in policy |
40 |
security: permission sendto in class node not defined in policy |
41 |
security: permission ingress in class netif not defined in policy |
42 |
security: permission egress in class netif not defined in policy |
43 |
security: permission setfcap in class capability not defined in policy |
44 |
security: permission flow_in in class packet not defined in policy |
45 |
security: permission flow_out in class packet not defined in policy |
46 |
security: permission forward_in in class packet not defined in policy |
47 |
security: permission forward_out in class packet not defined in policy |
48 |
SELinux: Completing initialization. |
49 |
SELinux: Setting up existing superblocks. |
50 |
|
51 |
SELinux: policy loaded with handle_unknown=deny |
52 |
|
53 |
If i compile a policy on Fedora this is always set to allow, if not I |
54 |
usually run into problems like your having, I don't know enough about |
55 |
gentoo to know if this is supposed to be this way here or not, perhaps |
56 |
someone else can supply the answer. The description in the build.conf file: |
57 |
> # Unknown Permissions Handling |
58 |
> # The behavior for handling permissions defined in the |
59 |
> # kernel but missing from the policy. The permissions |
60 |
> # can either be allowed, denied, or the policy loading |
61 |
> # can be rejected. |
62 |
> # allow, deny, and reject are current options. |
63 |
|
64 |
You could try recompiling the policy with this set to allow, that, i |
65 |
think, should resolve the issue for you but I don't really know how |
66 |
different the default fedora and gentoo policies are so take it with a |
67 |
grain of salt. Aside from that I could only suggest running the denials |
68 |
through audit to allow2allow but I think changing that option there is |
69 |
your best bet. Your showing quite a few things not defined in policy |
70 |
and they are getting denied. |
71 |
|
72 |
UNK_PERMS=allow |
73 |
|
74 |
|
75 |
-Max |
76 |
|
77 |
-- |
78 |
Fortune favors the BOLD |