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

s3:streams: check for :$DATA only in the backend (fix bug #6642)

We need to allow "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION" to pass
check_path(), so that the Quota Dialog works.

metze
This commit is contained in:
Stefan Metzmacher 2009-08-18 11:34:54 +02:00
parent e91d5dbed0
commit 09fe57923a
3 changed files with 11 additions and 5 deletions

View File

@ -55,6 +55,9 @@ NTSTATUS onefs_stream_prep_smb_fname(TALLOC_CTX *ctx,
/* Strip off the :$DATA if one exists. */
str_tmp = strrchr_m(stream_name, ':');
if (str_tmp) {
if (StrCaseCmp(str_tmp, ":$DATA") != 0) {
return NT_STATUS_INVALID_PARAMETER;
}
str_tmp[0] = '\0';
}
}

View File

@ -321,6 +321,14 @@ static NTSTATUS stream_smb_fname(vfs_handle_struct *handle,
*smb_fname_out = NULL;
stype = strchr_m(smb_fname->stream_name + 1, ':');
if (stype) {
if (StrCaseCmp(stype, ":$DATA") != 0) {
return NT_STATUS_INVALID_PARAMETER;
}
}
dirname = stream_dir(handle, smb_fname, NULL, create_dir);
if (dirname == NULL) {
@ -328,8 +336,6 @@ static NTSTATUS stream_smb_fname(vfs_handle_struct *handle,
goto fail;
}
stype = strchr_m(smb_fname->stream_name + 1, ':');
stream_fname = talloc_asprintf(talloc_tos(), "%s/%s", dirname,
smb_fname->stream_name);

View File

@ -65,9 +65,6 @@ static NTSTATUS check_path_syntax_internal(char *path,
if (strchr_m(&s[1], ':')) {
return NT_STATUS_OBJECT_NAME_INVALID;
}
if (StrCaseCmp(s, ":$DATA") != 0) {
return NT_STATUS_INVALID_PARAMETER;
}
break;
}
}