Browse Source

apparmor: constify aa_path_link()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 9 years ago
parent
commit
3539aaf670
2 changed files with 2 additions and 2 deletions
  1. 1 1
      security/apparmor/file.c
  2. 1 1
      security/apparmor/include/file.h

+ 1 - 1
security/apparmor/file.c

@@ -346,7 +346,7 @@ static inline bool xindex_is_subset(u32 link, u32 target)
  * Returns: %0 if allowed else error
  * Returns: %0 if allowed else error
  */
  */
 int aa_path_link(struct aa_profile *profile, struct dentry *old_dentry,
 int aa_path_link(struct aa_profile *profile, struct dentry *old_dentry,
-		 struct path *new_dir, struct dentry *new_dentry)
+		 const struct path *new_dir, struct dentry *new_dentry)
 {
 {
 	struct path link = { new_dir->mnt, new_dentry };
 	struct path link = { new_dir->mnt, new_dentry };
 	struct path target = { new_dir->mnt, old_dentry };
 	struct path target = { new_dir->mnt, old_dentry };

+ 1 - 1
security/apparmor/include/file.h

@@ -175,7 +175,7 @@ int aa_path_perm(int op, struct aa_profile *profile, const struct path *path,
 		 int flags, u32 request, struct path_cond *cond);
 		 int flags, u32 request, struct path_cond *cond);
 
 
 int aa_path_link(struct aa_profile *profile, struct dentry *old_dentry,
 int aa_path_link(struct aa_profile *profile, struct dentry *old_dentry,
-		 struct path *new_dir, struct dentry *new_dentry);
+		 const struct path *new_dir, struct dentry *new_dentry);
 
 
 int aa_file_perm(int op, struct aa_profile *profile, struct file *file,
 int aa_file_perm(int op, struct aa_profile *profile, struct file *file,
 		 u32 request);
 		 u32 request);