Re: devfs_contexts

From: Stephen Smalley <sds_at_tislabs.com>
Date: Fri, 18 Jan 2002 12:50:46 -0500 (EST)

On Fri, 18 Jan 2002, Russell Coker wrote:

> OK. I've just used chsid as I can't find chcon. Is chcon still in the
> source distribution? If so where?

chcon is in the modified fileutils package. But you can also use chsid or setfiles to label existing devfs nodes - all three programs invoke the chsid system call to set the label on a file when run on a SELinux kernel. chcon is merely a nicer interface than chsid that is derived from the existing chmod/chown programs in fileutils.

For filesystems that use the persistent label mapping (e.g. ext2, ext3, reiserfs), the label will set by the chsid call be retained across reboots since it is stored in that mapping. For pseudo filesystems like devfs, the label won't be retained across reboots unless you also add it to devfs_contexts, because there is no persistent storage of the label. So, if you want the labels to persist, you'll need to update devfs_contexts and then reboot.

--
Stephen D. Smalley, NAI Labs
ssmalley@nai.com




--
You have received this message because you are subscribed to the selinux 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.
Received on Fri 18 Jan 2002 - 12:55:50 EST

This archive was generated by hypermail 2.2.0 on Wed 11 Jun 2008 - 08:10:26 EDT