summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-03-11 16:14:32 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-03-11 16:14:32 -0800
commit5289ba41a0a403270bee9da9e08990831d769cb7 (patch)
tree5750064a878ba82f7d0f13537acb2242f5b76a89 /include/linux
parentef01bd3f7cc37c3d79b3d075304aa9faaf95b190 (diff)
[PATCH] selinux: clean up binary mount data
From: James Morris <jmorris@redhat.com> selinux is currently inspecting the filesystem name ("nfs" vs "coda" vs watever) to work out whether it needs to hanbdle binary mount data. Eliminate all that by adding a flag to file_system_type.fs_flags.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h1
-rw-r--r--include/linux/security.h13
2 files changed, 9 insertions, 5 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 514f61d08d81..b424acbe1016 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -89,6 +89,7 @@ extern int leases_enable, dir_notify_enable, lease_break_time;
/* public flags for file_system_type */
#define FS_REQUIRES_DEV 1
+#define FS_BINARY_MOUNTDATA 2
#define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */
#define FS_ODD_RENAME 32768 /* Temporary stuff; will go away as soon
* as nfs_rename() will be cleaned up
diff --git a/include/linux/security.h b/include/linux/security.h
index 05d468421611..9baa2ed4ac96 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -177,7 +177,7 @@ struct swap_info_struct;
* options cleanly (a filesystem may modify the data e.g. with strsep()).
* This also allows the original mount data to be stripped of security-
* specific options to avoid having to make filesystems aware of them.
- * @fstype the type of filesystem being mounted.
+ * @type the type of filesystem being mounted.
* @orig the original mount data copied from userspace.
* @copy copied data which will be passed to the security module.
* Returns 0 if the copy was successful.
@@ -1033,7 +1033,8 @@ struct security_operations {
int (*sb_alloc_security) (struct super_block * sb);
void (*sb_free_security) (struct super_block * sb);
- int (*sb_copy_data)(const char *fstype, void *orig, void *copy);
+ int (*sb_copy_data)(struct file_system_type *type,
+ void *orig, void *copy);
int (*sb_kern_mount) (struct super_block *sb, void *data);
int (*sb_statfs) (struct super_block * sb);
int (*sb_mount) (char *dev_name, struct nameidata * nd,
@@ -1318,9 +1319,10 @@ static inline void security_sb_free (struct super_block *sb)
security_ops->sb_free_security (sb);
}
-static inline int security_sb_copy_data (const char *fstype, void *orig, void *copy)
+static inline int security_sb_copy_data (struct file_system_type *type,
+ void *orig, void *copy)
{
- return security_ops->sb_copy_data (fstype, orig, copy);
+ return security_ops->sb_copy_data (type, orig, copy);
}
static inline int security_sb_kern_mount (struct super_block *sb, void *data)
@@ -1988,7 +1990,8 @@ static inline int security_sb_alloc (struct super_block *sb)
static inline void security_sb_free (struct super_block *sb)
{ }
-static inline int security_sb_copy_data (const char *fstype, void *orig, void *copy)
+static inline int security_sb_copy_data (struct file_system_type *type,
+ void *orig, void *copy)
{
return 0;
}