|
@@ -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;
|
|
|
}
|