Example #1
0
static NTSTATUS nfs4acl_xattr_get_nt_acl(struct vfs_handle_struct *handle,
				  const struct smb_filename *smb_fname,
				  uint32_t security_info,
				  TALLOC_CTX *mem_ctx,
				  struct security_descriptor **sd)
{
	struct SMB4ACL_T *smb4acl = NULL;
	TALLOC_CTX *frame = talloc_stackframe();
	DATA_BLOB blob;
	NTSTATUS status;

	status = nfs4acl_get_blob(handle, NULL, smb_fname, frame, &blob);
	if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
		TALLOC_FREE(frame);
		return nfs4acl_xattr_default_sd(
			handle,	smb_fname, mem_ctx, sd);
	}
	if (!NT_STATUS_IS_OK(status)) {
		TALLOC_FREE(frame);
		return status;
	}

	status = nfs4acl_blob_to_smb4(handle, &blob, frame, &smb4acl);
	if (!NT_STATUS_IS_OK(status)) {
		TALLOC_FREE(frame);
		return status;
	}

	status = smb_get_nt_acl_nfs4(handle->conn, smb_fname, NULL,
				     security_info, mem_ctx, sd,
				     smb4acl);
	TALLOC_FREE(frame);
	return status;
}
Example #2
0
static NTSTATUS zfsacl_get_nt_acl(struct vfs_handle_struct *handle,
				const char *name,  uint32 security_info,
				struct security_descriptor **ppdesc)
{
	SMB4ACL_T *pacl;
	NTSTATUS status;

	status = zfs_get_nt_acl_common(name, security_info, &pacl);
	if (!NT_STATUS_IS_OK(status)) {
		return status;
	}

	return smb_get_nt_acl_nfs4(handle->conn, name, security_info, ppdesc,
				   pacl);
}
Example #3
0
static NTSTATUS gpfsacl_get_nt_acl(vfs_handle_struct *handle,
	const char *name,
	uint32 security_info, SEC_DESC **ppdesc)
{
	SMB4ACL_T *pacl = NULL;
	int	result;

	*ppdesc = NULL;
	result = gpfs_get_nfs4_acl(name, &pacl);

	if (result == 0)
		return smb_get_nt_acl_nfs4(handle->conn, name, security_info, ppdesc, pacl);

	if (result > 0) {
		DEBUG(10, ("retrying with posix acl...\n"));
		return posix_get_nt_acl(handle->conn, name, security_info, ppdesc);
	}

	/* GPFS ACL was not read, something wrong happened, error code is set in errno */
	return map_nt_error_from_unix(errno);
}
Example #4
0
static NTSTATUS aixjfs2_get_nt_acl(vfs_handle_struct *handle,
	const char *name,
	uint32 security_info, struct security_descriptor **ppdesc)
{
	SMB4ACL_T *pacl = NULL;
	bool	result;
	bool	retryPosix = False;

	*ppdesc = NULL;
	result = aixjfs2_get_nfs4_acl(name, &pacl, &retryPosix);
	if (retryPosix)
	{
		DEBUG(10, ("retrying with posix acl...\n"));
		return posix_get_nt_acl(handle->conn, name, security_info,
					ppdesc);
	}
	if (result==False)
		return NT_STATUS_ACCESS_DENIED;

	return smb_get_nt_acl_nfs4(handle->conn, name, security_info, ppdesc,
				   pacl);
}
Example #5
0
static NTSTATUS nfs4acl_xattr_get_nt_acl(struct vfs_handle_struct *handle,
				  const char *name, uint32_t security_info,
				  TALLOC_CTX *mem_ctx,
				  struct security_descriptor **ppdesc)
{
	struct SMB4ACL_T *pacl;
	NTSTATUS status;
	TALLOC_CTX *frame = talloc_stackframe();

	status = nfs4_get_nfs4_acl(handle, frame, name, &pacl);
	if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
		pacl = nfs4acls_inheritacl(handle, name, frame);
	}
	else if (!NT_STATUS_IS_OK(status)) {
		TALLOC_FREE(frame);
		return status;
	}

	status = smb_get_nt_acl_nfs4(handle->conn, name, security_info,
				     mem_ctx, ppdesc,
				     pacl);
	TALLOC_FREE(frame);
	return status;
}