Commit 91a9420f5826db482030c21eca8c507271bbc441
Committed by
James Morris
1 parent
3db2910177
Exists in
master
and in
4 other branches
security: remove dead hook sb_post_pivotroot
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 22 deletions Side-by-side Diff
fs/namespace.c
... | ... | @@ -2265,7 +2265,6 @@ |
2265 | 2265 | touch_mnt_namespace(current->nsproxy->mnt_ns); |
2266 | 2266 | spin_unlock(&vfsmount_lock); |
2267 | 2267 | chroot_fs_refs(&root, &new); |
2268 | - security_sb_post_pivotroot(&root, &new); | |
2269 | 2268 | error = 0; |
2270 | 2269 | path_put(&root_parent); |
2271 | 2270 | path_put(&parent_path); |
include/linux/security.h
... | ... | @@ -277,10 +277,6 @@ |
277 | 277 | * @old_path contains the path for the new location of the current root (put_old). |
278 | 278 | * @new_path contains the path for the new root (new_root). |
279 | 279 | * Return 0 if permission is granted. |
280 | - * @sb_post_pivotroot: | |
281 | - * Update module state after a successful pivot. | |
282 | - * @old_path contains the path for the old root. | |
283 | - * @new_path contains the path for the new root. | |
284 | 280 | * @sb_set_mnt_opts: |
285 | 281 | * Set the security relevant mount options used for a superblock |
286 | 282 | * @sb the superblock to set security mount options for |
... | ... | @@ -1458,8 +1454,6 @@ |
1458 | 1454 | int (*sb_umount) (struct vfsmount *mnt, int flags); |
1459 | 1455 | int (*sb_pivotroot) (struct path *old_path, |
1460 | 1456 | struct path *new_path); |
1461 | - void (*sb_post_pivotroot) (struct path *old_path, | |
1462 | - struct path *new_path); | |
1463 | 1457 | int (*sb_set_mnt_opts) (struct super_block *sb, |
1464 | 1458 | struct security_mnt_opts *opts); |
1465 | 1459 | void (*sb_clone_mnt_opts) (const struct super_block *oldsb, |
... | ... | @@ -1749,7 +1743,6 @@ |
1749 | 1743 | char *type, unsigned long flags, void *data); |
1750 | 1744 | int security_sb_umount(struct vfsmount *mnt, int flags); |
1751 | 1745 | int security_sb_pivotroot(struct path *old_path, struct path *new_path); |
1752 | -void security_sb_post_pivotroot(struct path *old_path, struct path *new_path); | |
1753 | 1746 | int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); |
1754 | 1747 | void security_sb_clone_mnt_opts(const struct super_block *oldsb, |
1755 | 1748 | struct super_block *newsb); |
... | ... | @@ -2068,10 +2061,6 @@ |
2068 | 2061 | { |
2069 | 2062 | return 0; |
2070 | 2063 | } |
2071 | - | |
2072 | -static inline void security_sb_post_pivotroot(struct path *old_path, | |
2073 | - struct path *new_path) | |
2074 | -{ } | |
2075 | 2064 | |
2076 | 2065 | static inline int security_sb_set_mnt_opts(struct super_block *sb, |
2077 | 2066 | struct security_mnt_opts *opts) |
security/capability.c
... | ... | @@ -90,10 +90,6 @@ |
90 | 90 | return 0; |
91 | 91 | } |
92 | 92 | |
93 | -static void cap_sb_post_pivotroot(struct path *old_path, struct path *new_path) | |
94 | -{ | |
95 | -} | |
96 | - | |
97 | 93 | static int cap_sb_set_mnt_opts(struct super_block *sb, |
98 | 94 | struct security_mnt_opts *opts) |
99 | 95 | { |
... | ... | @@ -921,7 +917,6 @@ |
921 | 917 | set_to_cap_if_null(ops, sb_mount); |
922 | 918 | set_to_cap_if_null(ops, sb_umount); |
923 | 919 | set_to_cap_if_null(ops, sb_pivotroot); |
924 | - set_to_cap_if_null(ops, sb_post_pivotroot); | |
925 | 920 | set_to_cap_if_null(ops, sb_set_mnt_opts); |
926 | 921 | set_to_cap_if_null(ops, sb_clone_mnt_opts); |
927 | 922 | set_to_cap_if_null(ops, sb_parse_opts_str); |
security/security.c
... | ... | @@ -316,11 +316,6 @@ |
316 | 316 | return security_ops->sb_pivotroot(old_path, new_path); |
317 | 317 | } |
318 | 318 | |
319 | -void security_sb_post_pivotroot(struct path *old_path, struct path *new_path) | |
320 | -{ | |
321 | - security_ops->sb_post_pivotroot(old_path, new_path); | |
322 | -} | |
323 | - | |
324 | 319 | int security_sb_set_mnt_opts(struct super_block *sb, |
325 | 320 | struct security_mnt_opts *opts) |
326 | 321 | { |