LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Selinux strict mode (https://www.linuxquestions.org/questions/linux-security-4/selinux-strict-mode-758422/)

takayama 09-29-2009 05:43 AM

Selinux strict mode
 
I have just started to run selinux. When i tested the strict polict with enforcing mode i got this error.
Init: cannot execute "/etc/rc.d/rc.sysinit"
init:entering runlevel: 3
Init: cannot execute "/etc/rc.d/rc"
Init: id "1" respawing to fast: disabled for 5 minutes
Init: id "2" respawing to fast: disabled for 5 minutes
Init: id "3" respawing to fast: disabled for 5 minutes
Init: id "4" respawing to fast: disabled for 5 minutes
Init: id "5" respawing to fast: disabled for 5 minutes

Im running centos 5.3

deadeyes 09-29-2009 06:43 AM

Quote:

Originally Posted by takayama (Post 3700411)
I have just started to run selinux. When i tested the strict polict with enforcing mode i got this error.
Init: cannot execute "/etc/rc.d/rc.sysinit"
init:entering runlevel: 3
Init: cannot execute "/etc/rc.d/rc"
Init: id "1" respawing to fast: disabled for 5 minutes
Init: id "2" respawing to fast: disabled for 5 minutes
Init: id "3" respawing to fast: disabled for 5 minutes
Init: id "4" respawing to fast: disabled for 5 minutes
Init: id "5" respawing to fast: disabled for 5 minutes

Im running centos 5.3

Maybe some labeling that is wrong?
What do you get when doing ls -Z /etc/rc.d/rc.sysinit ?
There is a way to relabel your filesystem.
Try a google search for it. I think that is your problem. Because you dont have access, the script exits immediately and respawns (as is configured in /etc/inittab I think). THere is a safety build in to wait if respawn is to fast.

I have this for that script:
-rwxr-xr-x root root system_u:object_r:initrc_exec_t /etc/rc.d/rc.sysinit

takayama 09-29-2009 06:50 AM

Quote:

Originally Posted by deadeyes (Post 3700461)
Maybe some labeling that is wrong?
What do you get when doing ls -Z /etc/rc.d/rc.sysinit ?
There is a way to relabel your filesystem.
Try a google search for it. I think that is your problem. Because you dont have access, the script exits immediately and respawns (as is configured in /etc/inittab I think). THere is a safety build in to wait if respawn is to fast.

I have this for that script:
-rwxr-xr-x root root system_u:object_r:initrc_exec_t /etc/rc.d/rc.sysinit


mine /etc/rc.d/rc.sysinit looks exactly the same.

slimm609 09-29-2009 09:56 AM

Quote:

Originally Posted by takayama (Post 3700471)
mine /etc/rc.d/rc.sysinit looks exactly the same.

Can you please provide more information and some info from the logs. Did you install the strict policy via yum?
What errors are the logs showing? /var/log/messages /var/log/audit/audit.log


Do you know if the system relabeled after the new policy?



to force a relabel


'touch /.autorelabel' then reboot
or
'fixfiles relabel' to relabel a live system

what is audit2why or audit2allow showing?

audit2allow -d

audit2allow -i < /var/log/audit/audit.log

For future reference the more infomation you can provide the easier it is to help.


All times are GMT -5. The time now is 01:56 PM.