https://github.com/torvalds/linux
Revision 38b256973ea90fc7c2b7e1b734fa0e8b83538d50 authored by Miklos Szeredi on 01 September 2016, 09:11:59 UTC, committed by Miklos Szeredi on 01 September 2016, 09:11:59 UTC
Setting MS_POSIXACL in sb->s_flags has the side effect of passing mode to
create functions without masking against umask.

Another problem when creating over a whiteout is that the default posix acl
is not inherited from the parent dir (because the real parent dir at the
time of creation is the work directory).

Fix these problems by:

 a) If upper fs does not have MS_POSIXACL, then mask mode with umask.

 b) If creating over a whiteout, call posix_acl_create() to get the
 inherited acls.  After creation (but before moving to the final
 destination) set these acls on the created file.  posix_acl_create() also
 updates the file creation mode as appropriate.

Fixes: 39a25b2b3762 ("ovl: define ->get_acl() for overlay inodes")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
1 parent 0956254
History
Tip revision: 38b256973ea90fc7c2b7e1b734fa0e8b83538d50 authored by Miklos Szeredi on 01 September 2016, 09:11:59 UTC
ovl: handle umask and posix_acl_default correctly on creation
Tip revision: 38b2569
File Mode Size
Documentation
arch
block
certs
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 31 bytes
.gitignore -rw-r--r-- 1.3 KB
.mailmap -rw-r--r-- 7.1 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 95.5 KB
Kbuild -rw-r--r-- 2.8 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 362.6 KB
Makefile -rw-r--r-- 56.9 KB
README -rw-r--r-- 18.1 KB
REPORTING-BUGS -rw-r--r-- 7.3 KB

README

back to top