The Samba-Bugzilla – Attachment 13521 Details for
Bug 13003
SMB_VFS_GET_COMPRESSION causes segfault with macOS 10.12.3 clients
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix the segfault
0001-s3-vfs-Pass-a-valid-fsp-to-SMB_VFS_GET_COMPRESSION.patch (text/plain), 1.31 KB, created by
Justin Maggard
on 2017-08-31 00:40:49 UTC
(
hide
)
Description:
Patch to fix the segfault
Filename:
MIME Type:
Creator:
Justin Maggard
Created:
2017-08-31 00:40:49 UTC
Size:
1.31 KB
patch
obsolete
>From 290cd2f0763521ddaf3593497fa404d90ae8575e Mon Sep 17 00:00:00 2001 >From: Justin Maggard <jmaggard@netgear.com> >Date: Wed, 30 Aug 2017 17:36:43 -0700 >Subject: [PATCH] s3: vfs: Pass a valid fsp to SMB_VFS_GET_COMPRESSION > >We need to pass a valid fsp to SMB_VFS_GET_COMPRESSION(), or we will >crash. >--- > source3/smbd/dosmode.c | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > >diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c >index 3181f2e78a9..6e0ab1bbda1 100644 >--- a/source3/smbd/dosmode.c >+++ b/source3/smbd/dosmode.c >@@ -579,14 +579,27 @@ static NTSTATUS dos_mode_check_compressed(connection_struct *conn, > { > NTSTATUS status; > uint16_t compression_fmt; >+ bool need_close = false; >+ files_struct *fsp = NULL; > TALLOC_CTX *tmp_ctx = talloc_new(NULL); > if (tmp_ctx == NULL) { > status = NT_STATUS_NO_MEMORY; > goto err_out; > } > >- status = SMB_VFS_GET_COMPRESSION(conn, tmp_ctx, NULL, smb_fname, >+ status = get_file_handle_for_metadata(conn, >+ smb_fname, >+ &fsp, >+ &need_close); >+ if (!NT_STATUS_IS_OK(status)) { >+ goto err_ctx_free; >+ } >+ >+ status = SMB_VFS_GET_COMPRESSION(conn, tmp_ctx, fsp, smb_fname, > &compression_fmt); >+ if (need_close) { >+ close_file(NULL, fsp, NORMAL_CLOSE); >+ } > if (!NT_STATUS_IS_OK(status)) { > goto err_ctx_free; > } >-- >2.14.1 >
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
Flags:
jra
:
review-
Actions:
View
Attachments on
bug 13003
:
13521
|
13560