diff options
author | Eric Paris <eparis@redhat.com> | 2010-04-07 15:14:39 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-04-11 22:18:31 -0400 |
commit | 3db291017753e539af64c8bab373785f34e43ed2 (patch) | |
tree | e6759c7dea1774465b6bf2860a0c2f283c0b34fa | |
parent | 82dab10453d65ad9ca551de5b8925673ca05c7e9 (diff) |
security: remove dead hook sb_post_addmount
Unused hook. Remove.
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
-rw-r--r-- | fs/namespace.c | 2 | ||||
-rw-r--r-- | include/linux/security.h | 13 | ||||
-rw-r--r-- | security/capability.c | 5 | ||||
-rw-r--r-- | security/security.c | 5 |
4 files changed, 0 insertions, 25 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index f87f56e348fd..7a0c9ce62bed 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -1436,8 +1436,6 @@ static int graft_tree(struct vfsmount *mnt, struct path *path) | |||
1436 | err = attach_recursive_mnt(mnt, path, NULL); | 1436 | err = attach_recursive_mnt(mnt, path, NULL); |
1437 | out_unlock: | 1437 | out_unlock: |
1438 | mutex_unlock(&path->dentry->d_inode->i_mutex); | 1438 | mutex_unlock(&path->dentry->d_inode->i_mutex); |
1439 | if (!err) | ||
1440 | security_sb_post_addmount(mnt, path); | ||
1441 | return err; | 1439 | return err; |
1442 | } | 1440 | } |
1443 | 1441 | ||
diff --git a/include/linux/security.h b/include/linux/security.h index 338617a50fa3..a42d733086a1 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -272,12 +272,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
272 | * @mnt contains the mounted file system. | 272 | * @mnt contains the mounted file system. |
273 | * @flags contains the unmount flags, e.g. MNT_FORCE. | 273 | * @flags contains the unmount flags, e.g. MNT_FORCE. |
274 | * Return 0 if permission is granted. | 274 | * Return 0 if permission is granted. |
275 | * @sb_post_addmount: | ||
276 | * Update the security module's state when a filesystem is mounted. | ||
277 | * This hook is called any time a mount is successfully grafetd to | ||
278 | * the tree. | ||
279 | * @mnt contains the mounted filesystem. | ||
280 | * @mountpoint contains the path for the mount point. | ||
281 | * @sb_pivotroot: | 275 | * @sb_pivotroot: |
282 | * Check permission before pivoting the root filesystem. | 276 | * Check permission before pivoting the root filesystem. |
283 | * @old_path contains the path for the new location of the current root (put_old). | 277 | * @old_path contains the path for the new location of the current root (put_old). |
@@ -1462,8 +1456,6 @@ struct security_operations { | |||
1462 | int (*sb_mount) (char *dev_name, struct path *path, | 1456 | int (*sb_mount) (char *dev_name, struct path *path, |
1463 | char *type, unsigned long flags, void *data); | 1457 | char *type, unsigned long flags, void *data); |
1464 | int (*sb_umount) (struct vfsmount *mnt, int flags); | 1458 | int (*sb_umount) (struct vfsmount *mnt, int flags); |
1465 | void (*sb_post_addmount) (struct vfsmount *mnt, | ||
1466 | struct path *mountpoint); | ||
1467 | int (*sb_pivotroot) (struct path *old_path, | 1459 | int (*sb_pivotroot) (struct path *old_path, |
1468 | struct path *new_path); | 1460 | struct path *new_path); |
1469 | void (*sb_post_pivotroot) (struct path *old_path, | 1461 | void (*sb_post_pivotroot) (struct path *old_path, |
@@ -1756,7 +1748,6 @@ int security_sb_statfs(struct dentry *dentry); | |||
1756 | int security_sb_mount(char *dev_name, struct path *path, | 1748 | int security_sb_mount(char *dev_name, struct path *path, |
1757 | char *type, unsigned long flags, void *data); | 1749 | char *type, unsigned long flags, void *data); |
1758 | int security_sb_umount(struct vfsmount *mnt, int flags); | 1750 | int security_sb_umount(struct vfsmount *mnt, int flags); |
1759 | void security_sb_post_addmount(struct vfsmount *mnt, struct path *mountpoint); | ||
1760 | int security_sb_pivotroot(struct path *old_path, struct path *new_path); | 1751 | int security_sb_pivotroot(struct path *old_path, struct path *new_path); |
1761 | void security_sb_post_pivotroot(struct path *old_path, struct path *new_path); | 1752 | void security_sb_post_pivotroot(struct path *old_path, struct path *new_path); |
1762 | int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); | 1753 | int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); |
@@ -2072,10 +2063,6 @@ static inline int security_sb_umount(struct vfsmount *mnt, int flags) | |||
2072 | return 0; | 2063 | return 0; |
2073 | } | 2064 | } |
2074 | 2065 | ||
2075 | static inline void security_sb_post_addmount(struct vfsmount *mnt, | ||
2076 | struct path *mountpoint) | ||
2077 | { } | ||
2078 | |||
2079 | static inline int security_sb_pivotroot(struct path *old_path, | 2066 | static inline int security_sb_pivotroot(struct path *old_path, |
2080 | struct path *new_path) | 2067 | struct path *new_path) |
2081 | { | 2068 | { |
diff --git a/security/capability.c b/security/capability.c index 26fc92caa339..38752ddf69d7 100644 --- a/security/capability.c +++ b/security/capability.c | |||
@@ -85,10 +85,6 @@ static int cap_sb_umount(struct vfsmount *mnt, int flags) | |||
85 | return 0; | 85 | return 0; |
86 | } | 86 | } |
87 | 87 | ||
88 | static void cap_sb_post_addmount(struct vfsmount *mnt, struct path *path) | ||
89 | { | ||
90 | } | ||
91 | |||
92 | static int cap_sb_pivotroot(struct path *old_path, struct path *new_path) | 88 | static int cap_sb_pivotroot(struct path *old_path, struct path *new_path) |
93 | { | 89 | { |
94 | return 0; | 90 | return 0; |
@@ -924,7 +920,6 @@ void security_fixup_ops(struct security_operations *ops) | |||
924 | set_to_cap_if_null(ops, sb_statfs); | 920 | set_to_cap_if_null(ops, sb_statfs); |
925 | set_to_cap_if_null(ops, sb_mount); | 921 | set_to_cap_if_null(ops, sb_mount); |
926 | set_to_cap_if_null(ops, sb_umount); | 922 | set_to_cap_if_null(ops, sb_umount); |
927 | set_to_cap_if_null(ops, sb_post_addmount); | ||
928 | set_to_cap_if_null(ops, sb_pivotroot); | 923 | set_to_cap_if_null(ops, sb_pivotroot); |
929 | set_to_cap_if_null(ops, sb_post_pivotroot); | 924 | set_to_cap_if_null(ops, sb_post_pivotroot); |
930 | set_to_cap_if_null(ops, sb_set_mnt_opts); | 925 | set_to_cap_if_null(ops, sb_set_mnt_opts); |
diff --git a/security/security.c b/security/security.c index d9538d98736b..6a8e5411d7a0 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -311,11 +311,6 @@ int security_sb_umount(struct vfsmount *mnt, int flags) | |||
311 | return security_ops->sb_umount(mnt, flags); | 311 | return security_ops->sb_umount(mnt, flags); |
312 | } | 312 | } |
313 | 313 | ||
314 | void security_sb_post_addmount(struct vfsmount *mnt, struct path *mountpoint) | ||
315 | { | ||
316 | security_ops->sb_post_addmount(mnt, mountpoint); | ||
317 | } | ||
318 | |||
319 | int security_sb_pivotroot(struct path *old_path, struct path *new_path) | 314 | int security_sb_pivotroot(struct path *old_path, struct path *new_path) |
320 | { | 315 | { |
321 | return security_ops->sb_pivotroot(old_path, new_path); | 316 | return security_ops->sb_pivotroot(old_path, new_path); |