bugSystem V style init programs - Bugs: bug #29195, selinux boot fix

 
 

bug #29195: selinux boot fix

Submitted by:  None
Submitted on:  Thu 11 Mar 2010 07:16:08 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 19 Mar 2010 04:56:56 PM UTC, comment #2:

Just add a fix that is mounting proc before running is_selinux_enabled()

Dr. Werner Fink <wfink>
Project Administrator
Fri 12 Mar 2010 05:04:19 PM UTC, comment #1:

AFAICS from libselinux-2.0.91.tar.bz2 the function returns only
-1 if and only if /proc is not mounted. If /selinux is not
mounted the return value is simply 0. The is_selinux_enabled()
checks for the fs name "selinuxfs" in "/proc/filesystems" which
seems to be a bit redundant as init_selinuxmnt() already has
mounted /selinux only if "/proc/filesystems" exists with loading
the shared library libselinux. And it is very strange that in
selinux_init_load_policy() tries to mount /proc and umount it
if already done before ...

Dr. Werner Fink <wfink>
Project Administrator
Thu 11 Mar 2010 07:16:08 PM UTC, original submission:

in current sysvinit code we have a

if (getenv("SELINUX_INIT") == NULL&& !is_selinux_enabled()) {

the problem is that is_selinux_enabled is actually a tristate and can return a -1 for 'dont know'. this happens when the system is booted without initial ramdisk and neither /proc nor /selinux is yet mounted. in that case the -1 should be treated as a 0 to proceed with policy loading. the proposed fix is thus

if (getenv("SELINUX_INIT") == NULL&& (1 != is_selinux_enabled())) {

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follows 1 latest change.

Date Changed By Updated Field Previous Value => Replaced By
Fri 19 Mar 2010 04:56:56 PM UTCwfinkOpen/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1