View previous topic :: View next topic |
Author |
Message |
vyedmic n00b
Joined: 02 Dec 2010 Posts: 51
|
Posted: Tue May 21, 2013 5:49 pm Post subject: [SOLVED] SELinux: id -Z says kernel is not SELinux enabled |
|
|
Hello,
I have built an SELinux enabled kernel and after following the Gentoo SELinux Handbook all seems to be fine. Filesystem is labeled, policies are loaded, sestatus reports SELinux as enabled, yet id -Z throws up
Code: | id: --context (-Z) works only on an SELinux-enabled kernel |
I need it to troubleshoot some role contexts.
Profile is set to hardened/linux/amd64/selinux, and running kernel is 3.8.6-hardened.
I have done emerge -eN system but it didn't help. What could be wrong? Thank you.
Last edited by vyedmic on Sun May 26, 2013 9:14 pm; edited 1 time in total |
|
Back to top |
|
|
vaxbrat l33t
Joined: 05 Oct 2005 Posts: 731 Location: DC Burbs
|
Posted: Wed May 22, 2013 5:07 am Post subject: getting the dumb question out of the way |
|
|
you did re-emerge coreutils with selinux enabled right? |
|
Back to top |
|
|
vyedmic n00b
Joined: 02 Dec 2010 Posts: 51
|
Posted: Thu May 23, 2013 11:28 pm Post subject: |
|
|
Thank you for taking your time to get my dumb question out of the way.
I cannot emerge anything when selinux is enabled since the root role doesn't exist(i did create it and it is now in seusers) and my contexts are wrong for some reason. I have followed the selinux handbook down to a t. I managed to troubleshoot it last time somehow but i have forgotten what i did then.
More dumb questions:
Why does selinux need to be enabled for the build of coreutils? Why is not the selinux USE flag enough? (I have relabeled the filesystem after last rebuild)
Why is selinux preventing me emerging anything when it is set to permissive mode?
Sorry for taking up your time. |
|
Back to top |
|
|
vaxbrat l33t
Joined: 05 Oct 2005 Posts: 731 Location: DC Burbs
|
Posted: Fri May 24, 2013 2:21 am Post subject: It's been a while since I've enabled it myself |
|
|
However I recall just building everything first with selinux disabled from the kernel boot but with selinux USE flag enabled. Then you boot up with selinux enabled in kernel and mount the /selinux filesystem to do the labeling. Don't recall ever having trouble with coreutils not thinking selinux was enabled. Did you miss emerging crucial parts of the reference policy? |
|
Back to top |
|
|
vyedmic n00b
Joined: 02 Dec 2010 Posts: 51
|
Posted: Sun May 26, 2013 9:13 pm Post subject: Fixed |
|
|
So re-emerging all the policies solved it. Thanks. Very confusing error message IMO. |
|
Back to top |
|
|
|