Skip to content

Commit

Permalink
SMACK: smack_file_lock can use the struct path
Browse files Browse the repository at this point in the history
smack_file_lock has a struct path, so use that instead of only the
dentry.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
  • Loading branch information
Eric Paris committed Apr 25, 2011
1 parent a269434 commit 92f4250
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions security/smack/smack_lsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1076,8 +1076,8 @@ static int smack_file_lock(struct file *file, unsigned int cmd)
{
struct smk_audit_info ad;

smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY);
smk_ad_setfield_u_fs_path_dentry(&ad, file->f_path.dentry);
smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH);
smk_ad_setfield_u_fs_path(&ad, file->f_path);
return smk_curacc(file->f_security, MAY_WRITE, &ad);
}

Expand Down

0 comments on commit 92f4250

Please sign in to comment.