linux-security-module July 2008 archive
Main Archive Page > Month Archives  > linux-security-module archives
linux-security-module: [rfc patch 1/2] security: remove unused s

[rfc patch 1/2] security: remove unused sb_get_mnt_opts hook

From: Miklos Szeredi <miklos_at_nospam>
Date: Thu Jul 03 2008 - 18:56:04 GMT
To: linux-security-module@vger.kernel.org


From: Miklos Szeredi <mszeredi@suse.cz>

The sb_get_mnt_opts() hook is unused, and is superseded by the sb_show_options() hook.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> --- include/linux/security.h | 14 -------------- security/dummy.c | 8 -------- security/security.c | 6 ------ security/selinux/hooks.c | 1 - 4 files changed, 29 deletions(-) Index: linux-2.6/include/linux/security.h =================================================================== --- linux-2.6.orig/include/linux/security.h 2008-07-03 20:13:48.000000000 +0200 +++ linux-2.6/include/linux/security.h 2008-07-03 20:13:49.000000000 +0200
@@ -290,10 +290,6 @@ static inline void security_free_mnt_opt
* Update module state after a successful pivot. * @old_path contains the path for the old root. * @new_path contains the path for the new root. - * @sb_get_mnt_opts: - * Get the security relevant mount options used for a superblock - * @sb the superblock to get security mount options from - * @opts binary data structure containing all lsm mount data * @sb_set_mnt_opts: * Set the security relevant mount options used for a superblock * @sb the superblock to set security mount options for
@@ -1345,8 +1341,6 @@ struct security_operations {
struct path *new_path); void (*sb_post_pivotroot) (struct path *old_path, struct path *new_path); - int (*sb_get_mnt_opts) (const struct super_block *sb, - struct security_mnt_opts *opts); int (*sb_set_mnt_opts) (struct super_block *sb, struct security_mnt_opts *opts); void (*sb_clone_mnt_opts) (const struct super_block *oldsb,
@@ -1620,8 +1614,6 @@ void security_sb_post_remount(struct vfs
void security_sb_post_addmount(struct vfsmount *mnt, struct path *mountpoint); int security_sb_pivotroot(struct path *old_path, struct path *new_path); void security_sb_post_pivotroot(struct path *old_path, struct path *new_path); -int security_sb_get_mnt_opts(const struct super_block *sb, - struct security_mnt_opts *opts); int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); void security_sb_clone_mnt_opts(const struct super_block *oldsb, struct super_block *newsb);
@@ -1936,12 +1928,6 @@ static inline int security_sb_pivotroot(
static inline void security_sb_post_pivotroot(struct path *old_path, struct path *new_path) { } -static inline int security_sb_get_mnt_opts(const struct super_block *sb, - struct security_mnt_opts *opts) -{ - security_init_mnt_opts(opts); - return 0; -} static inline int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts) Index: linux-2.6/security/dummy.c =================================================================== --- linux-2.6.orig/security/dummy.c 2008-07-03 20:13:48.000000000 +0200 +++ linux-2.6/security/dummy.c 2008-07-03 20:40:03.000000000 +0200
@@ -251,13 +251,6 @@ static void dummy_sb_post_pivotroot (str
return; } -static int dummy_sb_get_mnt_opts(const struct super_block *sb, - struct security_mnt_opts *opts) -{ - security_init_mnt_opts(opts); - return 0; -} - static int dummy_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts) {
@@ -1103,7 +1096,6 @@ void security_fixup_ops (struct security
set_to_dummy_if_null(ops, sb_post_addmount); set_to_dummy_if_null(ops, sb_pivotroot); set_to_dummy_if_null(ops, sb_post_pivotroot); - set_to_dummy_if_null(ops, sb_get_mnt_opts); set_to_dummy_if_null(ops, sb_set_mnt_opts); set_to_dummy_if_null(ops, sb_clone_mnt_opts); set_to_dummy_if_null(ops, sb_parse_opts_str); Index: linux-2.6/security/security.c =================================================================== --- linux-2.6.orig/security/security.c 2008-07-03 20:13:48.000000000 +0200 +++ linux-2.6/security/security.c 2008-07-03 20:40:03.000000000 +0200
@@ -347,12 +347,6 @@ void security_sb_post_pivotroot(struct p
security_ops->sb_post_pivotroot(old_path, new_path); } -int security_sb_get_mnt_opts(const struct super_block *sb, - struct security_mnt_opts *opts) -{ - return security_ops->sb_get_mnt_opts(sb, opts); -} - int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts) { Index: linux-2.6/security/selinux/hooks.c =================================================================== --- linux-2.6.orig/security/selinux/hooks.c 2008-07-03 20:13:48.000000000 +0200 +++ linux-2.6/security/selinux/hooks.c 2008-07-03 20:13:49.000000000 +0200
@@ -5399,7 +5399,6 @@ static struct security_operations selinu
.sb_statfs = selinux_sb_statfs, .sb_mount = selinux_mount, .sb_umount = selinux_umount, - .sb_get_mnt_opts = selinux_get_mnt_opts, .sb_set_mnt_opts = selinux_set_mnt_opts, .sb_clone_mnt_opts = selinux_sb_clone_mnt_opts, .sb_parse_opts_str = selinux_parse_opts_str, -- -- 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