mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
vfs_fake_acls: add support for SMB_ACL_TYPE_DEFAULT in fake_acls_sys_acl_set_fd()
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
6c30d49f48
commit
a866027e41
@ -357,7 +357,7 @@ static int fake_acls_sys_acl_set_fd(vfs_handle_struct *handle,
|
||||
SMB_ACL_T theacl)
|
||||
{
|
||||
int ret;
|
||||
const char *name = FAKE_ACL_ACCESS_XATTR;
|
||||
const char *name = NULL;
|
||||
TALLOC_CTX *frame = talloc_stackframe();
|
||||
DATA_BLOB blob = fake_acls_acl2blob(frame, theacl);
|
||||
if (!blob.data) {
|
||||
@ -366,6 +366,19 @@ static int fake_acls_sys_acl_set_fd(vfs_handle_struct *handle,
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case SMB_ACL_TYPE_ACCESS:
|
||||
name = FAKE_ACL_ACCESS_XATTR;
|
||||
break;
|
||||
case SMB_ACL_TYPE_DEFAULT:
|
||||
name = FAKE_ACL_DEFAULT_XATTR;
|
||||
break;
|
||||
default:
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = SMB_VFS_NEXT_FSETXATTR(handle, fsp, name, blob.data, blob.length, 0);
|
||||
TALLOC_FREE(frame);
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user