[SCM] Samba Shared Repository - branch v4-4-test updated

Karolin Seeger kseeger at samba.org
Tue Nov 8 14:36:02 UTC 2016


The branch, v4-4-test has been updated
       via  bf9e460 vfs:glusterfs: preallocate result for glfs_realpath
      from  37e476a s3-winbind: Do not return NO_MEMORY if we have an empty user list

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-4-test


- Log -----------------------------------------------------------------
commit bf9e460099d61f3614c2ea34fddc2bbe495083b8
Author: Michael Adam <obnox at samba.org>
Date:   Fri Oct 21 00:15:06 2016 +0200

    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 at samba.org>
    Reviewed-by: Ira Cooper <ira at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Sat Oct 22 00:28:41 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 92a0a56c3852726e0812d260e043957c879aefa4)
    
    Autobuild-User(v4-4-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-4-test): Tue Nov  8 15:35:20 CET 2016 on sn-devel-144

-----------------------------------------------------------------------

Summary of changes:
 source3/modules/vfs_glusterfs.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index 6548d7e..b8ad196 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -1020,7 +1020,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,


-- 
Samba Shared Repository



More information about the samba-cvs mailing list