[RFC PATCH 2/2] Fix 2 untangling ima mess, part 2 with counters

From: Mimi Zohar
Date: Wed Jan 20 2010 - 15:36:32 EST


The "Untangling ima mess, part 2 with counters" patch did
not measure all files, which should have been measured.

Signed-off-by: Mimi Zohar <zohar@xxxxxxxxxx>
---
fs/namei.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/namei.c b/fs/namei.c
index a89ebc3..e1f15e8 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1730,7 +1730,7 @@ do_last:
if (nd.root.mnt)
path_put(&nd.root);
if (!IS_ERR(filp)) {
- error = ima_path_check(filp, filp->f_mode &
+ error = ima_path_check(filp, acc_mode &
(MAY_READ | MAY_WRITE | MAY_EXEC));
if (error) {
fput(filp);
@@ -1791,7 +1791,7 @@ ok:
}
filp = nameidata_to_filp(&nd, open_flag);
if (!IS_ERR(filp)) {
- error = ima_path_check(filp, filp->f_mode &
+ error = ima_path_check(filp, acc_mode &
(MAY_READ | MAY_WRITE | MAY_EXEC));
if (error) {
fput(filp);
--
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/