Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92f42509 authored by Eric Paris's avatar Eric Paris
Browse files

SMACK: smack_file_lock can use the struct path



smack_file_lock has a struct path, so use that instead of only the
dentry.

Signed-off-by: default avatarEric Paris <eparis@redhat.com>
Acked-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
parent a269434d
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1076,8 +1076,8 @@ static int smack_file_lock(struct file *file, unsigned int cmd)
{
{
	struct smk_audit_info ad;
	struct smk_audit_info ad;


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