XFS security namespace
Subsystems (3)
Announcing the XFS Security Extended Attribute Namepsace
Now available, with the release of kernel 2.6.2, is the security xattr namespace in XFS. Thanks goes to Tad Glines for his initial kernel patch, and Nathan Scott and the other SGI people for the final version that's been integrated. All thats required is the attached patch to make the Security Labels option available (this is already in SGI CVS, slated for inclusion in Linus' tree). Nathan tells me that the namespace code is also in Marcelo's BK tree, and requires a similar config patch.
No updates to attr or xfsprogs are required. xfsdump/restore will need to be updated, but its not ready yet. I've been working with the SGI people on that, so hopefully it will be ready soon.
All that needs to be changed in the policy is to add a fs_use_xattr entry for XFS, and then adjust the Makefile relabel target to relabel XFS filesystems. I have attached a patch against the NSA policy in sourceforge CVS to do this. (note the extra space in the 'make relabel' awk command is intentional, otherwise it matches selinuxfs too)
Signature · 8 lines
Chris PeBenito <[email protected]> Developer, Hardened Gentoo Linux Embedded Gentoo Linux Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE6AF9243 Key fingerprint = B0E6 877A 883F A57A 8E6A CB00 BC8E E42D E6AF 9243
fs/Kconfig +12 -0
@@ -356,6 +356,18 @@ If you don't know what Access Control Lists are, say N +config XFS_SECURITY + bool "Security Labels" + depends on XFS_FS + help + Security labels support alternative access control models + implemented by security modules like SELinux. This option + enables an extended attribute handler for file security + labels in the XFS filesystem. + + If you are not using a security module that requires using + extended attributes for file security labels, say N. + config MINIX_FS tristate "Minix fs support" help
Index: Makefile
===================================================================
RCS file: /cvsroot/selinux/nsa/selinux-usr/policy/Makefile,v retrieving revision 1.10
Makefile +1 -1
@@ -113,7 +113,7 @@ mv [email protected] $@ relabel: $(FC) $(SETFILES) - $(SETFILES) $(FC) `mount | awk '/ext[23].*rw/{print $$3}'` + $(SETFILES) $(FC) `mount | awk '/(ext[23]| xfs).*rw/{print $$3}'` file_contexts/misc: mkdir -p file_contexts/misc
Index: fs_use
===================================================================
RCS file: /cvsroot/selinux/nsa/selinux-usr/policy/fs_use,v retrieving revision 1.1.1.1
fs_use +1 -0
@@ -6,6 +6,7 @@ # Requires that a security xattr handler exist for the filesystem. fs_use_xattr ext2 system_u:object_r:fs_t; fs_use_xattr ext3 system_u:object_r:fs_t; +fs_use_xattr xfs system_u:object_r:fs_t; # Use the allocating task SID to label inodes in the following filesystem # types, and label the filesystem itself with the specified context.
Quoted 5 lines · Chris PeBenito
All that needs to be changed in the policy is to add a
fs_use_xattrentry for XFS, and then adjust theMakefilerelabel target to relabel XFS filesystems. I have attached a patch against the NSA policy in sourceforge CVS to do this. (note the extra space in the 'make relabel' awk command is intentional, otherwise it matches selinuxfs too)
Thanks, this is good news. I've merged this patch into our tree.
Signature · 8 lines
Stephen Smalley <[email protected]> National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.