diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2016-09-01 11:11:59 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2016-09-01 11:11:59 +0200 |
commit | 38b256973ea90fc7c2b7e1b734fa0e8b83538d50 (patch) | |
tree | 8cb86c9d836b38448f7f2505e98a2f9a7a2f79ff /fs/overlayfs/super.c | |
parent | 0956254a2d5b9e2141385514553aeef694dfe3b5 (diff) | |
download | linux-38b256973ea90fc7c2b7e1b734fa0e8b83538d50.tar.bz2 |
ovl: handle umask and posix_acl_default correctly on creation
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>
Diffstat (limited to 'fs/overlayfs/super.c')
0 files changed, 0 insertions, 0 deletions