From: Lino Sanfilippo Date: Fri, 5 Nov 2010 16:05:27 +0000 (+0100) Subject: fanotify: if set by user unset FMODE_NONOTIFY before fsnotify_perm() is called X-Git-Tag: v2.6.37-rc7~24^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1085ba80cd2784400a7beec3fda5099198ed01c;p=pandora-kernel.git fanotify: if set by user unset FMODE_NONOTIFY before fsnotify_perm() is called Unsetting FMODE_NONOTIFY in fsnotify_open() is too late, since fsnotify_perm() is called before. If FMODE_NONOTIFY is set fsnotify_perm() will skip permission checks, so a user can still disable permission checks by setting this flag in an open() call. This patch corrects this by unsetting the flag before fsnotify_perm is called. Signed-off-by: Lino Sanfilippo Signed-off-by: Eric Paris --- Reading git-diff-tree failed