Commit 3db291017753e539af64c8bab373785f34e43ed2
Committed by
James Morris
1 parent
82dab10453
Exists in
master
and in
7 other branches
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>
Showing 4 changed files with 0 additions and 25 deletions Side-by-side Diff
fs/namespace.c
include/linux/security.h
... | ... | @@ -272,12 +272,6 @@ |
272 | 272 | * @mnt contains the mounted file system. |
273 | 273 | * @flags contains the unmount flags, e.g. MNT_FORCE. |
274 | 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 | 275 | * @sb_pivotroot: |
282 | 276 | * Check permission before pivoting the root filesystem. |
283 | 277 | * @old_path contains the path for the new location of the current root (put_old). |
... | ... | @@ -1462,8 +1456,6 @@ |
1462 | 1456 | int (*sb_mount) (char *dev_name, struct path *path, |
1463 | 1457 | char *type, unsigned long flags, void *data); |
1464 | 1458 | int (*sb_umount) (struct vfsmount *mnt, int flags); |
1465 | - void (*sb_post_addmount) (struct vfsmount *mnt, | |
1466 | - struct path *mountpoint); | |
1467 | 1459 | int (*sb_pivotroot) (struct path *old_path, |
1468 | 1460 | struct path *new_path); |
1469 | 1461 | void (*sb_post_pivotroot) (struct path *old_path, |
... | ... | @@ -1756,7 +1748,6 @@ |
1756 | 1748 | int security_sb_mount(char *dev_name, struct path *path, |
1757 | 1749 | char *type, unsigned long flags, void *data); |
1758 | 1750 | int security_sb_umount(struct vfsmount *mnt, int flags); |
1759 | -void security_sb_post_addmount(struct vfsmount *mnt, struct path *mountpoint); | |
1760 | 1751 | int security_sb_pivotroot(struct path *old_path, struct path *new_path); |
1761 | 1752 | void security_sb_post_pivotroot(struct path *old_path, struct path *new_path); |
1762 | 1753 | int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); |
... | ... | @@ -2071,10 +2062,6 @@ |
2071 | 2062 | { |
2072 | 2063 | return 0; |
2073 | 2064 | } |
2074 | - | |
2075 | -static inline void security_sb_post_addmount(struct vfsmount *mnt, | |
2076 | - struct path *mountpoint) | |
2077 | -{ } | |
2078 | 2065 | |
2079 | 2066 | static inline int security_sb_pivotroot(struct path *old_path, |
2080 | 2067 | struct path *new_path) |
security/capability.c
... | ... | @@ -85,10 +85,6 @@ |
85 | 85 | return 0; |
86 | 86 | } |
87 | 87 | |
88 | -static void cap_sb_post_addmount(struct vfsmount *mnt, struct path *path) | |
89 | -{ | |
90 | -} | |
91 | - | |
92 | 88 | static int cap_sb_pivotroot(struct path *old_path, struct path *new_path) |
93 | 89 | { |
94 | 90 | return 0; |
... | ... | @@ -924,7 +920,6 @@ |
924 | 920 | set_to_cap_if_null(ops, sb_statfs); |
925 | 921 | set_to_cap_if_null(ops, sb_mount); |
926 | 922 | set_to_cap_if_null(ops, sb_umount); |
927 | - set_to_cap_if_null(ops, sb_post_addmount); | |
928 | 923 | set_to_cap_if_null(ops, sb_pivotroot); |
929 | 924 | set_to_cap_if_null(ops, sb_post_pivotroot); |
930 | 925 | set_to_cap_if_null(ops, sb_set_mnt_opts); |
security/security.c
... | ... | @@ -311,11 +311,6 @@ |
311 | 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 | 314 | int security_sb_pivotroot(struct path *old_path, struct path *new_path) |
320 | 315 | { |
321 | 316 | return security_ops->sb_pivotroot(old_path, new_path); |