The Samba-Bugzilla – Attachment 14642 Details for
Bug 13682
Accessing a traverse-only folder causes "Rejecting root override"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Only call synthetic_smb_fname() if needed
catia_onlyIfNeeded.patch (text/plain), 1.08 KB, created by
sylvain
on 2018-11-12 10:51:13 UTC
(
hide
)
Description:
Only call synthetic_smb_fname() if needed
Filename:
MIME Type:
Creator:
sylvain
Created:
2018-11-12 10:51:13 UTC
Size:
1.08 KB
patch
obsolete
>--- /root/vfs_catia.c 2017-11-02 12:38:36.000000000 +0100 >+++ work/samba-4.7.10/source3/modules/vfs_catia.c 2018-11-09 14:26:47.326914000 +0100 >@@ -2425,21 +2425,29 @@ > errno = map_errno_from_nt_status(status); > return status; > } >- mapped_smb_fname = synthetic_smb_fname(talloc_tos(), >- mapped_name, >- NULL, >- NULL, >- smb_fname->flags); >- if (mapped_smb_fname == NULL) { >- TALLOC_FREE(mapped_name); >- return NT_STATUS_NO_MEMORY; >+ bool sameName = strcmp(mapped_name, path) == 0; >+ if (sameName) { >+ TALLOC_FREE(mapped_name); >+ mapped_smb_fname = smb_fname; >+ } else { >+ mapped_smb_fname = synthetic_smb_fname(talloc_tos(), >+ mapped_name, >+ NULL, >+ NULL, >+ smb_fname->flags); >+ if (mapped_smb_fname == NULL) { >+ TALLOC_FREE(mapped_name); >+ return NT_STATUS_NO_MEMORY; >+ } > } > > status = SMB_VFS_NEXT_GET_DOS_ATTRIBUTES(handle, > mapped_smb_fname, > dosmode); >- TALLOC_FREE(mapped_name); >- TALLOC_FREE(mapped_smb_fname); >+ if(!sameName) { >+ TALLOC_FREE(mapped_name); >+ TALLOC_FREE(mapped_smb_fname); >+ } > > return status; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 13682
: 14642