The Samba-Bugzilla – Attachment 14743 Details for
Bug 13720
Potential NULL pointer dereference in SMB2_CLOSE debug call
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch from master for 4.9 and 4.8
patch (text/plain), 1.86 KB, created by
Guenther Deschner
on 2018-12-19 07:14:45 UTC
(
hide
)
Description:
patch from master for 4.9 and 4.8
Filename:
MIME Type:
Creator:
Guenther Deschner
Created:
2018-12-19 07:14:45 UTC
Size:
1.86 KB
patch
obsolete
>From 71f53b4e6c284c5946f27f9ff28d3269f421aa9c Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd@samba.org> >Date: Tue, 18 Dec 2018 17:20:29 +0100 >Subject: [PATCH] s3-vfs-streams_xattr: add close call >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >We cannot always rely on vfs_default to close the fake fds. This mostly is >relevant when used with another non-local VFS filesystem module such as >gluster. > >Guenther > >Signed-off-by: Günther Deschner <gd@samba.org> >--- > source3/modules/vfs_streams_xattr.c | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > >diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c >index 9f4bc13b034..213a8367541 100644 >--- a/source3/modules/vfs_streams_xattr.c >+++ b/source3/modules/vfs_streams_xattr.c >@@ -554,6 +554,31 @@ static int streams_xattr_open(vfs_handle_struct *handle, > return -1; > } > >+static int streams_xattr_close(vfs_handle_struct *handle, >+ files_struct *fsp) >+{ >+ int ret; >+ int fd; >+ >+ fd = fsp->fh->fd; >+ >+ DBG_DEBUG("streams_xattr_close called [%s] fd [%d]\n", >+ smb_fname_str_dbg(fsp->fsp_name), fd); >+ >+ if (!is_ntfs_stream_smb_fname(fsp->fsp_name)) { >+ return SMB_VFS_NEXT_CLOSE(handle, fsp); >+ } >+ >+ if (is_ntfs_default_stream_smb_fname(fsp->fsp_name)) { >+ return SMB_VFS_NEXT_CLOSE(handle, fsp); >+ } >+ >+ ret = close(fd); >+ fsp->fh->fd = -1; >+ >+ return ret; >+} >+ > static int streams_xattr_unlink(vfs_handle_struct *handle, > const struct smb_filename *smb_fname) > { >@@ -1653,6 +1678,7 @@ static struct vfs_fn_pointers vfs_streams_xattr_fns = { > .fs_capabilities_fn = streams_xattr_fs_capabilities, > .connect_fn = streams_xattr_connect, > .open_fn = streams_xattr_open, >+ .close_fn = streams_xattr_close, > .stat_fn = streams_xattr_stat, > .fstat_fn = streams_xattr_fstat, > .lstat_fn = streams_xattr_lstat, >-- >2.19.2 >
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 13720
:
14743
|
14744
|
14746