IMA: open new file for read
commit3ee41bac34c00a52fa91085ffcef445bc8df92a9
authorMimi Zohar <zohar@linux.vnet.ibm.com>
Wed, 2 Sep 2009 15:40:32 +0000 (2 11:40 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 12 Oct 2009 19:40:22 +0000 (12 12:40 -0700)
tree8a706f554a753551790b7e95c61b9b3cb43112ab
parent112a62ddb32952943517bd170f0eeb26a6f0738f
IMA: open new file for read

commit 6c1488fd581a447ec87c4b59f0d33f95f0aa441b upstream.

When creating a new file, ima_path_check() assumed the new file
was being opened for write. Call ima_path_check() with the
appropriate acc_mode so that the read/write counters are
incremented correctly.

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/namei.c