diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-07-10 14:13:18 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-07-12 10:04:15 -0400 |
commit | 9481769208b5e39b871ae4e89f5328c776ec38dc (patch) | |
tree | 5d872c4cf7a436366c4261b67ed39511e20b3d0d /security/selinux/hooks.c | |
parent | e3f20ae21079ecac282df65d83865c5771f4bca0 (diff) |
->file_open(): lose cred argument
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 2b5ee5fbd652..18006be15713 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -3862,7 +3862,7 @@ static int selinux_file_receive(struct file *file) | |||
3862 | return file_has_perm(cred, file, file_to_av(file)); | 3862 | return file_has_perm(cred, file, file_to_av(file)); |
3863 | } | 3863 | } |
3864 | 3864 | ||
3865 | static int selinux_file_open(struct file *file, const struct cred *cred) | 3865 | static int selinux_file_open(struct file *file) |
3866 | { | 3866 | { |
3867 | struct file_security_struct *fsec; | 3867 | struct file_security_struct *fsec; |
3868 | struct inode_security_struct *isec; | 3868 | struct inode_security_struct *isec; |
@@ -3886,7 +3886,7 @@ static int selinux_file_open(struct file *file, const struct cred *cred) | |||
3886 | * new inode label or new policy. | 3886 | * new inode label or new policy. |
3887 | * This check is not redundant - do not remove. | 3887 | * This check is not redundant - do not remove. |
3888 | */ | 3888 | */ |
3889 | return file_path_has_perm(cred, file, open_file_to_av(file)); | 3889 | return file_path_has_perm(file->f_cred, file, open_file_to_av(file)); |
3890 | } | 3890 | } |
3891 | 3891 | ||
3892 | /* task security operations */ | 3892 | /* task security operations */ |