constify security_path_truncate()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 25 Mar 2016 18:22:01 +0000 (14:22 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 28 Mar 2016 04:46:54 +0000 (00:46 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
include/linux/lsm_hooks.h
include/linux/security.h
security/apparmor/lsm.c
security/security.c
security/tomoyo/tomoyo.c

index cdee11cbcdf1487a7cd99d0f58a3c348e4b118d0..77c3bfdacf16800b9ebb25b1a7e65836e2bc42d2 100644 (file)
@@ -1366,7 +1366,7 @@ union security_list_options {
        int (*path_rmdir)(struct path *dir, struct dentry *dentry);
        int (*path_mknod)(struct path *dir, struct dentry *dentry,
                                umode_t mode, unsigned int dev);
-       int (*path_truncate)(struct path *path);
+       int (*path_truncate)(const struct path *path);
        int (*path_symlink)(struct path *dir, struct dentry *dentry,
                                const char *old_name);
        int (*path_link)(struct dentry *old_dentry, struct path *new_dir,
index 157f0cb1e4d2f9a6116b81d517093ec914b853a7..be37ccab228684abeba8201dbc5075ee0ebb8cca 100644 (file)
@@ -1447,7 +1447,7 @@ int security_path_mkdir(struct path *dir, struct dentry *dentry, umode_t mode);
 int security_path_rmdir(struct path *dir, struct dentry *dentry);
 int security_path_mknod(struct path *dir, struct dentry *dentry, umode_t mode,
                        unsigned int dev);
-int security_path_truncate(struct path *path);
+int security_path_truncate(const struct path *path);
 int security_path_symlink(struct path *dir, struct dentry *dentry,
                          const char *old_name);
 int security_path_link(struct dentry *old_dentry, struct path *new_dir,
@@ -1481,7 +1481,7 @@ static inline int security_path_mknod(struct path *dir, struct dentry *dentry,
        return 0;
 }
 
-static inline int security_path_truncate(struct path *path)
+static inline int security_path_truncate(const struct path *path)
 {
        return 0;
 }
index 9713037e52575b98054db66dd14ab808018060a7..83e9c3c2cfc807b9196687c55af77bf0fdb4b04d 100644 (file)
@@ -269,7 +269,7 @@ static int apparmor_path_mknod(struct path *dir, struct dentry *dentry,
        return common_perm_create(OP_MKNOD, dir, dentry, AA_MAY_CREATE, mode);
 }
 
-static int apparmor_path_truncate(struct path *path)
+static int apparmor_path_truncate(const struct path *path)
 {
        struct path_cond cond = { d_backing_inode(path->dentry)->i_uid,
                                  d_backing_inode(path->dentry)->i_mode
index 3644b0344d29f3a17ef4f94b1156c9dffff02e65..23ffb6cc3974bab206e6f69fe2faa9311ad75d6a 100644 (file)
@@ -478,7 +478,7 @@ int security_path_rename(struct path *old_dir, struct dentry *old_dentry,
 }
 EXPORT_SYMBOL(security_path_rename);
 
-int security_path_truncate(struct path *path)
+int security_path_truncate(const struct path *path)
 {
        if (unlikely(IS_PRIVATE(d_backing_inode(path->dentry))))
                return 0;
index cbf3df422c8724576a503b7eb4e341a934ed83d0..8573eee2b58eb1ac0ed534d202637ed4b5d0d066 100644 (file)
@@ -150,7 +150,7 @@ static int tomoyo_inode_getattr(const struct path *path)
  *
  * Returns 0 on success, negative value otherwise.
  */
-static int tomoyo_path_truncate(struct path *path)
+static int tomoyo_path_truncate(const struct path *path)
 {
        return tomoyo_path_perm(TOMOYO_TYPE_TRUNCATE, path, NULL);
 }
This page took 0.032071 seconds and 5 git commands to generate.