static bool ad_unconvert_get_streams(struct vfs_handle_struct *handle,
				     struct smb_filename *smb_fname,
				     TALLOC_CTX *mem_ctx,
				     unsigned int *num_streams,
				     struct stream_struct **streams)
{
	files_struct *fsp = NULL;
	NTSTATUS status;

	if (!VALID_STAT(smb_fname->st)) {
		return false;
	}

	status = openat_pathref_fsp(handle->conn->cwd_fsp, smb_fname);
	if (!NT_STATUS_IS_OK(status)) {
		return false;
	}

	status = SMB_VFS_CREATE_FILE(
		handle->conn,				/* conn */
		NULL,					/* req */
		smb_fname,				/* fname */
		FILE_READ_ATTRIBUTES,			/* access_mask */
		(FILE_SHARE_READ | FILE_SHARE_WRITE |	/* share_access */
			FILE_SHARE_DELETE),
		FILE_OPEN,				/* create_disposition*/
		0,					/* create_options */
		0,					/* file_attributes */
		INTERNAL_OPEN_ONLY,			/* oplock_request */
		NULL,					/* lease */
		0,					/* allocation_size */
		0,					/* private_flags */
		NULL,					/* sd */
		NULL,					/* ea_list */
		&fsp,					/* result */
		NULL,					/* pinfo */
		NULL, NULL);				/* create context */
	if (!NT_STATUS_IS_OK(status)) {
		DBG_ERR("Opening [%s] failed: %s\n",
			smb_fname_str_dbg(smb_fname),
			nt_errstr(status));
		return false;
	}

	status = vfs_fstreaminfo(fsp,
				mem_ctx,
				num_streams,
				streams);
	if (!NT_STATUS_IS_OK(status)) {
		close_file(NULL, fsp, NORMAL_CLOSE);
		DBG_ERR("streaminfo on [%s] failed: %s\n",
			smb_fname_str_dbg(smb_fname),
			nt_errstr(status));
		return false;
	}

	status = close_file(NULL, fsp, NORMAL_CLOSE);
	if (!NT_STATUS_IS_OK(status)) {
		DBG_ERR("close_file [%s] failed: %s\n",
			smb_fname_str_dbg(smb_fname),
			nt_errstr(status));
		return false;
	}

	return true;
}
static bool ad_unconvert_get_streams(struct vfs_handle_struct *handle,
				     struct smb_filename *smb_fname,
				     TALLOC_CTX *mem_ctx,
				     unsigned int *num_streams,
				     struct stream_struct **streams)
{
	files_struct *fsp = NULL;
	NTSTATUS status;

	if (!VALID_STAT(smb_fname->st)) {
		return false;
	}

	status = openat_pathref_fsp(handle->conn->cwd_fsp, smb_fname);
	if (!NT_STATUS_IS_OK(status)) {
		return false;
	}

	status = SMB_VFS_CREATE_FILE(
		handle->conn,				 
		NULL,					 
		smb_fname,				 
		FILE_READ_ATTRIBUTES,			 
		(FILE_SHARE_READ | FILE_SHARE_WRITE |	 
			FILE_SHARE_DELETE),
		FILE_OPEN,				 
		0,					 
		0,					 
		INTERNAL_OPEN_ONLY,			 
		NULL,					 
		0,					 
		0,					 
		NULL,					 
		NULL,					 
		&fsp,					 
		NULL,					 
		NULL, NULL);				 
	if (!NT_STATUS_IS_OK(status)) {
		DBG_ERR("Opening [%s] failed: %s\n",
			smb_fname_str_dbg(smb_fname),
			nt_errstr(status));
		return false;
	}

	status = vfs_fstreaminfo(fsp,
				mem_ctx,
				num_streams,
				streams);
	if (!NT_STATUS_IS_OK(status)) {
		close_file(NULL, fsp, NORMAL_CLOSE);
		DBG_ERR("streaminfo on [%s] failed: %s\n",
			smb_fname_str_dbg(smb_fname),
			nt_errstr(status));
		return false;
	}

	status = close_file(NULL, fsp, NORMAL_CLOSE);
	if (!NT_STATUS_IS_OK(status)) {
		DBG_ERR("close_file [%s] failed: %s\n",
			smb_fname_str_dbg(smb_fname),
			nt_errstr(status));
		return false;
	}

	return true;
}