* idea - running setfiles out of inetd!
@ 2004-08-17 19:47 Luke Kenneth Casson Leighton
2004-08-18 9:56 ` Russell Coker
0 siblings, 1 reply; 4+ messages in thread
From: Luke Kenneth Casson Leighton @ 2004-08-17 19:47 UTC (permalink / raw)
To: SE-Linux; +Cc: Linux Hotplug Dev List
okay, this may sound a bit mad.
i'm trying to think of simple ways to speed up udev, amongst other
things.
i'd like to canvas people's opinions of running
"setfiles -q -s /etc/selinux/contexts/file_contexts" from inetd
on a unix-domain-socket, or a tcpwrapper or _something_ that will
get it to listen on its stdin for filenames to restore contexts
on.
the alternative is, in the case of udev, to merge the functionality
of udevd and udevsend, such that the file context cacheing can
be taken advantage of.
at present, udevd execv's a new udevsend on each and _every_ device.
thoughts anyone?
l.
--
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love. If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
<a href="http://lkcl.net"> lkcl.net </a> <br />
<a href="mailto:lkcl@lkcl.net"> lkcl@lkcl.net </a> <br />
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: idea - running setfiles out of inetd!
2004-08-17 19:47 idea - running setfiles out of inetd! Luke Kenneth Casson Leighton
@ 2004-08-18 9:56 ` Russell Coker
2004-08-18 16:04 ` Luke Kenneth Casson Leighton
0 siblings, 1 reply; 4+ messages in thread
From: Russell Coker @ 2004-08-18 9:56 UTC (permalink / raw)
To: Luke Kenneth Casson Leighton; +Cc: SE-Linux, Linux Hotplug Dev List
On Wed, 18 Aug 2004 05:47, Luke Kenneth Casson Leighton <lkcl@lkcl.net> wrote:
> i'd like to canvas people's opinions of running
> "setfiles -q -s /etc/selinux/contexts/file_contexts" from inetd
Bad idea, anyone can call it.
> the alternative is, in the case of udev, to merge the functionality
> of udevd and udevsend, such that the file context cacheing can
> be taken advantage of.
What if udev spawns "setfiles -q -s" and then sends the file names down the
pipe to it only closing the pipe after a certain time period of no new nodes?
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: idea - running setfiles out of inetd!
2004-08-18 9:56 ` Russell Coker
@ 2004-08-18 16:04 ` Luke Kenneth Casson Leighton
2004-08-19 4:55 ` Russell Coker
0 siblings, 1 reply; 4+ messages in thread
From: Luke Kenneth Casson Leighton @ 2004-08-18 16:04 UTC (permalink / raw)
To: Russell Coker; +Cc: SE-Linux, Linux Hotplug Dev List
On Wed, Aug 18, 2004 at 07:56:46PM +1000, Russell Coker wrote:
> On Wed, 18 Aug 2004 05:47, Luke Kenneth Casson Leighton <lkcl@lkcl.net> wrote:
> > i'd like to canvas people's opinions of running
> > "setfiles -q -s /etc/selinux/contexts/file_contexts" from inetd
>
> Bad idea, anyone can call it.
i've done root-only-accessible unix domain socket stuff before now,
it's necessary to create a directory which is 0500 and then inside
that the socket is 0600 [some unixen don't support permissions on
sockets]
> > the alternative is, in the case of udev, to merge the functionality
> > of udevd and udevsend, such that the file context cacheing can
> > be taken advantage of.
>
> What if udev spawns "setfiles -q -s" and then sends the file names down the
> pipe to it only closing the pipe after a certain time period of no new nodes?
okay, cool...
so.... hey yes, of course.
yes, so that could be run from the main udev process, i get it.
and you exec each udevstart to create the file name, and then
send the same filename down to the "setfiles -q -s".
is using popen() okay to do that?
what implications [on policy writing and also security]
will it have to be running setfiles from inside udev
(bearing in mind that popen involves a pipe and a fork)
... darn! how many programs has udev been split into??? :)
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: idea - running setfiles out of inetd!
2004-08-18 16:04 ` Luke Kenneth Casson Leighton
@ 2004-08-19 4:55 ` Russell Coker
0 siblings, 0 replies; 4+ messages in thread
From: Russell Coker @ 2004-08-19 4:55 UTC (permalink / raw)
To: Luke Kenneth Casson Leighton; +Cc: SE-Linux, Linux Hotplug Dev List
On Thu, 19 Aug 2004 02:04, Luke Kenneth Casson Leighton <lkcl@lkcl.net> wrote:
> > What if udev spawns "setfiles -q -s" and then sends the file names down
> > the pipe to it only closing the pipe after a certain time period of no
> > new nodes?
>
> okay, cool...
>
> so.... hey yes, of course.
>
> yes, so that could be run from the main udev process, i get it.
>
> and you exec each udevstart to create the file name, and then
> send the same filename down to the "setfiles -q -s".
Yes.
> is using popen() okay to do that?
Should be.
> what implications [on policy writing and also security]
> will it have to be running setfiles from inside udev
> (bearing in mind that popen involves a pipe and a fork)
Nothing significant. I don't think we'll have a domain transition (don't want
it to relabel arbitrary files), just have it run in udev_t (which should
already have most if not all the access needed for this.
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-08-19 4:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-17 19:47 idea - running setfiles out of inetd! Luke Kenneth Casson Leighton
2004-08-18 9:56 ` Russell Coker
2004-08-18 16:04 ` Luke Kenneth Casson Leighton
2004-08-19 4:55 ` Russell Coker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).