From bf369327dbfd301da6b49d73f25f2ef6e088524a Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 14 Dec 2020 07:57:45 +0100 Subject: [PATCH] vfs_posixacl: support SMB_ACL_TYPE_DEFAULT in posixacl_sys_acl_set_fd() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/modules/vfs_posixacl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); } -- 2.47.2