1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3:vfs: vfs_streams_xattr.c: Change walk_xattr_streams() to const struct smb_filename * from const char *.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
This commit is contained in:
Jeremy Allison 2016-03-11 15:11:20 -08:00 committed by Uri Simchoni
parent 347d3aaf96
commit e8000923ae

View File

@ -683,8 +683,9 @@ static int streams_xattr_rename(vfs_handle_struct *handle,
return ret;
}
static NTSTATUS walk_xattr_streams(vfs_handle_struct *handle, files_struct *fsp,
const char *fname,
static NTSTATUS walk_xattr_streams(vfs_handle_struct *handle,
files_struct *fsp,
const struct smb_filename *smb_fname,
bool (*fn)(struct ea_struct *ea,
void *private_data),
void *private_data)
@ -697,8 +698,12 @@ static NTSTATUS walk_xattr_streams(vfs_handle_struct *handle, files_struct *fsp,
SMB_VFS_HANDLE_GET_DATA(handle, config, struct streams_xattr_config,
return NT_STATUS_UNSUCCESSFUL);
status = get_ea_names_from_file(talloc_tos(), handle->conn, fsp, fname,
&names, &num_names);
status = get_ea_names_from_file(talloc_tos(),
handle->conn,
fsp,
smb_fname->base_name,
&names,
&num_names);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@ -729,11 +734,17 @@ static NTSTATUS walk_xattr_streams(vfs_handle_struct *handle, files_struct *fsp,
continue;
}
status = get_ea_value(names, handle->conn, fsp, fname,
names[i], &ea);
status = get_ea_value(names,
handle->conn,
fsp,
smb_fname->base_name,
names[i],
&ea);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(10, ("Could not get ea %s for file %s: %s\n",
names[i], fname, nt_errstr(status)));
names[i],
smb_fname->base_name,
nt_errstr(status)));
continue;
}
@ -849,7 +860,7 @@ static NTSTATUS streams_xattr_streaminfo(vfs_handle_struct *handle,
*/
status = NT_STATUS_OK;
} else {
status = walk_xattr_streams(handle, fsp, smb_fname->base_name,
status = walk_xattr_streams(handle, fsp, smb_fname,
collect_one_stream, &state);
}