* why not install selinux with systemd being used
@ 2013-05-22 10:13 Dave Young
[not found] ` <519C9A2E.2080100-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Dave Young @ 2013-05-22 10:13 UTC (permalink / raw)
To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
Hi, Harald
I have a question about selinux module.
In dracut.spec there's below code:
%if %{defined _unitdir}
# with systemd IMA and selinux modules do not make sense
rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs
rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey
rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity
rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98selinux
%endif
I'm confused why they are excluded for systemd?
And how can we load selinux policy in initramfs without 98selinux now?
--
Thanks
Dave
^ permalink raw reply [flat|nested] 8+ messages in thread[parent not found: <519C9A2E.2080100-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: why not install selinux with systemd being used [not found] ` <519C9A2E.2080100-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2013-05-22 10:14 ` Dave Young [not found] ` <519C9A7C.7080904-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Dave Young @ 2013-05-22 10:14 UTC (permalink / raw) To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, Vivek Goyal, Baoquan On 05/22/2013 06:13 PM, Dave Young wrote: > Hi, Harald > > I have a question about selinux module. > > In dracut.spec there's below code: > > %if %{defined _unitdir} > # with systemd IMA and selinux modules do not make sense > rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs > rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey > rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity > rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98selinux > %endif > > I'm confused why they are excluded for systemd? > > And how can we load selinux policy in initramfs without 98selinux now? > > CC Vivek and Baoquan -- Thanks Dave ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <519C9A7C.7080904-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: why not install selinux with systemd being used [not found] ` <519C9A7C.7080904-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2013-05-23 15:45 ` Colin Guthrie 2013-05-24 4:21 ` Dave Young 2013-05-27 11:40 ` Harald Hoyer 1 sibling, 1 reply; 8+ messages in thread From: Colin Guthrie @ 2013-05-23 15:45 UTC (permalink / raw) To: initramfs-u79uwXL29TY76Z2rM5mHXA 'Twas brillig, and Dave Young at 22/05/13 11:14 did gyre and gimble: > On 05/22/2013 06:13 PM, Dave Young wrote: >> Hi, Harald >> >> I have a question about selinux module. >> >> In dracut.spec there's below code: >> >> %if %{defined _unitdir} >> # with systemd IMA and selinux modules do not make sense >> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs >> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey >> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity >> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98selinux >> %endif >> >> I'm confused why they are excluded for systemd? >> >> And how can we load selinux policy in initramfs without 98selinux now? >> >> > CC Vivek and Baoquan Harald is on vacation just now I believe. However, assuming the systemd module is being used in dracut than I suspect that the selinux support in systemd itself is what will be used in the initrd to ensure selinux stuff is supported. (I would reply-all but replying via gmane which mangles email addresses so I can't easily do so). Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited http://www.tribalogic.net/ Open Source: Mageia Contributor http://www.mageia.org/ PulseAudio Hacker http://www.pulseaudio.org/ Trac Hacker http://trac.edgewall.org/ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: why not install selinux with systemd being used 2013-05-23 15:45 ` Colin Guthrie @ 2013-05-24 4:21 ` Dave Young 0 siblings, 0 replies; 8+ messages in thread From: Dave Young @ 2013-05-24 4:21 UTC (permalink / raw) To: Colin Guthrie; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA On 05/23/2013 11:45 PM, Colin Guthrie wrote: > 'Twas brillig, and Dave Young at 22/05/13 11:14 did gyre and gimble: >> On 05/22/2013 06:13 PM, Dave Young wrote: >>> Hi, Harald >>> >>> I have a question about selinux module. >>> >>> In dracut.spec there's below code: >>> >>> %if %{defined _unitdir} >>> # with systemd IMA and selinux modules do not make sense >>> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs >>> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey >>> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity >>> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98selinux >>> %endif >>> >>> I'm confused why they are excluded for systemd? >>> >>> And how can we load selinux policy in initramfs without 98selinux now? >>> >>> >> CC Vivek and Baoquan > > Harald is on vacation just now I believe. > > However, assuming the systemd module is being used in dracut than I > suspect that the selinux support in systemd itself is what will be used > in the initrd to ensure selinux stuff is supported. I did not see initramfs related selinux policy loading in systemd code. Under rd.break=pre-pivot: pre-pivot:/# /sysroot/usr/sbin/sestatus SELinux status: disabled > > (I would reply-all but replying via gmane which mangles email addresses > so I can't easily do so). > > Col > > -- Thanks Dave ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: why not install selinux with systemd being used [not found] ` <519C9A7C.7080904-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2013-05-23 15:45 ` Colin Guthrie @ 2013-05-27 11:40 ` Harald Hoyer [not found] ` <51A34632.8040901-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 1 sibling, 1 reply; 8+ messages in thread From: Harald Hoyer @ 2013-05-27 11:40 UTC (permalink / raw) To: Dave Young; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, Vivek Goyal, Baoquan On 05/22/2013 12:14 PM, Dave Young wrote: > On 05/22/2013 06:13 PM, Dave Young wrote: >> Hi, Harald >> >> I have a question about selinux module. >> >> In dracut.spec there's below code: >> >> %if %{defined _unitdir} >> # with systemd IMA and selinux modules do not make sense >> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs >> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey >> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity >> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98selinux >> %endif >> >> I'm confused why they are excluded for systemd? >> >> And how can we load selinux policy in initramfs without 98selinux now? Do you have to load the selinux policy in the initramfs? systemd does it after switching to the real root. ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <51A34632.8040901-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: why not install selinux with systemd being used [not found] ` <51A34632.8040901-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2013-05-28 2:18 ` Dave Young [not found] ` <51A413F4.40806-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Dave Young @ 2013-05-28 2:18 UTC (permalink / raw) To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, Vivek Goyal, Baoquan On 05/27/2013 07:40 PM, Harald Hoyer wrote: > On 05/22/2013 12:14 PM, Dave Young wrote: >> On 05/22/2013 06:13 PM, Dave Young wrote: >>> Hi, Harald >>> >>> I have a question about selinux module. >>> >>> In dracut.spec there's below code: >>> >>> %if %{defined _unitdir} >>> # with systemd IMA and selinux modules do not make sense >>> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs >>> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey >>> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity >>> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98selinux >>> %endif >>> >>> I'm confused why they are excluded for systemd? >>> >>> And how can we load selinux policy in initramfs without 98selinux now? > > Do you have to load the selinux policy in the initramfs? > systemd does it after switching to the real root. > After crashing happens, under kdump kernel we need copy vmcore to filesystem with right selinux attributes. But we are also discussing if it's better to relabel them after machine restart.. -- Thanks Dave ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <51A413F4.40806-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: why not install selinux with systemd being used [not found] ` <51A413F4.40806-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2013-05-28 12:25 ` Harald Hoyer [not found] ` <51A4A228.9000507-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Harald Hoyer @ 2013-05-28 12:25 UTC (permalink / raw) To: Dave Young; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, Vivek Goyal, Baoquan On 05/28/2013 04:18 AM, Dave Young wrote: > On 05/27/2013 07:40 PM, Harald Hoyer wrote: >> On 05/22/2013 12:14 PM, Dave Young wrote: >>> On 05/22/2013 06:13 PM, Dave Young wrote: >>>> Hi, Harald >>>> >>>> I have a question about selinux module. >>>> >>>> In dracut.spec there's below code: >>>> >>>> %if %{defined _unitdir} >>>> # with systemd IMA and selinux modules do not make sense >>>> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs >>>> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey >>>> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity >>>> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98selinux >>>> %endif >>>> >>>> I'm confused why they are excluded for systemd? >>>> >>>> And how can we load selinux policy in initramfs without 98selinux now? >> >> Do you have to load the selinux policy in the initramfs? >> systemd does it after switching to the real root. >> > > After crashing happens, under kdump kernel we need copy vmcore to > filesystem with right selinux attributes. But we are also discussing if > it's better to relabel them after machine restart.. What do you do, if the rootfs is broken? Relabeling seems to be a better solution, IMHO. In theory the relabeling service can also be triggered, when the partition containing the crash is mounted. I agree, that there is a problem, if the crash partition is mounted only readonly. I will put selinux back in the fedora packages, if you really need it. ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <51A4A228.9000507-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: why not install selinux with systemd being used [not found] ` <51A4A228.9000507-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2013-05-28 13:21 ` Vivek Goyal 0 siblings, 0 replies; 8+ messages in thread From: Vivek Goyal @ 2013-05-28 13:21 UTC (permalink / raw) To: Harald Hoyer; +Cc: Dave Young, initramfs-u79uwXL29TY76Z2rM5mHXA, Baoquan On Tue, May 28, 2013 at 02:25:12PM +0200, Harald Hoyer wrote: > On 05/28/2013 04:18 AM, Dave Young wrote: > > On 05/27/2013 07:40 PM, Harald Hoyer wrote: > >> On 05/22/2013 12:14 PM, Dave Young wrote: > >>> On 05/22/2013 06:13 PM, Dave Young wrote: > >>>> Hi, Harald > >>>> > >>>> I have a question about selinux module. > >>>> > >>>> In dracut.spec there's below code: > >>>> > >>>> %if %{defined _unitdir} > >>>> # with systemd IMA and selinux modules do not make sense > >>>> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs > >>>> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey > >>>> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity > >>>> rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98selinux > >>>> %endif > >>>> > >>>> I'm confused why they are excluded for systemd? > >>>> > >>>> And how can we load selinux policy in initramfs without 98selinux now? > >> > >> Do you have to load the selinux policy in the initramfs? > >> systemd does it after switching to the real root. > >> > > > > After crashing happens, under kdump kernel we need copy vmcore to > > filesystem with right selinux attributes. But we are also discussing if > > it's better to relabel them after machine restart.. > > What do you do, if the rootfs is broken? Hi Harald, I guess run fsck and try to repair it. If that does not work, I think all bets are off. One will not be able to boot that system back into same rootfs. > > Relabeling seems to be a better solution, IMHO. > In theory the relabeling service can also be triggered, when the partition > containing the crash is mounted. I was hoping that people will put an entry into fstab file for crash partition so that it automatically gets mounted every reboot. And kdump service can possibly be launched after that. > > I agree, that there is a problem, if the crash partition is mounted only readonly. It indeed is a problem. Partners want crash partition mounted read only to avoid any possibility of somebody writing to it and filling up the space. > > I will put selinux back in the fedora packages, if you really need it. I think it is a good idea to put selinux back in atleast for the time being. This will help with the default case atleast (dump to /var/crash). For rest of the cases we will work on relabeling and hopefully that works reasonably well. Thanks Vivek ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-05-28 13:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-22 10:13 why not install selinux with systemd being used Dave Young
[not found] ` <519C9A2E.2080100-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-22 10:14 ` Dave Young
[not found] ` <519C9A7C.7080904-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-23 15:45 ` Colin Guthrie
2013-05-24 4:21 ` Dave Young
2013-05-27 11:40 ` Harald Hoyer
[not found] ` <51A34632.8040901-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-28 2:18 ` Dave Young
[not found] ` <51A413F4.40806-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-28 12:25 ` Harald Hoyer
[not found] ` <51A4A228.9000507-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-28 13:21 ` Vivek Goyal
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.