The Samba-Bugzilla – Attachment 12626 Details for
Bug 12404
vfs_gluster needs to deal with glfs_realpath allocation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch from master (including cherry pick info)
patchv2 (text/plain), 1.49 KB, created by
Guenther Deschner
on 2016-11-02 10:47:31 UTC
(
hide
)
Description:
patch from master (including cherry pick info)
Filename:
MIME Type:
Creator:
Guenther Deschner
Created:
2016-11-02 10:47:31 UTC
Size:
1.49 KB
patch
obsolete
>From 730c0a2fab4b0c494122f29355068cc2bbf0f672 Mon Sep 17 00:00:00 2001 >From: Michael Adam <obnox@samba.org> >Date: Fri, 21 Oct 2016 00:15:06 +0200 >Subject: [PATCH] vfs:glusterfs: preallocate result for glfs_realpath > >https://bugzilla.samba.org/show_bug.cgi?id=12404 > >This makes us independent of the allocation >method used inside glfs_realpath. > >Signed-off-by: Michael Adam <obnox@samba.org> >Reviewed-by: Ira Cooper <ira@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Sat Oct 22 00:28:41 CEST 2016 on sn-devel-144 > >(cherry picked from commit 92a0a56c3852726e0812d260e043957c879aefa4) >--- > source3/modules/vfs_glusterfs.c | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > >diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c >index 732ca51..fc40a90 100644 >--- a/source3/modules/vfs_glusterfs.c >+++ b/source3/modules/vfs_glusterfs.c >@@ -1036,7 +1036,20 @@ static int vfs_gluster_fallocate(struct vfs_handle_struct *handle, > static char *vfs_gluster_realpath(struct vfs_handle_struct *handle, > const char *path) > { >- return glfs_realpath(handle->data, path, 0); >+ char *result = NULL; >+ char *resolved_path = SMB_MALLOC_ARRAY(char, PATH_MAX+1); >+ >+ if (resolved_path == NULL) { >+ errno = ENOMEM; >+ return NULL; >+ } >+ >+ result = glfs_realpath(handle->data, path, resolved_path); >+ if (result == NULL) { >+ SAFE_FREE(resolved_path); >+ } >+ >+ return result; > } > > static bool vfs_gluster_lock(struct vfs_handle_struct *handle, >-- >2.7.4 >
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:
obnox
:
review+
gd
:
review?
(
ira
)
gd
:
review+
Actions:
View
Attachments on
bug 12404
:
12625
| 12626 |
12631
|
12632