linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC: 2.6 patch] make the *FS_SECURITY options no longer user visible
@ 2007-07-29 15:02 Adrian Bunk
  2007-07-29 23:29 ` [xfs-masters] " David Chinner
  2007-07-30 13:12 ` Serge E. Hallyn
  0 siblings, 2 replies; 5+ messages in thread
From: Adrian Bunk @ 2007-07-29 15:02 UTC (permalink / raw)
  To: chrisw
  Cc: jfs-discussion, jmorris, reiserfs-devel, xfs-masters,
	linux-security-module, jffs-dev, eparis, linux-ext4, sds

Please correct me if any of the following assumptions is wrong:
- SELinux is currently the only user of filesystem security labels
  shipped with the Linux kernel
- if a user has SELinux enabled he wants his filesystems to support
  security labels

Based on these assumption, it doesn't make sense to have the
*FS_SECURITY user visible since we can perfectly determine automatically 
when turning them on makes sense.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 fs/Kconfig     |   82 +++++++++++++------------------------------------
 fs/xfs/Kconfig |   13 +------
 2 files changed, 25 insertions(+), 70 deletions(-)

--- linux-2.6.23-rc1-mm1/fs/Kconfig.old	2007-07-28 23:12:19.000000000 +0200
+++ linux-2.6.23-rc1-mm1/fs/Kconfig	2007-07-28 23:17:33.000000000 +0200
@@ -40,16 +40,10 @@ config EXT2_FS_POSIX_ACL
 	  If you don't know what Access Control Lists are, say N
 
 config EXT2_FS_SECURITY
-	bool "Ext2 Security Labels"
-	depends on EXT2_FS_XATTR
-	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 ext2 filesystem.
-
-	  If you are not using a security module that requires using
-	  extended attributes for file security labels, say N.
+	bool
+	depends on EXT2_FS && SECURITY_SELINUX
+	select EXT2_FS_XATTR
+	default y
 
 config EXT2_FS_XIP
 	bool "Ext2 execute in place support"
@@ -125,16 +119,10 @@ config EXT3_FS_POSIX_ACL
 	  If you don't know what Access Control Lists are, say N
 
 config EXT3_FS_SECURITY
-	bool "Ext3 Security Labels"
-	depends on EXT3_FS_XATTR
-	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 ext3 filesystem.
-
-	  If you are not using a security module that requires using
-	  extended attributes for file security labels, say N.
+	bool
+	depends on EXT3_FS && SECURITY_SELINUX
+	select EXT3_FS_XATTR
+	default y
 
 config EXT4DEV_FS
 	tristate "Ext4dev/ext4 extended fs support development (EXPERIMENTAL)"
@@ -190,16 +178,10 @@ config EXT4DEV_FS_POSIX_ACL
 	  If you don't know what Access Control Lists are, say N
 
 config EXT4DEV_FS_SECURITY
-	bool "Ext4dev Security Labels"
-	depends on EXT4DEV_FS_XATTR
-	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 ext4dev/ext4 filesystem.
-
-	  If you are not using a security module that requires using
-	  extended attributes for file security labels, say N.
+	bool
+	depends on EXT4DEV_FS && SECURITY_SELINUX
+	select EXT4DEV_FS_XATTR
+	default y
 
 config JBD
 	tristate
@@ -349,16 +331,10 @@ config REISERFS_FS_POSIX_ACL
 	  If you don't know what Access Control Lists are, say N
 
 config REISERFS_FS_SECURITY
-	bool "ReiserFS Security Labels"
-	depends on REISERFS_FS_XATTR
-	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 ReiserFS filesystem.
-
-	  If you are not using a security module that requires using
-	  extended attributes for file security labels, say N.
+	bool
+	depends on REISERFS_FS && SECURITY_SELINUX
+	select REISERFS_FS_XATTR
+	default y
 
 config JFS_FS
 	tristate "JFS filesystem support"
@@ -383,16 +359,9 @@ config JFS_POSIX_ACL
 	  If you don't know what Access Control Lists are, say N
 
 config JFS_SECURITY
-	bool "JFS Security Labels"
-	depends on JFS_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 jfs filesystem.
-
-	  If you are not using a security module that requires using
-	  extended attributes for file security labels, say N.
+	bool
+	depends on JFS_FS && SECURITY_SELINUX
+	default y
 
 config JFS_DEBUG
 	bool "JFS debugging"
@@ -1300,17 +1269,10 @@ config JFFS2_FS_POSIX_ACL
 	  If you don't know what Access Control Lists are, say N
 
 config JFFS2_FS_SECURITY
