mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
Fix bug #6254 - PUT/GET produces an error in IPv6 to a smb-server(3.3) has parameter "msdfs root = yes"
This was broken by the refactoring around create_file(). MSDFS pathname processing must be done FIRST. MSDFS pathnames containing IPv6 addresses can be confused with NTFS stream names (they contain ":" characters. Jeremy.
This commit is contained in:
parent
c57b32c5ab
commit
f8f68703da
@ -3355,6 +3355,29 @@ NTSTATUS create_file_default(connection_struct *conn,
|
||||
(unsigned int)root_dir_fid,
|
||||
ea_list, sd, create_file_flags, fname));
|
||||
|
||||
/* MSDFS pathname processing must be done FIRST.
|
||||
MSDFS pathnames containing IPv6 addresses can
|
||||
be confused with NTFS stream names (they contain
|
||||
":" characters. JRA. */
|
||||
|
||||
if ((req != NULL) && (req->flags2 & FLAGS2_DFS_PATHNAMES)) {
|
||||
char *resolved_fname;
|
||||
|
||||
status = resolve_dfspath(talloc_tos(), conn, true, fname,
|
||||
&resolved_fname);
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
/*
|
||||
* For PATH_NOT_COVERED we had
|
||||
* reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
|
||||
* ERRSRV, ERRbadpath);
|
||||
* Need to fix in callers
|
||||
*/
|
||||
goto fail;
|
||||
}
|
||||
fname = resolved_fname;
|
||||
}
|
||||
|
||||
/*
|
||||
* Calculate the filename from the root_dir_if if necessary.
|
||||
*/
|
||||
@ -3410,24 +3433,6 @@ NTSTATUS create_file_default(connection_struct *conn,
|
||||
}
|
||||
}
|
||||
|
||||
if ((req != NULL) && (req->flags2 & FLAGS2_DFS_PATHNAMES)) {
|
||||
char *resolved_fname;
|
||||
|
||||
status = resolve_dfspath(talloc_tos(), conn, true, fname,
|
||||
&resolved_fname);
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
/*
|
||||
* For PATH_NOT_COVERED we had
|
||||
* reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
|
||||
* ERRSRV, ERRbadpath);
|
||||
* Need to fix in callers
|
||||
*/
|
||||
goto fail;
|
||||
}
|
||||
fname = resolved_fname;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if POSIX semantics are wanted.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user