]> Git Repo - linux.git/commit
fanotify: if set by user unset FMODE_NONOTIFY before fsnotify_perm() is called
authorLino Sanfilippo <[email protected]>
Fri, 5 Nov 2010 16:05:27 +0000 (17:05 +0100)
committerEric Paris <[email protected]>
Tue, 7 Dec 2010 21:14:21 +0000 (16:14 -0500)
commitb1085ba80cd2784400a7beec3fda5099198ed01c
treec83530f7d7f161c898d464fc1ce65be38a0268c1
parent88d60c32765716289abeb362c44adf6c35c6824c
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 <[email protected]>
Signed-off-by: Eric Paris <[email protected]>
fs/namei.c
include/linux/fsnotify.h
This page took 0.055989 seconds and 4 git commands to generate.