|
@@ -1955,12 +1955,9 @@ static int smack_file_open(struct file *file, const struct cred *cred)
|
|
struct smk_audit_info ad;
|
|
struct smk_audit_info ad;
|
|
int rc;
|
|
int rc;
|
|
|
|
|
|
- if (smack_privileged(CAP_MAC_OVERRIDE))
|
|
|
|
- return 0;
|
|
|
|
-
|
|
|
|
smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH);
|
|
smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH);
|
|
smk_ad_setfield_u_fs_path(&ad, file->f_path);
|
|
smk_ad_setfield_u_fs_path(&ad, file->f_path);
|
|
- rc = smk_access(tsp->smk_task, smk_of_inode(inode), MAY_READ, &ad);
|
|
|
|
|
|
+ rc = smk_tskacc(tsp, smk_of_inode(inode), MAY_READ, &ad);
|
|
rc = smk_bu_credfile(cred, file, MAY_READ, rc);
|
|
rc = smk_bu_credfile(cred, file, MAY_READ, rc);
|
|
|
|
|
|
return rc;
|
|
return rc;
|