-	bool "JFFS2 Security Labels"
-	depends on JFFS2_FS_XATTR
+	bool
+	depends on JFFS2_FS && SECURITY_SELINUX
+	select JFFS2_FS_XATTR
 	default y
-	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 jffs2 filesystem.
-
-	  If you are not using a security module that requires using
-	  extended attributes for file security labels, say N.
 
 config JFFS2_COMPRESSION_OPTIONS
 	bool "Advanced compression options for JFFS2"
--- linux-2.6.23-rc1-mm1/fs/xfs/Kconfig.old	2007-07-28 23:19:13.000000000 +0200
+++ linux-2.6.23-rc1-mm1/fs/xfs/Kconfig	2007-07-28 23:19:49.000000000 +0200
@@ -36,16 +36,9 @@ config XFS_QUOTA
 	  they are completely independent subsystems.
 
 config XFS_SECURITY
-	bool "XFS Security Label support"
-	depends on XFS_FS
-	help
-	  Security labels support alternative access control models
-	  implemented by security modules like SELinux.  This option
-	  enables an extended attribute namespace for inode security
-	  labels in the XFS filesystem.
-
-	  If you are not using a security module that requires using
-	  extended attributes for inode security labels, say N.
+	bool
+	depends on XFS_FS && SECURITY_SELINUX
+	default y
 
 config XFS_POSIX_ACL
 	bool "XFS POSIX ACL support"


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [xfs-masters] [RFC: 2.6 patch] make the *FS_SECURITY options no longer user visible
  2007-07-29 15:02 [RFC: 2.6 patch] make the *FS_SECURITY options no longer user visible Adrian Bunk
@ 2007-07-29 23:29 ` David Chinner
  2007-07-30 12:27   ` Stephen Smalley
  2007-07-30 13:12 ` Serge E. Hallyn
  1 sibling, 1 reply; 5+ messages in thread
From: David Chinner @ 2007-07-29 23:29 UTC (permalink / raw)
  To: xfs-masters
  Cc: chrisw, linux-security-module, sds, jmorris, eparis, linux-ext4,
	reiserfs-devel, jfs-discussion, jffs-dev

On Sun, Jul 29, 2007 at 05:02:09PM +0200, Adrian Bunk wrote:
> Please correct me if any of the following assumptions is wrong:
> - SELinux is currently the only user of filesystem security labels
>   shipped with the Linux kernel
> - if a user has SELinux enabled he wants his filesystems to support
>   security labels
> 
> Based on these assumption, it doesn't make sense to have the
> *FS_SECURITY user visible since we can perfectly determine automatically 
> when turning them on makes sense.

Hmmm. The code in XFS is not dependent on selinux, but this change
would mean that testing the security xattr namespace would require a
selinux enabled kernel.

I agree that the default for these should be "y" and selected if
selinux is enabled, but forcing us to use selinux enabled kernels
(on distro's that may not support selinux) just to test the
security xattr namespace is a bit of a pain.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [xfs-masters] [RFC: 2.6 patch] make the *FS_SECURITY options no longer user visible
  2007-07-29 23:29 ` [xfs-masters] " David Chinner
@ 2007-07-30 12:27   ` Stephen Smalley
  2007-08-02 12:21     ` David Chinner
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Smalley @ 2007-07-30 12:27 UTC (permalink / raw)
  To: David Chinner
  Cc: jfs-discussion, jmorris, reiserfs-devel, chrisw, xfs-masters,
	linux-security-module, jffs-dev, eparis, linux-ext4

On Mon, 2007-07-30 at 09:29 +1000, David Chinner wrote:
> On Sun, Jul 29, 2007 at 05:02:09PM +0200, Adrian Bunk wrote:
> > Please correct me if any of the following assumptions is wrong:
> > - SELinux is currently the only user of filesystem security labels
> >   shipped with the Linux kernel
> > - if a user has SELinux enabled he wants his filesystems to support
> >   security labels
> > 
> > Based on these assumption, it doesn't make sense to have the
> > *FS_SECURITY user visible since we can perfectly determine automatically 
> > when turning them on makes sense.
> 
> Hmmm. The code in XFS is not dependent on selinux, but this change
> would mean that testing the security xattr namespace would require a
> selinux enabled kernel.
> 
> I agree that the default for these should be "y" and selected if
> selinux is enabled, but forcing us to use selinux enabled kernels
> (on distro's that may not support selinux) just to test the
> security xattr namespace is a bit of a pain.

You can enable SECURITY_SELINUX in the kernel config but still have it
boot disabled by default via SECURITY_SELINUX_BOOTPARAM_VALUE=0.

-- 
Stephen Smalley
National Security Agency


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC: 2.6 patch] make the *FS_SECURITY options no longer user visible
  2007-07-29 15:02 [RFC: 2.6 patch] make the *FS_SECURITY options no longer user visible Adrian Bunk
  2007-07-29 23:29 ` [xfs-masters] " David Chinner
@ 2007-07-30 13:12 ` Serge E. Hallyn
  1 sibling, 0 replies; 5+ messages in thread
