]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
constify security_sb_pivotroot()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 25 Mar 2016 19:31:19 +0000 (15:31 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 28 Mar 2016 04:47:52 +0000 (00:47 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
include/linux/lsm_hooks.h
include/linux/security.h
security/security.c
security/tomoyo/tomoyo.c

index e2baca48e596e2cce7b66ee503fb7447dcc4e632..41c0aa6d39ea51bce714a9446ffe93780ad4d17f 100644 (file)
@@ -1346,7 +1346,7 @@ union security_list_options {
        int (*sb_mount)(const char *dev_name, const struct path *path,
                        const char *type, unsigned long flags, void *data);
        int (*sb_umount)(struct vfsmount *mnt, int flags);
-       int (*sb_pivotroot)(struct path *old_path, struct path *new_path);
+       int (*sb_pivotroot)(const struct path *old_path, const struct path *new_path);
        int (*sb_set_mnt_opts)(struct super_block *sb,
                                struct security_mnt_opts *opts,
                                unsigned long kern_flags,
index cb53cffbfae416fd987eb7705450912311646a74..fcfa211c694f03b97aadf9cdecc62029a93e755e 100644 (file)
@@ -225,7 +225,7 @@ int security_sb_statfs(struct dentry *dentry);
 int security_sb_mount(const char *dev_name, const struct path *path,
                      const char *type, unsigned long flags, void *data);
 int security_sb_umount(struct vfsmount *mnt, int flags);
-int security_sb_pivotroot(struct path *old_path, struct path *new_path);
+int security_sb_pivotroot(const struct path *old_path, const struct path *new_path);
 int security_sb_set_mnt_opts(struct super_block *sb,
                                struct security_mnt_opts *opts,
                                unsigned long kern_flags,
@@ -542,8 +542,8 @@ static inline int security_sb_umount(struct vfsmount *mnt, int flags)
        return 0;
 }
 
-static inline int security_sb_pivotroot(struct path *old_path,
-                                       struct path *new_path)
+static inline int security_sb_pivotroot(const struct path *old_path,
+                                       const struct path *new_path)
 {
        return 0;
 }
index cf6f31df524aa7e01c87028fffe13dc3660fd4c2..f7af0aaa173eba8698598831d0d3a8b021cbb416 100644 (file)
@@ -313,7 +313,7 @@ int security_sb_umount(struct vfsmount *mnt, int flags)
        return call_int_hook(sb_umount, 0, mnt, flags);
 }
 
-int security_sb_pivotroot(struct path *old_path, struct path *new_path)
+int security_sb_pivotroot(const struct path *old_path, const struct path *new_path)
 {
        return call_int_hook(sb_pivotroot, 0, old_path, new_path);
 }
index c7764bb747aa28f46f65c5120655b8809af2919e..75c998700190ce260f54926e2d49236c154229e6 100644 (file)
@@ -429,7 +429,7 @@ static int tomoyo_sb_umount(struct vfsmount *mnt, int flags)
  *
  * Returns 0 on success, negative value otherwise.
  */
-static int tomoyo_sb_pivotroot(struct path *old_path, struct path *new_path)
+static int tomoyo_sb_pivotroot(const struct path *old_path, const struct path *new_path)
 {
        return tomoyo_path2_perm(TOMOYO_TYPE_PIVOT_ROOT, new_path, old_path);
 }