]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sys_execve and sys_uselib do not call into fsnotify
authorEric Paris <eparis@redhat.com>
Wed, 17 Dec 2008 18:53:20 +0000 (13:53 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 5 Jan 2009 16:54:28 +0000 (11:54 -0500)
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>
fs/exec.c

index 3ef9cf9b1871ab8d1ef8d86b6ce21cf3716ad9dc..9c33f542dc7785da628c2943c3626c878e0df07b 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -51,6 +51,7 @@
 #include <linux/audit.h>
 #include <linux/tracehook.h>
 #include <linux/kmod.h>
+#include <linux/fsnotify.h>
 
 #include <asm/uaccess.h>
 #include <asm/mmu_context.h>
@@ -132,6 +133,8 @@ asmlinkage long sys_uselib(const char __user * library)
        if (IS_ERR(file))
                goto out;
 
+       fsnotify_open(file->f_path.dentry);
+
        error = -ENOEXEC;
        if(file->f_op) {
                struct linux_binfmt * fmt;
@@ -684,6 +687,8 @@ struct file *open_exec(const char *name)
        if (IS_ERR(file))
                return file;
 
+       fsnotify_open(file->f_path.dentry);
+
        err = deny_write_access(file);
        if (err) {
                fput(file);