Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 326697 - sys-apps/sysvinit-2.88 fails to load selinux policy
Summary: sys-apps/sysvinit-2.88 fails to load selinux policy
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-02 23:11 UTC by Chris Richards
Modified: 2010-07-18 23:46 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (chrisdev.info,3.50 KB, text/plain)
2010-07-02 23:15 UTC, Chris Richards
Details
selinux patch for sysvinit 2.88 (sysvinit-2.88-selinux-init.patch,595 bytes, text/plain)
2010-07-02 23:19 UTC, Chris Richards
Details
sysvinit patch for selinux (sysvinit-selinux.patch,1.01 KB, text/plain)
2010-07-18 23:27 UTC, Chris Richards
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Richards 2010-07-02 23:11:27 UTC
sysvinit 2.88 contains some changes in internal logic to prevent it from loading selinux policy during startup, effectively disabling selinux.  This prevents us from being able to deploy selinux on gentoo systems using sysvinit 2.88 (although 2.87-r3 works fine).
Comment 1 Chris Richards 2010-07-02 23:13:39 UTC
Whoops, typo, and I don't see any way to edit.

The above should read:

"sysvinit 2.88 contains some changes in internal logic WHICH prevent it from
loading selinux policy during startup, effectively disabling selinux.  This
prevents us from being able to deploy selinux on gentoo systems using sysvinit
2.88 (although 2.87-r3 works fine)."
Comment 2 Chris Richards 2010-07-02 23:15:48 UTC
Created attachment 237333 [details]
emerge --info
Comment 3 Chris Richards 2010-07-02 23:19:58 UTC
Created attachment 237335 [details]
selinux patch for sysvinit 2.88

This bug is similar to a bug filed on Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580272

However, the Debian proposed patch does not work on Gentoo (probably because I'm running naked sysvinit, rather than using initrd).

I do NOT know if this has been submitted as a patch to upstream or not.
Comment 4 Chris PeBenito (RETIRED) gentoo-dev 2010-07-03 15:35:24 UTC
The patch is good.
Comment 5 SpanKY gentoo-dev 2010-07-03 16:41:34 UTC
you're free to commit selinux patches to this package since we have no idea how these things work or how to test them

upstream repo doesnt have any changed code, and no one has reported a bug to them: https://savannah.nongnu.org/bugs/?group=sysvinit

the debian report indicates their patch should work fine with a kernel lacking an initrd ...
Comment 6 Chris Richards 2010-07-08 19:09:15 UTC
The Debian report also indicates that it has not been tested without an initrd.

Be that as it may, when I applied the full Debian patch, my system puked out its guts all over my brand new carpet, and I spent some time cleaning up the mess.  

What I provided in this patch was what I had to have to get my system to boot.  It could very well be something unique to the configuration of my system, though.  It would be nice if we could have some testing from others.

Should I submit a patch to upstream, then?  I'm unsure of the protocol here, being rather new to how Gentoo does these sorts of things.
Comment 7 SpanKY gentoo-dev 2010-07-08 20:43:03 UTC
it depends on the package.  since you have something to actually test out, you could answer questions upstream might have.
http://savannah.nongnu.org/bugs/?func=additem&group=sysvinit
Comment 8 Chris Richards 2010-07-08 21:13:02 UTC
Filed with upstream, http://savannah.nongnu.org/bugs/index.php?30396, however note that we may still have to implement this patch ourselves, at least temporarily, depending on when we intend to implement sysvinit-2.88, otherwise SELinux will be broken.
Comment 10 Chris Richards 2010-07-13 19:00:01 UTC
After some back and forth with upstream, I can only conclude I am suffering from some sort of brain-damage or something.

After applying the patch for sysvinit from post #9, udev puked on me.  This happened to me on two different occasions.  However, applying the patch now, everything works fine.

I'm closing this as fixed upstream, unless someone feels it should be handled differently?
Comment 11 SpanKY gentoo-dev 2010-07-17 19:25:22 UTC
i thought the current sysvinit-2.88 package needed a patch to work.  is that not the case ?
Comment 12 Chris Richards 2010-07-18 06:00:41 UTC
It is the case that 2.88 requires a patch to work correctly.  That patch is in the SVN tree upstream.
Comment 13 SpanKY gentoo-dev 2010-07-18 20:11:49 UTC
so post the commit URL or attach a patch to this bug so we can add it to 2.88-r1
Comment 14 Chris Richards 2010-07-18 23:27:53 UTC
Created attachment 239317 [details]
sysvinit patch for selinux
Comment 15 SpanKY gentoo-dev 2010-07-18 23:46:01 UTC
guessing you want this:
http://svn.savannah.nongnu.org/viewvc?view=rev&root=sysvinit&revision=90

so ive added that to 2.88-r1