All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
To: Joshua Brindle <jbrindle@tresys.com>
Cc: Greg KH <greg@kroah.com>,
	russell@coker.com.au, SE Linux <selinux@tycho.nsa.gov>,
	fedora-selinux-list@redhat.com
Subject: Re: Fedora and udev
Date: Tue, 24 Aug 2004 10:28:53 +0100	[thread overview]
Message-ID: <20040824092853.GD25356@lkcl.net> (raw)
In-Reply-To: <412A74A6.9070206@tresys.com>

On Mon, Aug 23, 2004 at 06:50:14PM -0400, Joshua Brindle wrote:

> Greg KH wrote:
> 
> >Please fix that patch up to:
> >	- not have any ifdef in the .c files
> >	- use the proper coding style
> >	- use the same convention as the other build flags have.
> >
> >Actually, what was wrong with the older selinux support in udev that was
> >there?  Why not just dig that stuff up and see if it works or not (I bet
> >it does...)  If so, I'll be glad to add it back in, it's just that too
> >many people complained about it when it was in there...
> > 
> >
> Who complained and why? When selinux support wasn't built in the 
> functions were just stubs, how could that have possibly had any effect 
> whatsoever on anyone else?

 there was a bugreport on debian.org complaining about the d-bus support
 which took ONE SECOND per inode created (most probably due to poor
 design of d-bus, e.g. not having a prefork'd server like apache does)

 due to the multi-exe design of udev (udevd, udev, udevsend) it is quite
 difficult to maintain persistent network or socket connections such
 that both d-bus and libselinux1 "cacheing" can be taken advantage of.

 [libselinux1 does cacheing of file context lookups - this can only
  be taken advantage of IF you use a single process, of course - and
  udevsend is only given ONE device name to create, and then it exits]

 consequently, d-bus support was ripped out and disabled.

 and it looks like the selinux support, which wasn't very good anyway,
 was also removed and turned into a script that ran "restorecon"
 post-inode creation, see /etc/udev.d/default/selinux.


> If you could, please paste a patch from the older version so that we can 
> see here whether it should work right (it's possible that the libselinux 
> api changed between then and now)
 
 udev-0.024 was the last version containing selinux support, i had to
 track it down.

 iirc:
 
 1) it used setfilecon() not setfscreatecon().

 2) it ONLY set the permissions on the inode NOT on any symlinks and NOT
    on any directories or subdirectories created.


 the patch i created is at least an attempt to GetThingsWorking(tm).

 if time REALLY IS a major concern:

 what _should_ be done is that udev (or udevd) should be patched to
 popen("setfiles -q -s", "w") and then when each device inode is
 created (and a udevsend is exec'd to do it), the filename of the
 device inode is ALSO sent down the pipe to setfiles.

 i say should, what i mean is, this is the most non-nasty solution
 with the tools and options presently available.

 if the file_contexts stuff was somehow pre-munged and
 transferred into kernel, and the regexp matching code (or
 something similar) was _also_ transferred into the kernel,
 then this problem would go away.

 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 />


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2004-08-24  9:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-22 11:25 Fedora and udev Russell Coker
2004-08-22 14:40 ` Luke Kenneth Casson Leighton
2004-08-22 15:29   ` Joshua Brindle
2004-08-22 16:23     ` Luke Kenneth Casson Leighton
2004-08-23 13:04     ` Stephen Smalley
2004-08-22 15:05 ` Joshua Brindle
2004-08-22 17:34   ` Luke Kenneth Casson Leighton
     [not found]     ` <20040823224444.GI4694@kroah.com>
2004-08-23 22:50       ` Joshua Brindle
2004-08-24  9:28         ` Luke Kenneth Casson Leighton [this message]
2004-08-24 10:06           ` Russell Coker
2004-08-24 14:18             ` Luke Kenneth Casson Leighton
2004-08-24 16:01               ` Luke Kenneth Casson Leighton
2004-08-24 22:23                 ` Luke Kenneth Casson Leighton
2004-08-24 11:50           ` Stephen Smalley
2004-08-24  9:41         ` Luke Kenneth Casson Leighton
     [not found]           ` <20040824163048.GA1715@kroah.com>
2004-08-26 13:57             ` Daniel J Walsh
2004-08-26 13:59               ` Joshua Brindle
     [not found] ` <orzn4nuval.fsf@livre.redhat.lsd.ic.unicamp.br>
2004-08-23  2:09   ` Russell Coker
2004-08-23  8:56     ` Luke Kenneth Casson Leighton
2004-08-23 12:04       ` Luke Kenneth Casson Leighton
     [not found]     ` <1093286952.4101.47.camel@bree.local.net>
2004-08-24  7:25       ` Russell Coker
2004-08-23  2:33 ` James Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040824092853.GD25356@lkcl.net \
    --to=lkcl@lkcl.net \
    --cc=fedora-selinux-list@redhat.com \
    --cc=greg@kroah.com \
    --cc=jbrindle@tresys.com \
    --cc=russell@coker.com.au \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.