diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-29 09:44:44 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-29 09:44:44 -0700 |
commit | bb1e9b844b989fc9a4dfffbf7a064703cda2a6a6 (patch) | |
tree | 994d03a5525b8c82fda1fc41382f116cf6e3a40c /fs/namei.c | |
parent | e717f33e989dbe6446547d7ca97489a980056f3c (diff) | |
parent | 94e5d714f604d4cb4cb13163f01ede278e69258b (diff) | |
download | linux-next-bb1e9b844b989fc9a4dfffbf7a064703cda2a6a6.tar.gz |
Merge branch 'bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
integrity: add ima_counts_put (updated)
integrity: ima audit hash_exists fix
integrity: ima mq_open imbalance msg fix
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/namei.c b/fs/namei.c index 5b961eb71cbf..f3c5b278895a 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1761,6 +1761,10 @@ do_last: goto exit; } filp = nameidata_to_filp(&nd, open_flag); + if (IS_ERR(filp)) + ima_counts_put(&nd.path, + acc_mode & (MAY_READ | MAY_WRITE | + MAY_EXEC)); mnt_drop_write(nd.path.mnt); if (nd.root.mnt) path_put(&nd.root); @@ -1817,6 +1821,9 @@ ok: goto exit; } filp = nameidata_to_filp(&nd, open_flag); + if (IS_ERR(filp)) + ima_counts_put(&nd.path, + acc_mode & (MAY_READ | MAY_WRITE | MAY_EXEC)); /* * It is now safe to drop the mnt write * because the filp has had a write taken |