[[email protected]: Re: temporary hack to use udev in selinux]
i believe that the use of the udev_selinux stuff was there to make the node creation have the correct permissions at create time.
this would at least avoid _one_ race condition.
l.
----- Forwarded message from Stephen Smalley <[email protected]> -----
Envelope-to: lkcl@localhost
Delivery-date: Thu, 29 Jul 2004 14:33:18 +0100
X-Sieve: CMU Sieve 2.2
Subject: Re: temporary hack to use udev in selinux
From: Stephen Smalley <[email protected]>
To: Joshua Brindle <[email protected]>
Cc: Luke Kenneth Casson Leighton <[email protected]>,
SE-Linux <[email protected]>, James Morris <[email protected]>, Daniel J Walsh <[email protected]>
Organization: National Security Agency
X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at hands.com
Quoted 4 lines · Joshua Brindle
Chris PeBenito made this patch for Gentoo when we were evalutating udev on selinux
http://dev.gentoo.org/~method/1330_linux-2.6.5-ramfs-xattr.patch
Why wasn't this submitted upstream? ramfs xattr support (and likewise for other pseudo fs's like tmpfs) has been on our todo list for some time.
Quoted 7 lines
that should patch cleanly into 2.6.7, but I'd like to note that at this point udev is braindead wrt SELinux.
Once upon a time udev had selinux support integrated so that setfscreate was called to set the context of the devices being written however it was changed at some point to make SELinux an after device creation addon script which makes it label the devices after they are created. Because of this Hardened Gentoo has decided not to support udev at this time.
I haven't tried udev myself, but I think Dan has used it successfully with SELinux. I'd agree that having udev directly call matchpathcon() and then setfscreatecon() prior to node creation would be preferable, but I'm not sure that it is strictly necessary - as long as the default creation type is suitably restrictive and nothing tries to access it prior to the restorecon.
Signature · 27 lines
Stephen Smalley <[email protected]> National Security Agency ----- End forwarded message ----- -- -- Information I post is with honesty, integrity, and the expectation that you will take full responsibility if acting on the information contained, and that, should you find it to be flawed or even mildly useful, you will act with both honesty and integrity in return - and tell me. -- <a href="http://lkcl.net"> lkcl.net </a> <br /> <a href="mailto:[email protected]"> [email protected] </a> <br /> ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idG21&alloc_id040&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel