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/smack | |
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/smack')
-rw-r--r-- | security/smack/smack_lsm.c | 6 |
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) | |||
1927 | * | 1927 | * |
1928 | * Returns 0 | 1928 | * Returns 0 |
1929 | */ | 1929 | */ |
1930 | static int smack_file_open(struct file *file, const struct cred *cred) | 1930 | static int smack_file_open(struct file *file) |
1931 | { | 1931 | { |
1932 | struct task_smack *tsp = cred->security; | 1932 | struct task_smack *tsp = file->f_cred->security; |
1933 | struct inode *inode = file_inode(file); | 1933 | struct inode *inode = file_inode(file); |
1934 | struct smk_audit_info ad; | 1934 | struct smk_audit_info ad; |
1935 | int rc; | 1935 | int rc; |
@@ -1937,7 +1937,7 @@ static int smack_file_open(struct file *file, const struct cred *cred) | |||
1937 | smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); | 1937 | smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); |
1938 | smk_ad_setfield_u_fs_path(&ad, file->f_path); | 1938 | smk_ad_setfield_u_fs_path(&ad, file->f_path); |
1939 | rc = smk_tskacc(tsp, smk_of_inode(inode), MAY_READ, &ad); | 1939 | rc = smk_tskacc(tsp, smk_of_inode(inode), MAY_READ, &ad); |
1940 | rc = smk_bu_credfile(cred, file, MAY_READ, rc); | 1940 | rc = smk_bu_credfile(file->f_cred, file, MAY_READ, rc); |
1941 | 1941 | ||
1942 | return rc; | 1942 | return rc; |
1943 | } | 1943 | } |