Remove a Windows ACL - we're setting the underlying POSIX ACL.
*********************************************************************/
-static int sys_acl_set_file_xattr(vfs_handle_struct *handle,
- const char *name,
- SMB_ACL_TYPE_T type,
- SMB_ACL_T theacl)
-{
- int ret = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle,
- name,
- type,
- theacl);
- if (ret == -1) {
- return -1;
- }
-
- become_root();
- SMB_VFS_REMOVEXATTR(handle, name, XATTR_NTACL_NAME);
- unbecome_root();
-
- return ret;
-}
-
-/*********************************************************************
- Remove a Windows ACL - we're setting the underlying POSIX ACL.
-*********************************************************************/
-
-static int sys_acl_set_fd_xattr(vfs_handle_struct *handle,
- files_struct *fsp,
- SMB_ACL_T theacl)
-{
- int ret = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle,
- fsp,
- theacl);
- if (ret == -1) {
- return -1;
- }
-
- become_root();
- SMB_VFS_FREMOVEXATTR(handle, fsp, XATTR_NTACL_NAME);
- unbecome_root();
-
- return ret;
-}
-
-/*********************************************************************
- Remove a Windows ACL - we're setting the underlying POSIX ACL.
-*********************************************************************/
-
static int sys_acl_set_file_xattr(vfs_handle_struct *handle,
const char *name,
SMB_ACL_TYPE_T type,
{SMB_VFS_OP(sys_acl_set_file_xattr), SMB_VFS_OP_SYS_ACL_SET_FILE, SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(sys_acl_set_fd_xattr), SMB_VFS_OP_SYS_ACL_SET_FD, SMB_VFS_LAYER_TRANSPARENT},
- /* POSIX ACL operations. */
- {SMB_VFS_OP(sys_acl_set_file_xattr), SMB_VFS_OP_SYS_ACL_SET_FILE, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(sys_acl_set_fd_xattr), SMB_VFS_OP_SYS_ACL_SET_FD, SMB_VFS_LAYER_TRANSPARENT},
-
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};