static NTSTATUS ad_collect_one_stream(struct vfs_handle_struct *handle,
struct char_mappings **cmaps,
+ struct files_struct *dirfsp,
struct smb_filename *smb_fname,
const struct stream_struct *stream,
struct adouble *ad,
status = SMB_VFS_CREATE_FILE(
handle->conn,
NULL, /* req */
- NULL, /* dirfsp */
+ dirfsp, /* dirfsp */
sname,
FILE_READ_DATA|DELETE_ACCESS,
FILE_SHARE_READ,
if (is_afpresource_stream(stream->name)) {
ad->ad_rsrc_data = talloc_size(ad, stream->size);
if (ad->ad_rsrc_data == NULL) {
- ok = false;
+ status = NT_STATUS_NO_MEMORY;
goto out;
}
}
for (i = 0; i < num_streams; i++) {
- status = ad_collect_one_stream(
- handle, cmaps, fullname, &streams[i], ad, &state);
+ status = ad_collect_one_stream(handle,
+ cmaps,
+ dirfsp,
+ fullname,
+ &streams[i],
+ ad,
+ &state);
if (!NT_STATUS_IS_OK(status)) {
goto out;
}