aboutsummaryrefslogtreecommitdiffstats
path: root/security/apparmor/lsm.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2017-01-16 00:42:28 -0800
committerJohn Johansen <john.johansen@canonical.com>2017-01-16 01:18:24 -0800
commitefeee83a7060c225fac5ac794e9c11183c267f81 (patch)
tree02e0821e9b5baea604bc248c6f64b1d105091cc4 /security/apparmor/lsm.c
parentapparmor: add debug assert AA_BUG and Kconfig to control debug info (diff)
downloadlinux-dev-efeee83a7060c225fac5ac794e9c11183c267f81.tar.xz
linux-dev-efeee83a7060c225fac5ac794e9c11183c267f81.zip
apparmor: rename mediated_filesystem() to path_mediated_fs()
Rename to indicate the test is only about whether path mediation is used, not whether other types of mediation might be used. Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to '')
-rw-r--r--security/apparmor/lsm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index 99a6e5ec4ffe..a757c163fda6 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -195,7 +195,7 @@ static inline int common_perm_path(int op, const struct path *path, u32 mask)
struct path_cond cond = { d_backing_inode(path->dentry)->i_uid,
d_backing_inode(path->dentry)->i_mode
};
- if (!mediated_filesystem(path->dentry))
+ if (!path_mediated_fs(path->dentry))
return 0;
return common_perm(op, path, mask, &cond);
@@ -216,7 +216,7 @@ static int common_perm_rm(int op, const struct path *dir,
struct inode *inode = d_backing_inode(dentry);
struct path_cond cond = { };
- if (!inode || !mediated_filesystem(dentry))
+ if (!inode || !path_mediated_fs(dentry))
return 0;
cond.uid = inode->i_uid;
@@ -240,7 +240,7 @@ static int common_perm_create(int op, const struct path *dir,
{
struct path_cond cond = { current_fsuid(), mode };
- if (!mediated_filesystem(dir->dentry))
+ if (!path_mediated_fs(dir->dentry))
return 0;
return common_perm_dir_dentry(op, dir, dentry, mask, &cond);
@@ -287,7 +287,7 @@ static int apparmor_path_link(struct dentry *old_dentry, const struct path *new_
struct aa_profile *profile;
int error = 0;
- if (!mediated_filesystem(old_dentry))
+ if (!path_mediated_fs(old_dentry))
return 0;
profile = aa_current_profile();
@@ -302,7 +302,7 @@ static int apparmor_path_rename(const struct path *old_dir, struct dentry *old_d
struct aa_profile *profile;
int error = 0;
- if (!mediated_filesystem(old_dentry))
+ if (!path_mediated_fs(old_dentry))
return 0;
profile = aa_current_profile();
@@ -349,7 +349,7 @@ static int apparmor_file_open(struct file *file, const struct cred *cred)
struct aa_profile *profile;
int error = 0;
- if (!mediated_filesystem(file->f_path.dentry))
+ if (!path_mediated_fs(file->f_path.dentry))
return 0;
/* If in exec, permission is handled by bprm hooks.
@@ -402,7 +402,7 @@ static int common_file_perm(int op, struct file *file, u32 mask)
BUG_ON(!fprofile);
if (!file->f_path.mnt ||
- !mediated_filesystem(file->f_path.dentry))
+ !path_mediated_fs(file->f_path.dentry))
return 0;
profile = __aa_current_profile();