Commit 353633100d8d684ac0acae4ce93fb833f92881f4
Committed by
James Morris
1 parent
c1a7368a6f
Exists in
master
and in
7 other branches
security: remove sb_check_sb hooks
Unused hook. Remove it. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
Showing 4 changed files with 0 additions and 30 deletions Side-by-side Diff
fs/namespace.c
... | ... | @@ -1435,11 +1435,6 @@ |
1435 | 1435 | if (IS_DEADDIR(path->dentry->d_inode)) |
1436 | 1436 | goto out_unlock; |
1437 | 1437 | |
1438 | - err = security_sb_check_sb(mnt, path); | |
1439 | - if (err) | |
1440 | - goto out_unlock; | |
1441 | - | |
1442 | - err = -ENOENT; | |
1443 | 1438 | if (!d_unlinked(path->dentry)) |
1444 | 1439 | err = attach_recursive_mnt(mnt, path, NULL); |
1445 | 1440 | out_unlock: |
include/linux/security.h
... | ... | @@ -267,12 +267,6 @@ |
267 | 267 | * @orig the original mount data copied from userspace. |
268 | 268 | * @copy copied data which will be passed to the security module. |
269 | 269 | * Returns 0 if the copy was successful. |
270 | - * @sb_check_sb: | |
271 | - * Check permission before the device with superblock @mnt->sb is mounted | |
272 | - * on the mount point named by @nd. | |
273 | - * @mnt contains the vfsmount for device being mounted. | |
274 | - * @path contains the path for the mount point. | |
275 | - * Return 0 if permission is granted. | |
276 | 270 | * @sb_umount: |
277 | 271 | * Check permission before the @mnt file system is unmounted. |
278 | 272 | * @mnt contains the mounted file system. |
... | ... | @@ -1484,7 +1478,6 @@ |
1484 | 1478 | int (*sb_statfs) (struct dentry *dentry); |
1485 | 1479 | int (*sb_mount) (char *dev_name, struct path *path, |
1486 | 1480 | char *type, unsigned long flags, void *data); |
1487 | - int (*sb_check_sb) (struct vfsmount *mnt, struct path *path); | |
1488 | 1481 | int (*sb_umount) (struct vfsmount *mnt, int flags); |
1489 | 1482 | void (*sb_umount_close) (struct vfsmount *mnt); |
1490 | 1483 | void (*sb_umount_busy) (struct vfsmount *mnt); |
... | ... | @@ -1783,7 +1776,6 @@ |
1783 | 1776 | int security_sb_statfs(struct dentry *dentry); |
1784 | 1777 | int security_sb_mount(char *dev_name, struct path *path, |
1785 | 1778 | char *type, unsigned long flags, void *data); |
1786 | -int security_sb_check_sb(struct vfsmount *mnt, struct path *path); | |
1787 | 1779 | int security_sb_umount(struct vfsmount *mnt, int flags); |
1788 | 1780 | void security_sb_umount_close(struct vfsmount *mnt); |
1789 | 1781 | void security_sb_umount_busy(struct vfsmount *mnt); |
... | ... | @@ -2095,12 +2087,6 @@ |
2095 | 2087 | static inline int security_sb_mount(char *dev_name, struct path *path, |
2096 | 2088 | char *type, unsigned long flags, |
2097 | 2089 | void *data) |
2098 | -{ | |
2099 | - return 0; | |
2100 | -} | |
2101 | - | |
2102 | -static inline int security_sb_check_sb(struct vfsmount *mnt, | |
2103 | - struct path *path) | |
2104 | 2090 | { |
2105 | 2091 | return 0; |
2106 | 2092 | } |
security/capability.c
... | ... | @@ -80,11 +80,6 @@ |
80 | 80 | return 0; |
81 | 81 | } |
82 | 82 | |
83 | -static int cap_sb_check_sb(struct vfsmount *mnt, struct path *path) | |
84 | -{ | |
85 | - return 0; | |
86 | -} | |
87 | - | |
88 | 83 | static int cap_sb_umount(struct vfsmount *mnt, int flags) |
89 | 84 | { |
90 | 85 | return 0; |
... | ... | @@ -941,7 +936,6 @@ |
941 | 936 | set_to_cap_if_null(ops, sb_show_options); |
942 | 937 | set_to_cap_if_null(ops, sb_statfs); |
943 | 938 | set_to_cap_if_null(ops, sb_mount); |
944 | - set_to_cap_if_null(ops, sb_check_sb); | |
945 | 939 | set_to_cap_if_null(ops, sb_umount); |
946 | 940 | set_to_cap_if_null(ops, sb_umount_close); |
947 | 941 | set_to_cap_if_null(ops, sb_umount_busy); |
security/security.c
... | ... | @@ -306,11 +306,6 @@ |
306 | 306 | return security_ops->sb_mount(dev_name, path, type, flags, data); |
307 | 307 | } |
308 | 308 | |
309 | -int security_sb_check_sb(struct vfsmount *mnt, struct path *path) | |
310 | -{ | |
311 | - return security_ops->sb_check_sb(mnt, path); | |
312 | -} | |
313 | - | |
314 | 309 | int security_sb_umount(struct vfsmount *mnt, int flags) |
315 | 310 | { |
316 | 311 | return security_ops->sb_umount(mnt, flags); |