diff options
author | Eric Paris <eparis@redhat.com> | 2008-12-17 13:53:20 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-01-05 11:54:28 -0500 |
commit | 6110e3abbff8b785907d4db50240e63c1be726e3 (patch) | |
tree | 79bc025df5f7e192c22df4044193abce8a5bb461 /fs/exec.c | |
parent | 56ff5efad96182f4d3cb3dc6b07396762c658f16 (diff) |
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: Eric Paris <eparis@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/audit.h> | 51 | #include <linux/audit.h> |
52 | #include <linux/tracehook.h> | 52 | #include <linux/tracehook.h> |
53 | #include <linux/kmod.h> | 53 | #include <linux/kmod.h> |
54 | #include <linux/fsnotify.h> | ||
54 | 55 | ||
55 | #include <asm/uaccess.h> | 56 | #include <asm/uaccess.h> |
56 | #include <asm/mmu_context.h> | 57 | #include <asm/mmu_context.h> |
@@ -132,6 +133,8 @@ asmlinkage long sys_uselib(const char __user * library) | |||
132 | if (IS_ERR(file)) | 133 | if (IS_ERR(file)) |
133 | goto out; | 134 | goto out; |
134 | 135 | ||
136 | fsnotify_open(file->f_path.dentry); | ||
137 | |||
135 | error = -ENOEXEC; | 138 | error = -ENOEXEC; |
136 | if(file->f_op) { | 139 | if(file->f_op) { |
137 | struct linux_binfmt * fmt; | 140 | struct linux_binfmt * fmt; |
@@ -684,6 +687,8 @@ struct file *open_exec(const char *name) | |||
684 | if (IS_ERR(file)) | 687 | if (IS_ERR(file)) |
685 | return file; | 688 | return file; |
686 | 689 | ||
690 | fsnotify_open(file->f_path.dentry); | ||
691 | |||
687 | err = deny_write_access(file); | 692 | err = deny_write_access(file); |
688 | if (err) { | 693 | if (err) { |
689 | fput(file); | 694 | fput(file); |