From: Serge E. Hallyn @ 2007-07-30 13:12 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: chrisw, linux-security-module, sds, jmorris, eparis, linux-ext4,
	reiserfs-devel, jfs-discussion, jffs-dev, xfs-masters

Quoting Adrian Bunk (bunk@stusta.de):
> Please correct me if any of the following assumptions is wrong:
> - SELinux is currently the only user of filesystem security labels
>   shipped with the Linux kernel
> - if a user has SELinux enabled he wants his filesystems to support
>   security labels
> 
> Based on these assumption, it doesn't make sense to have the
> *FS_SECURITY user visible since we can perfectly determine automatically 
> when turning them on makes sense.

I'm not very knowledgeable on the niftier kconfig features.  Is there a
way to introduce some intermediate SECURITY_XATTR variable, which
SECURITY_SELINUX could select, and which *_FS_SECURITY could depend on?

That way patches for file capabilities (in -mm) and smack (being
discussed on linux-security-module) won't have to explicitly add
themselves to every one of those 'depends on' lines.

thanks,
-serge

> Signed-off-by: Adrian Bunk <bunk@stusta.de>
> 
> ---
> 
>  fs/Kconfig     |   82 +++++++++++++------------------------------------
>  fs/xfs/Kconfig |   13 +------
>  2 files changed, 25 insertions(+), 70 deletions(-)
> 
> --- linux-2.6.23-rc1-mm1/fs/Kconfig.old	2007-07-28 23:12:19.000000000 +0200
> +++ linux-2.6.23-rc1-mm1/fs/Kconfig	2007-07-28 23:17:33.000000000 +0200
> @@ -40,16 +40,10 @@ config EXT2_FS_POSIX_ACL
>  	  If you don't know what Access Control Lists are, say N
> 
>  config EXT2_FS_SECURITY
> -	bool "Ext2 Security Labels"
> -	depends on EXT2_FS_XATTR
> -	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 ext2 filesystem.
> -
> -	  If you are not using a security module that requires using
> -	  extended attributes for file security labels, say N.
> +	bool
> +	depends on EXT2_FS && SECURITY_SELINUX
> +	select EXT2_FS_XATTR
> +	default y
> 
>  config EXT2_FS_XIP
>  	bool "Ext2 execute in place support"
> @@ -125,16 +119,10 @@ config EXT3_FS_POSIX_ACL
>  	  If you don't know what Access Control Lists are, say N
> 
>  config EXT3_FS_SECURITY
> -	bool "Ext3 Security Labels"
> -	depends on EXT3_FS_XATTR
> -	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 ext3 filesystem.
> -
> -	  If you are not using a security module that requires using
> -	  extended attributes for file security labels, say N.
> +	bool
> +	depends on EXT3_FS && SECURITY_SELINUX
> +	select EXT3_FS_XATTR
> +	default y
> 
>  config EXT4DEV_FS
>  	tristate "Ext4dev/ext4 extended fs support development (EXPERIMENTAL)"
> @@ -190,16 +178,10 @@ config EXT4DEV_FS_POSIX_ACL
>  	  If you don't know what Access Control Lists are, say N
> 
>  config EXT4DEV_FS_SECURITY
> -	bool "Ext4dev Security Labels"
> -	depends on EXT4DEV_FS_XATTR
> -	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 ext4dev/ext4 filesystem.
> -
> -	  If you are not using a security module that requires using
> -	  extended attributes for file security labels, say N.
> +	bool
> +	depends on EXT4DEV_FS && SECURITY_SELINUX
> +	select EXT4DEV_FS_XATTR
> +	default y
> 
>  config JBD
>  	tristate
> @@ -349,16 +331,10 @@ config REISERFS_FS_POSIX_ACL
>  	  If you don't know what Access Control Lists are, say N
> 
>  config REISERFS_FS_SECURITY
> -	bool "ReiserFS Security Labels"
> -	depends on REISERFS_FS_XATTR
> -	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 ReiserFS filesystem.
> -
> -	  If you are not using a security module that requires using
> -	  extended attributes for file security labels, say N.
> +	bool
> +	depends on REISERFS_FS && SECURITY_SELINUX
> +	select REISERFS_FS_XATTR
> +	default y
> 
>  config JFS_FS
>  	tristate "JFS filesystem support"
> @@ -383,16 +359,9 @@ config JFS_POSIX_ACL
>  	  If you don't know what Access Control Lists are, say N
> 
>  config JFS_SECURITY
> -	bool "JFS Security Labels"
> -	depends on JFS_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 jfs filesystem.
> -
> -	  If you are not using a security module that requires using
> -	  extended attributes for file security labels, say N.
> +	bool
> +	depends on JFS_FS && SECURITY_SELINUX
> +	default y
> 
>  config JFS_DEBUG
>  	bool "JFS debugging"
> @@ -1300,17 +1269,10 @@ config JFFS2_FS_POSIX_ACL
>  	  If you don't know what Access Control Lists are, say N
> 
>  config JFFS2_FS_SECURITY
> -	bool "JFFS2 Security Labels"
> -	depends on JFFS2_FS_XATTR
> +	bool
> +	depends on JFFS2_FS && SECURITY_SELINUX
> +	select JFFS2_FS_XATTR
>  	default y
> -	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 jffs2 filesystem.
> -
> -	  If you are not using a security module that requires using
> -	  extended attributes for file security labels, say N.
> 
>  config JFFS2_COMPRESSION_OPTIONS
>  	bool "Advanced compression options for JFFS2"
> --- linux-2.6.23-rc1-mm1/fs/xfs/Kconfig.old	2007-07-28 23:19:13.000000000 +0200
> +++ linux-2.6.23-rc1-mm1/fs/xfs/Kconfig	2007-07-28 23:19:49.000000000 +0200
> @@ -36,16 +36,9 @@ config XFS_QUOTA
>  	  they are completely independent subsystems.
> 
>  config XFS_SECURITY
> -	bool "XFS Security Label support"
> -	depends on XFS_FS
> -	help
> -	  Security labels support alternative access control models
> -	  implemented by security modules like SELinux.  This option
> -	  enables an extended attribute namespace for inode security
> -	  labels in the XFS filesystem.
> -
> -	  If you are not using a security module that requires using
> -	  extended attributes for inode security labels, say N.
> +	bool
> +	depends on XFS_FS && SECURITY_SELINUX
> +	default y
> 
>  config XFS_POSIX_ACL
>  	bool "XFS POSIX ACL support"
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [xfs-masters] [RFC: 2.6 patch] make the *FS_SECURITY options no longer user visible
  2007-07-30 12:27   ` Stephen Smalley
@ 2007-08-02 12:21     ` David Chinner
  0 siblings, 0 replies; 5+ messages in thread
