Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 7ea66001 authored by Serge Hallyn's avatar Serge Hallyn Committed by Linus Torvalds
Browse files

generic_permission: MAY_OPEN is not write access


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: default avatarMike Kazantsev <mk.fraggod@gmail.com>
Signed-off-by: default avatarSerge E. Hallyn <serue@us.ibm.com>
Tested-by: default avatarMike Kazantsev <mk.fraggod@gmail.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9a7262a0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment