From: Ralph Boehme Date: Mon, 14 Dec 2020 06:57:45 +0000 (+0100) Subject: vfs_posixacl: support SMB_ACL_TYPE_DEFAULT in posixacl_sys_acl_set_fd() X-Git-Tag: samba-4.14.0rc1~217 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf369327dbfd301da6b49d73f25f2ef6e088524a;p=thirdparty%2Fsamba.git vfs_posixacl: support SMB_ACL_TYPE_DEFAULT in posixacl_sys_acl_set_fd() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_posixacl.c b/source3/modules/vfs_posixacl.c index d573461e987..72c8884ec38 100644 --- a/source3/modules/vfs_posixacl.c +++ b/source3/modules/vfs_posixacl.c @@ -148,7 +148,7 @@ int posixacl_sys_acl_set_fd(vfs_handle_struct *handle, return -1; } - if (!fsp->fsp_flags.is_pathref) { + if (!fsp->fsp_flags.is_pathref && type == SMB_ACL_TYPE_ACCESS) { res = acl_set_fd(fd, acl); } else if (fsp->fsp_flags.have_proc_fds) { const char *proc_fd_path = NULL; @@ -158,13 +158,13 @@ int posixacl_sys_acl_set_fd(vfs_handle_struct *handle, if (proc_fd_path == NULL) { return -1; } - res = acl_set_file(proc_fd_path, ACL_TYPE_ACCESS, acl); + res = acl_set_file(proc_fd_path, type, acl); } else { /* * This is no longer a handle based call. */ res = acl_set_file(fsp->fsp_name->base_name, - ACL_TYPE_ACCESS, + type, acl); }