diff options
| author | Eric Paris <eparis@redhat.com> | 2010-04-07 15:14:33 -0400 |
|---|---|---|
| committer | James Morris <jmorris@namei.org> | 2010-04-11 22:18:30 -0400 |
| commit | 82dab10453d65ad9ca551de5b8925673ca05c7e9 (patch) | |
| tree | 942bf24adb67b534fa3080dbbfa1ffe33b7c16bd | |
| parent | 4b61d12c84293ac061909f27f567c1905e4d90e3 (diff) | |
security: remove dead hook sb_post_remount
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 | 6 | ||||
| -rw-r--r-- | security/security.c | 5 |
4 files changed, 0 insertions, 26 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 6c9ca7358aad..f87f56e348fd 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
| @@ -1573,8 +1573,6 @@ static int do_remount(struct path *path, int flags, int mnt_flags, | |||
| 1573 | } | 1573 | } |
| 1574 | up_write(&sb->s_umount); | 1574 | up_write(&sb->s_umount); |
| 1575 | if (!err) { | 1575 | if (!err) { |
| 1576 | security_sb_post_remount(path->mnt, flags, data); | ||
| 1577 | |||
| 1578 | spin_lock(&vfsmount_lock); | 1576 | spin_lock(&vfsmount_lock); |
| 1579 | touch_mnt_namespace(path->mnt->mnt_ns); | 1577 | touch_mnt_namespace(path->mnt->mnt_ns); |
| 1580 | spin_unlock(&vfsmount_lock); | 1578 | spin_unlock(&vfsmount_lock); |
diff --git a/include/linux/security.h b/include/linux/security.h index b206795c09f7..338617a50fa3 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_remount: | ||
| 276 | * Update the security module's state when a filesystem is remounted. | ||
| 277 | * This hook is only called if the remount was successful. | ||
| 278 | * @mnt contains the mounted file system. | ||
| 279 | * @flags contains the new filesystem flags. | ||
| 280 | * @data contains the filesystem-specific data. | ||
| 281 | * @sb_post_addmount: | 275 | * @sb_post_addmount: |
| 282 | * Update the security module's state when a filesystem is mounted. | 276 | * Update the security module's state when a filesystem is mounted. |
| 283 | * This hook is called any time a mount is successfully grafetd to | 277 | * This hook is called any time a mount is successfully grafetd to |
| @@ -1468,8 +1462,6 @@ struct security_operations { | |||
| 1468 | int (*sb_mount) (char *dev_name, struct path *path, | 1462 | int (*sb_mount) (char *dev_name, struct path *path, |
| 1469 | char *type, unsigned long flags, void *data); | 1463 | char *type, unsigned long flags, void *data); |
| 1470 | int (*sb_umount) (struct vfsmount *mnt, int flags); | 1464 | int (*sb_umount) (struct vfsmount *mnt, int flags); |
| 1471 | void (*sb_post_remount) (struct vfsmount *mnt, | ||
| 1472 | unsigned long flags, void *data); | ||
| 1473 | void (*sb_post_addmount) (struct vfsmount *mnt, | 1465 | void (*sb_post_addmount) (struct vfsmount *mnt, |
| 1474 | struct path *mountpoint); | 1466 | struct path *mountpoint); |
| 1475 | int (*sb_pivotroot) (struct path *old_path, | 1467 | int (*sb_pivotroot) (struct path *old_path, |
| @@ -1764,7 +1756,6 @@ int security_sb_statfs(struct dentry *dentry); | |||
| 1764 | int security_sb_mount(char *dev_name, struct path *path, | 1756 | int security_sb_mount(char *dev_name, struct path *path, |
| 1765 | char *type, unsigned long flags, void *data); | 1757 | char *type, unsigned long flags, void *data); |
| 1766 | int security_sb_umount(struct vfsmount *mnt, int flags); | 1758 | int security_sb_umount(struct vfsmount *mnt, int flags); |
| 1767 | void security_sb_post_remount(struct vfsmount *mnt, unsigned long flags, void *data); | ||
| 1768 | void security_sb_post_addmount(struct vfsmount *mnt, struct path *mountpoint); | 1759 | void security_sb_post_addmount(struct vfsmount *mnt, struct path *mountpoint); |
| 1769 | int security_sb_pivotroot(struct path *old_path, struct path *new_path); | 1760 | int security_sb_pivotroot(struct path *old_path, struct path *new_path); |
| 1770 | void security_sb_post_pivotroot(struct path *old_path, struct path *new_path); | 1761 | void security_sb_post_pivotroot(struct path *old_path, struct path *new_path); |
| @@ -2081,10 +2072,6 @@ static inline int security_sb_umount(struct vfsmount *mnt, int flags) | |||
| 2081 | return 0; | 2072 | return 0; |
| 2082 | } | 2073 | } |
| 2083 | 2074 | ||
| 2084 | static inline void security_sb_post_remount(struct vfsmount *mnt, | ||
| 2085 | unsigned long flags, void *data) | ||
| 2086 | { } | ||
| 2087 | |||
| 2088 | static inline void security_sb_post_addmount(struct vfsmount *mnt, | 2075 | static inline void security_sb_post_addmount(struct vfsmount *mnt, |
| 2089 | struct path *mountpoint) | 2076 | struct path *mountpoint) |
| 2090 | { } | 2077 | { } |
diff --git a/security/capability.c b/security/capability.c index 476d43030906..26fc92caa339 100644 --- a/security/capability.c +++ b/security/capability.c | |||
| @@ -85,11 +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_remount(struct vfsmount *mnt, unsigned long flags, | ||
| 89 | void *data) | ||
| 90 | { | ||
| 91 | } | ||
| 92 | |||
| 93 | static void cap_sb_post_addmount(struct vfsmount *mnt, struct path *path) | 88 | static void cap_sb_post_addmount(struct vfsmount *mnt, struct path *path) |
| 94 | { | 89 | { |
| 95 | } | 90 | } |
| @@ -929,7 +924,6 @@ void security_fixup_ops(struct security_operations *ops) | |||
| 929 | set_to_cap_if_null(ops, sb_statfs); | 924 | set_to_cap_if_null(ops, sb_statfs); |
| 930 | set_to_cap_if_null(ops, sb_mount); | 925 | set_to_cap_if_null(ops, sb_mount); |
| 931 | set_to_cap_if_null(ops, sb_umount); | 926 | set_to_cap_if_null(ops, sb_umount); |
| 932 | set_to_cap_if_null(ops, sb_post_remount); | ||
| 933 | set_to_cap_if_null(ops, sb_post_addmount); | 927 | set_to_cap_if_null(ops, sb_post_addmount); |
| 934 | set_to_cap_if_null(ops, sb_pivotroot); | 928 | set_to_cap_if_null(ops, sb_pivotroot); |
| 935 | set_to_cap_if_null(ops, sb_post_pivotroot); | 929 | set_to_cap_if_null(ops, sb_post_pivotroot); |
diff --git a/security/security.c b/security/security.c index c1341fbe98ca..d9538d98736b 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_remount(struct vfsmount *mnt, unsigned long flags, void *data) | ||
| 315 | { | ||
| 316 | security_ops->sb_post_remount(mnt, flags, data); | ||
| 317 | } | ||
| 318 | |||
| 319 | void security_sb_post_addmount(struct vfsmount *mnt, struct path *mountpoint) | 314 | void security_sb_post_addmount(struct vfsmount *mnt, struct path *mountpoint) |
| 320 | { | 315 | { |
| 321 | security_ops->sb_post_addmount(mnt, mountpoint); | 316 | security_ops->sb_post_addmount(mnt, mountpoint); |