From: David Chinner @ 2007-08-02 12:21 UTC (permalink / raw)
  To: Stephen Smalley
  Cc: David Chinner, xfs-masters, chrisw, linux-security-module,
	jmorris, eparis, linux-ext4, reiserfs-devel, jfs-discussion,
	jffs-dev

On Mon, Jul 30, 2007 at 08:27:47AM -0400, Stephen Smalley wrote:
> On Mon, 2007-07-30 at 09:29 +1000, David Chinner wrote:
> > On Sun, Jul 29, 2007 at 05:02:09PM +0200, Adrian Bunk wrote:
> > > Please correct me if any of the following assumptions is wrong:
> > > - SELinux is currently the only user of filesystem security labels
> > >   shipped with the Linux kernel
> > > - if a user has SELinux enabled he wants his filesystems to support
> > >   security labels
> > > 
> > > Based on these assumption, it doesn't make sense to have the
> > > *FS_SECURITY user visible since we can perfectly determine automatically 
> > > when turning them on makes sense.
> > 
> > Hmmm. The code in XFS is not dependent on selinux, but this change
> > would mean that testing the security xattr namespace would require a
> > selinux enabled kernel.
> > 
> > I agree that the default for these should be "y" and selected if
> > selinux is enabled, but forcing us to use selinux enabled kernels
> > (on distro's that may not support selinux) just to test the
> > security xattr namespace is a bit of a pain.
> 
> You can enable SECURITY_SELINUX in the kernel config but still have it
> boot disabled by default via SECURITY_SELINUX_BOOTPARAM_VALUE=0.

Ok, that shouldn't cause a problem then. Objection withdrawn. ;)

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-08-02 12:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-29 15:02 [RFC: 2.6 patch] make the *FS_SECURITY options no longer user visible Adrian Bunk
2007-07-29 23:29 ` [xfs-masters] " David Chinner
2007-07-30 12:27   ` Stephen Smalley
2007-08-02 12:21     ` David Chinner
2007-07-30 13:12 ` Serge E. Hallyn

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).