summaryrefslogtreecommitdiffstats
path: root/security/smack
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-07-10 14:13:18 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2018-07-12 10:04:15 -0400
commit9481769208b5e39b871ae4e89f5328c776ec38dc (patch)
tree5d872c4cf7a436366c4261b67ed39511e20b3d0d /security/smack
parente3f20ae21079ecac282df65d83865c5771f4bca0 (diff)
downloadlinux-stable-9481769208b5e39b871ae4e89f5328c776ec38dc.tar.gz
linux-stable-9481769208b5e39b871ae4e89f5328c776ec38dc.tar.bz2
linux-stable-9481769208b5e39b871ae4e89f5328c776ec38dc.zip
->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/smack')
-rw-r--r--security/smack/smack_lsm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index 7ad226018f51..e7b6c012431d 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -1927,9 +1927,9 @@ static int smack_file_receive(struct file *file)
*
* Returns 0
*/
-static int smack_file_open(struct file *file, const struct cred *cred)
+static int smack_file_open(struct file *file)
{
- struct task_smack *tsp = cred->security;
+ struct task_smack *tsp = file->f_cred->security;
struct inode *inode = file_inode(file);
struct smk_audit_info ad;
int rc;
@@ -1937,7 +1937,7 @@ static int smack_file_open(struct file *file, const struct cred *cred)
smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH);
smk_ad_setfield_u_fs_path(&ad, file->f_path);
rc = smk_tskacc(tsp, smk_of_inode(inode), MAY_READ, &ad);
- rc = smk_bu_credfile(cred, file, MAY_READ, rc);
+ rc = smk_bu_credfile(file->f_cred, file, MAY_READ, rc);
return rc;
}