* [PATCH] remove CONFIG_XFS_SECURITY
@ 2008-01-07 3:36 Eric Sandeen
2008-01-07 7:12 ` Christoph Hellwig
2008-02-20 0:42 ` Eric Sandeen
0 siblings, 2 replies; 8+ messages in thread
From: Eric Sandeen @ 2008-01-07 3:36 UTC (permalink / raw)
To: xfs-oss
Is there any point to this option? Sure, it disables the ability
to set security attributes at runtime, but it doesn't slim down
any code.
Any reason to not remove it, and always allow security attributes
to be set?
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---
Index: linux-2.6.24-rc3/fs/xfs/Kconfig
===================================================================
--- linux-2.6.24-rc3.orig/fs/xfs/Kconfig
+++ linux-2.6.24-rc3/fs/xfs/Kconfig
@@ -35,18 +35,6 @@ config XFS_QUOTA
with or without the generic quota support enabled (CONFIG_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.
-
config XFS_POSIX_ACL
bool "XFS POSIX ACL support"
depends on XFS_FS
Index: linux-2.6.24-rc3/fs/xfs/linux-2.6/xfs_super.h
===================================================================
--- linux-2.6.24-rc3.orig/fs/xfs/linux-2.6/xfs_super.h
+++ linux-2.6.24-rc3/fs/xfs/linux-2.6/xfs_super.h
@@ -50,13 +50,8 @@ extern void xfs_qm_exit(void);
# define set_posix_acl_flag(sb) do { } while (0)
#endif
-#ifdef CONFIG_XFS_SECURITY
-# define XFS_SECURITY_STRING "security attributes, "
-# define ENOSECURITY 0
-#else
-# define XFS_SECURITY_STRING
-# define ENOSECURITY EOPNOTSUPP
-#endif
+/* Used to be "configurable" so keep it around. */
+#define XFS_SECURITY_STRING "security attributes, "
#ifdef CONFIG_XFS_RT
# define XFS_REALTIME_STRING "realtime, "
Index: linux-2.6.24-rc3/fs/xfs/xfs_attr.c
===================================================================
--- linux-2.6.24-rc3.orig/fs/xfs/xfs_attr.c
+++ linux-2.6.24-rc3/fs/xfs/xfs_attr.c
@@ -2651,7 +2651,7 @@ attr_secure_capable(
bhv_vnode_t *vp,
cred_t *cred)
{
- return -ENOSECURITY;
+ return 0;
}
STATIC int
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] remove CONFIG_XFS_SECURITY 2008-01-07 3:36 [PATCH] remove CONFIG_XFS_SECURITY Eric Sandeen @ 2008-01-07 7:12 ` Christoph Hellwig 2008-02-20 0:42 ` Eric Sandeen 1 sibling, 0 replies; 8+ messages in thread From: Christoph Hellwig @ 2008-01-07 7:12 UTC (permalink / raw) To: Eric Sandeen; +Cc: xfs-oss On Sun, Jan 06, 2008 at 09:36:39PM -0600, Eric Sandeen wrote: > Is there any point to this option? Sure, it disables the ability > to set security attributes at runtime, but it doesn't slim down > any code. > > Any reason to not remove it, and always allow security attributes > to be set? I suspect the reason it is there currently is because the other filesystems have similar option. Removing it sounds perfectly fine to me. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] remove CONFIG_XFS_SECURITY 2008-01-07 3:36 [PATCH] remove CONFIG_XFS_SECURITY Eric Sandeen 2008-01-07 7:12 ` Christoph Hellwig @ 2008-02-20 0:42 ` Eric Sandeen 2008-04-07 2:23 ` Timothy Shimmin 1 sibling, 1 reply; 8+ messages in thread From: Eric Sandeen @ 2008-02-20 0:42 UTC (permalink / raw) To: xfs-oss Eric Sandeen wrote: > Is there any point to this option? Sure, it disables the ability > to set security attributes at runtime, but it doesn't slim down > any code. > > Any reason to not remove it, and always allow security attributes > to be set? Ack? Nak? Comments? -Eric > Signed-off-by: Eric Sandeen <sandeen@sandeen.net> > > --- > > Index: linux-2.6.24-rc3/fs/xfs/Kconfig > =================================================================== > --- linux-2.6.24-rc3.orig/fs/xfs/Kconfig > +++ linux-2.6.24-rc3/fs/xfs/Kconfig > @@ -35,18 +35,6 @@ config XFS_QUOTA > with or without the generic quota support enabled (CONFIG_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. > - > config XFS_POSIX_ACL > bool "XFS POSIX ACL support" > depends on XFS_FS > Index: linux-2.6.24-rc3/fs/xfs/linux-2.6/xfs_super.h > =================================================================== > --- linux-2.6.24-rc3.orig/fs/xfs/linux-2.6/xfs_super.h > +++ linux-2.6.24-rc3/fs/xfs/linux-2.6/xfs_super.h > @@ -50,13 +50,8 @@ extern void xfs_qm_exit(void); > # define set_posix_acl_flag(sb) do { } while (0) > #endif > > -#ifdef CONFIG_XFS_SECURITY > -# define XFS_SECURITY_STRING "security attributes, " > -# define ENOSECURITY 0 > -#else > -# define XFS_SECURITY_STRING > -# define ENOSECURITY EOPNOTSUPP > -#endif > +/* Used to be "configurable" so keep it around. */ > +#define XFS_SECURITY_STRING "security attributes, " > > #ifdef CONFIG_XFS_RT > # define XFS_REALTIME_STRING "realtime, " > Index: linux-2.6.24-rc3/fs/xfs/xfs_attr.c > =================================================================== > --- linux-2.6.24-rc3.orig/fs/xfs/xfs_attr.c > +++ linux-2.6.24-rc3/fs/xfs/xfs_attr.c > @@ -2651,7 +2651,7 @@ attr_secure_capable( > bhv_vnode_t *vp, > cred_t *cred) > { > - return -ENOSECURITY; > + return 0; > } > > STATIC int > > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] remove CONFIG_XFS_SECURITY 2008-02-20 0:42 ` Eric Sandeen @ 2008-04-07 2:23 ` Timothy Shimmin 2008-04-11 14:39 ` [PATCH V2] " Eric Sandeen 0 siblings, 1 reply; 8+ messages in thread From: Timothy Shimmin @ 2008-04-07 2:23 UTC (permalink / raw) To: Eric Sandeen; +Cc: xfs-oss Eric Sandeen wrote: > Eric Sandeen wrote: >> Is there any point to this option? Sure, it disables the ability >> to set security attributes at runtime, but it doesn't slim down >> any code. >> >> Any reason to not remove it, and always allow security attributes >> to be set? > > Ack? Nak? Comments? > Fine by me. I'm not sure of the point either. However, don't need to modify the attr_secure_capable function, might as well delete it and just use fs_noerr for the capable hook field. --Tim (BTW, will check in attr2 fixes soon - need to write a qa test ;-) > -Eric > >> Signed-off-by: Eric Sandeen <sandeen@sandeen.net> >> >> --- >> >> Index: linux-2.6.24-rc3/fs/xfs/Kconfig >> =================================================================== >> --- linux-2.6.24-rc3.orig/fs/xfs/Kconfig >> +++ linux-2.6.24-rc3/fs/xfs/Kconfig >> @@ -35,18 +35,6 @@ config XFS_QUOTA >> with or without the generic quota support enabled (CONFIG_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. >> - >> config XFS_POSIX_ACL >> bool "XFS POSIX ACL support" >> depends on XFS_FS >> Index: linux-2.6.24-rc3/fs/xfs/linux-2.6/xfs_super.h >> =================================================================== >> --- linux-2.6.24-rc3.orig/fs/xfs/linux-2.6/xfs_super.h >> +++ linux-2.6.24-rc3/fs/xfs/linux-2.6/xfs_super.h >> @@ -50,13 +50,8 @@ extern void xfs_qm_exit(void); >> # define set_posix_acl_flag(sb) do { } while (0) >> #endif >> >> -#ifdef CONFIG_XFS_SECURITY >> -# define XFS_SECURITY_STRING "security attributes, " >> -# define ENOSECURITY 0 >> -#else >> -# define XFS_SECURITY_STRING >> -# define ENOSECURITY EOPNOTSUPP >> -#endif >> +/* Used to be "configurable" so keep it around. */ >> +#define XFS_SECURITY_STRING "security attributes, " >> >> #ifdef CONFIG_XFS_RT >> # define XFS_REALTIME_STRING "realtime, " >> Index: linux-2.6.24-rc3/fs/xfs/xfs_attr.c >> =================================================================== >> --- linux-2.6.24-rc3.orig/fs/xfs/xfs_attr.c >> +++ linux-2.6.24-rc3/fs/xfs/xfs_attr.c >> @@ -2651,7 +2651,7 @@ attr_secure_capable( >> bhv_vnode_t *vp, >> cred_t *cred) >> { >> - return -ENOSECURITY; >> + return 0; >> } >> >> STATIC int >> >> > ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH V2] remove CONFIG_XFS_SECURITY 2008-04-07 2:23 ` Timothy Shimmin @ 2008-04-11 14:39 ` Eric Sandeen 2008-04-11 16:04 ` Christoph Hellwig 0 siblings, 1 reply; 8+ messages in thread From: Eric Sandeen @ 2008-04-11 14:39 UTC (permalink / raw) To: Timothy Shimmin; +Cc: xfs-oss Timothy Shimmin wrote: > Eric Sandeen wrote: > >> Eric Sandeen wrote: >> >>> Is there any point to this option? Sure, it disables the ability >>> to set security attributes at runtime, but it doesn't slim down >>> any code. >>> >>> Any reason to not remove it, and always allow security attributes >>> to be set? >>> >> Ack? Nak? Comments? >> >> > Fine by me. I'm not sure of the point either. > However, don't need to modify the attr_secure_capable function, > might as well delete it and > just use fs_noerr for the capable hook field. > Oh, I see, it's normally cast... ok. ----------------------------- There is no point to the CONFIG_XFS_SECURITY option; it disables the ability to set security attributes at runtime, but it does not actually slim down or remove any code for runtime. Just remove it and always allow security attributes to be set. Signed-off-by: Eric Sandeen <sandeen@sandeen.net> --- Index: linux-2.6-xfs/fs/xfs/Kconfig =================================================================== --- linux-2.6-xfs.orig/fs/xfs/Kconfig +++ linux-2.6-xfs/fs/xfs/Kconfig @@ -48,18 +48,6 @@ config XFS_DMAPI If unsure, say N. -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. - config XFS_POSIX_ACL bool "XFS POSIX ACL support" depends on XFS_FS Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.h +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.h @@ -28,13 +28,7 @@ # define set_posix_acl_flag(sb) do { } while (0) #endif -#ifdef CONFIG_XFS_SECURITY -# define XFS_SECURITY_STRING "security attributes, " -# define ENOSECURITY 0 -#else -# define XFS_SECURITY_STRING -# define ENOSECURITY EOPNOTSUPP -#endif +#define XFS_SECURITY_STRING "security attributes, " #ifdef CONFIG_XFS_RT # define XFS_REALTIME_STRING "realtime, " Index: linux-2.6-xfs/fs/xfs/xfs_attr.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_attr.c +++ linux-2.6-xfs/fs/xfs/xfs_attr.c @@ -2647,14 +2647,6 @@ attr_trusted_capable( } STATIC int -attr_secure_capable( - bhv_vnode_t *vp, - cred_t *cred) -{ - return -ENOSECURITY; -} - -STATIC int attr_system_set( bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) { @@ -2724,7 +2716,7 @@ struct attrnames attr_secure = { .attr_get = attr_generic_get, .attr_set = attr_generic_set, .attr_remove = attr_generic_remove, - .attr_capable = attr_secure_capable, + .attr_capable = (attrcapable_t)fs_noerr, }; struct attrnames attr_user = { ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V2] remove CONFIG_XFS_SECURITY 2008-04-11 14:39 ` [PATCH V2] " Eric Sandeen @ 2008-04-11 16:04 ` Christoph Hellwig 2008-04-11 16:13 ` Eric Sandeen 0 siblings, 1 reply; 8+ messages in thread From: Christoph Hellwig @ 2008-04-11 16:04 UTC (permalink / raw) To: Eric Sandeen; +Cc: Timothy Shimmin, xfs-oss > +#define XFS_SECURITY_STRING "security attributes, " This one should just be killed completely, as it's not an optional feature anymore. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V2] remove CONFIG_XFS_SECURITY 2008-04-11 16:04 ` Christoph Hellwig @ 2008-04-11 16:13 ` Eric Sandeen 2008-04-15 0:33 ` Timothy Shimmin 0 siblings, 1 reply; 8+ messages in thread From: Eric Sandeen @ 2008-04-11 16:13 UTC (permalink / raw) To: Christoph Hellwig; +Cc: Timothy Shimmin, xfs-oss Christoph Hellwig wrote: >> +#define XFS_SECURITY_STRING "security attributes, " > > This one should just be killed completely, as it's not an optional > feature anymore. > My only concern is that if people are used to seeing it, they'll assume that somehow xfs now doesn't support it now, or was built without it, or ... *shrug* -Eric ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V2] remove CONFIG_XFS_SECURITY 2008-04-11 16:13 ` Eric Sandeen @ 2008-04-15 0:33 ` Timothy Shimmin 0 siblings, 0 replies; 8+ messages in thread From: Timothy Shimmin @ 2008-04-15 0:33 UTC (permalink / raw) To: Eric Sandeen; +Cc: Christoph Hellwig, xfs-oss Eric Sandeen wrote: > Christoph Hellwig wrote: >>> +#define XFS_SECURITY_STRING "security attributes, " >> This one should just be killed completely, as it's not an optional >> feature anymore. >> > > My only concern is that if people are used to seeing it, they'll assume > that somehow xfs now doesn't support it now, or was built without it, or ... > > *shrug* > > -Eric Yeah, I kind of see your point there. I think I'd prefer to keep it too. --Tim ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-04-15 0:33 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-01-07 3:36 [PATCH] remove CONFIG_XFS_SECURITY Eric Sandeen 2008-01-07 7:12 ` Christoph Hellwig 2008-02-20 0:42 ` Eric Sandeen 2008-04-07 2:23 ` Timothy Shimmin 2008-04-11 14:39 ` [PATCH V2] " Eric Sandeen 2008-04-11 16:04 ` Christoph Hellwig 2008-04-11 16:13 ` Eric Sandeen 2008-04-15 0:33 ` Timothy Shimmin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox