diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-03-09 00:28:30 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-12 04:24:32 +0200 |
commit | 3f7036a071b879da017eddaedb10fba173fdf1ff (patch) | |
tree | 2160617c1812915583de79d2ee85913eb247e2a4 /security/selinux | |
parent | constify tomoyo_realpath_from_path() (diff) | |
download | linux-3f7036a071b879da017eddaedb10fba173fdf1ff.tar.xz linux-3f7036a071b879da017eddaedb10fba173fdf1ff.zip |
switch security_inode_getattr() to struct path *
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security/selinux')
-rw-r--r-- | security/selinux/hooks.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 4d1a54190388..e119cdcffc87 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -1623,7 +1623,7 @@ static inline int dentry_has_perm(const struct cred *cred, the path to help the auditing code to more easily generate the pathname if needed. */ static inline int path_has_perm(const struct cred *cred, - struct path *path, + const struct path *path, u32 av) { struct inode *inode = path->dentry->d_inode; @@ -2954,15 +2954,9 @@ static int selinux_inode_setattr(struct dentry *dentry, struct iattr *iattr) return dentry_has_perm(cred, dentry, av); } -static int selinux_inode_getattr(struct vfsmount *mnt, struct dentry *dentry) +static int selinux_inode_getattr(const struct path *path) { - const struct cred *cred = current_cred(); - struct path path; - - path.dentry = dentry; - path.mnt = mnt; - - return path_has_perm(cred, &path, FILE__GETATTR); + return path_has_perm(current_cred(), path, FILE__GETATTR); } static int selinux_inode_setotherxattr(struct dentry *dentry, const char *name) |