]> git.karo-electronics.de Git - karo-tx-linux.git/commit
generic_permission: MAY_OPEN is not write access
authorSerge E. Hallyn <serue@us.ibm.com>
Tue, 29 Dec 2009 20:50:19 +0000 (14:50 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 6 Jan 2010 22:26:45 +0000 (14:26 -0800)
commit92a5184168d552fd3e8f43d05ac04924d6aaa43b
tree469954c331d0d38baeb492235db120759c666fd5
parent64b220304ef04ce44243aae5f477407a7dc26fa6
generic_permission: MAY_OPEN is not write access

commit 7ea6600148c265b1fd53e521022b1d7aec81d974 upstream.

generic_permission was refusing CAP_DAC_READ_SEARCH-enabled
processes from opening DAC-protected files read-only, because
do_filp_open adds MAY_OPEN to the open mask.

Ignore MAY_OPEN.  After this patch, CAP_DAC_READ_SEARCH is
again sufficient to open(fname, O_RDONLY) on a file to which
DAC otherwise refuses us read permission.

Reported-by: Mike Kazantsev <mk.fraggod@gmail.com>
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Tested-by: Mike Kazantsev <mk.fraggod@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/namei.c