]> git.karo-electronics.de Git - linux-beck.git/commitdiff
constify security_path_chroot()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 25 Mar 2016 19:28:43 +0000 (15:28 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 28 Mar 2016 04:47:51 +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 52c2ac5f4855a4e0b548c7d53d6385e2983ef69d..e2baca48e596e2cce7b66ee503fb7447dcc4e632 100644 (file)
@@ -1376,7 +1376,7 @@ union security_list_options {
                                struct dentry *new_dentry);
        int (*path_chmod)(const struct path *path, umode_t mode);
        int (*path_chown)(const struct path *path, kuid_t uid, kgid_t gid);
-       int (*path_chroot)(struct path *path);
+       int (*path_chroot)(const struct path *path);
 #endif
 
        int (*inode_alloc_security)(struct inode *inode);
index 82854115e36b7e3147ba25ba82274d8aeb820d34..cb53cffbfae416fd987eb7705450912311646a74 100644 (file)
@@ -1457,7 +1457,7 @@ int security_path_rename(const struct path *old_dir, struct dentry *old_dentry,
                         unsigned int flags);
 int security_path_chmod(const struct path *path, umode_t mode);
 int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid);
-int security_path_chroot(struct path *path);
+int security_path_chroot(const struct path *path);
 #else  /* CONFIG_SECURITY_PATH */
 static inline int security_path_unlink(const struct path *dir, struct dentry *dentry)
 {
@@ -1518,7 +1518,7 @@ static inline int security_path_chown(const struct path *path, kuid_t uid, kgid_
        return 0;
 }
 
-static inline int security_path_chroot(struct path *path)
+static inline int security_path_chroot(const struct path *path)
 {
        return 0;
 }
index 33b85a9601288f47ade5be7bd6d814df2ba07c66..cf6f31df524aa7e01c87028fffe13dc3660fd4c2 100644 (file)
@@ -499,7 +499,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
        return call_int_hook(path_chown, 0, path, uid, gid);
 }
 
-int security_path_chroot(struct path *path)
+int security_path_chroot(const struct path *path)
 {
        return call_int_hook(path_chroot, 0, path);
 }
index 6a858f2f406393c1bb9374d44411cd2c22ac76f9..c7764bb747aa28f46f65c5120655b8809af2919e 100644 (file)
@@ -385,7 +385,7 @@ static int tomoyo_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
  *
  * Returns 0 on success, negative value otherwise.
  */
-static int tomoyo_path_chroot(struct path *path)
+static int tomoyo_path_chroot(const struct path *path)
 {
        return tomoyo_path_perm(TOMOYO_TYPE_CHROOT, path, NULL);
 }