From: Ralph Boehme Date: Mon, 14 Dec 2020 07:08:30 +0000 (+0100) Subject: vfs_tru64acl: add support for SMB_ACL_TYPE_DEFAULT to tru64acl_sys_acl_set_fd() X-Git-Tag: samba-4.14.0rc1~215 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9303683ee284feaed846b6e6e9fdc615922b7a74;p=thirdparty%2Fsamba.git vfs_tru64acl: add support for SMB_ACL_TYPE_DEFAULT to tru64acl_sys_acl_set_fd() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_tru64acl.c b/source3/modules/vfs_tru64acl.c index 104397ee0be..b5d268c9806 100644 --- a/source3/modules/vfs_tru64acl.c +++ b/source3/modules/vfs_tru64acl.c @@ -140,10 +140,24 @@ int tru64acl_sys_acl_set_fd(vfs_handle_struct *handle, { int res; acl_t tru64_acl = smb_acl_to_tru64_acl(theacl); + acl_type_t the_acl_type; + + switch(type) { + case SMB_ACL_TYPE_ACCESS: + the_acl_type = ACL_TYPE_ACCESS; + break; + case SMB_ACL_TYPE_DEFAULT: + the_acl_type = ACL_TYPE_DEFAULT; + break; + default: + errno = EINVAL; + return -1; + } + if (tru64_acl == NULL) { return -1; } - res = acl_set_fd(fsp_get_io_fd(fsp), ACL_TYPE_ACCESS, tru64_acl); + res = acl_set_fd(fsp_get_io_fd(fsp), the_acl_type, tru64_acl); acl_free(tru64_acl); return res;