mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
vfs_streams_xattr: check stream type
Only allow access to the stream type "$DATA". vfs_streams_depot does this too and it fixes the failing test "smb2.streams.names". Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Nov 22 01:07:54 CET 2014 on sn-devel-104
This commit is contained in:
parent
1076e4e4e2
commit
927290b384
@ -114,6 +114,12 @@ static NTSTATUS streams_xattr_get_name(vfs_handle_struct *handle,
|
||||
|
||||
stype = strchr_m(stream_name + 1, ':');
|
||||
|
||||
if (stype) {
|
||||
if (strcasecmp_m(stype, ":$DATA") != 0) {
|
||||
return NT_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
||||
*xattr_name = talloc_asprintf(ctx, "%s%s",
|
||||
config->prefix,
|
||||
stream_name + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user