提交 6110e3ab 编写于 作者: E Eric Paris 提交者: Al Viro

sys_execve and sys_uselib do not call into fsnotify

sys_execve and sys_uselib do not call into fsnotify so inotify does not get
open events for these types of syscalls.  This patch simply makes the
requisite fsnotify calls.
Signed-off-by: NEric Paris <eparis@redhat.com>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 56ff5efa
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
#include <linux/audit.h> #include <linux/audit.h>
#include <linux/tracehook.h> #include <linux/tracehook.h>
#include <linux/kmod.h> #include <linux/kmod.h>
#include <linux/fsnotify.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
...@@ -132,6 +133,8 @@ asmlinkage long sys_uselib(const char __user * library) ...@@ -132,6 +133,8 @@ asmlinkage long sys_uselib(const char __user * library)
if (IS_ERR(file)) if (IS_ERR(file))
goto out; goto out;
fsnotify_open(file->f_path.dentry);
error = -ENOEXEC; error = -ENOEXEC;
if(file->f_op) { if(file->f_op) {
struct linux_binfmt * fmt; struct linux_binfmt * fmt;
...@@ -684,6 +687,8 @@ struct file *open_exec(const char *name) ...@@ -684,6 +687,8 @@ struct file *open_exec(const char *name)
if (IS_ERR(file)) if (IS_ERR(file))
return file; return file;
fsnotify_open(file->f_path.dentry);
err = deny_write_access(file); err = deny_write_access(file);
if (err) { if (err) {
fput(file); fput(file);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册