aboutsummaryrefslogtreecommitdiff
path: root/audio/wavcapture.c
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2021-06-22 11:08:50 -0400
committerDr. David Alan Gilbert <dgilbert@redhat.com>2021-07-05 10:51:26 +0100
commit227e5d7fd57b94e36fd754099308969b1373c4ef (patch)
treeecdc81349276ada0918a68a17be84288eb761765 /audio/wavcapture.c
parent6d0028b94797157477ddc759209f3e523e186ad9 (diff)
virtiofsd: Add capability to change/restore umask
When parent directory has default acl and a file is created in that directory, then umask is ignored and final file permissions are determined using default acl instead. (man 2 umask). Currently, fuse applies the umask and sends modified mode in create request accordingly. fuse server can set FUSE_DONT_MASK and tell fuse client to not apply umask and fuse server will take care of it as needed. With posix acls enabled, requirement will be that we want umask to determine final file mode if parent directory does not have default acl. So if posix acls are enabled, opt in for FUSE_DONT_MASK. virtiofsd will set umask of the thread doing file creation. And host kernel should use that umask if parent directory does not have default acls, otherwise umask does not take affect. Miklos mentioned that we already call unshare(CLONE_FS) for every thread. That means umask has now become property of per thread and it should be ok to manipulate it in file creation path. This patch only adds capability to change umask and restore it. It does not enable it yet. Next few patches will add capability to enable it based on if user enabled posix_acl or not. This should fix fstest generic/099. Reported-by: Luis Henriques <lhenriques@suse.de> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20210622150852.1507204-6-vgoyal@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'audio/wavcapture.c')
0 files changed, 0 insertions, 0 deletions