[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Sun Feb 3 16:01:01 UTC 2019


The branch, master has been updated
       via  0e3eda5bab5 vfs_glusterfs: Adapt to changes in libgfapi signatures
       via  858a25abf4a libcli: Solaris cc can't return void values
       via  64e05bc8c13 librpc: Solaris cc does not like unnamed struct members
      from  9df23fe4e51 sysquota_linux: fix querying of group quotas

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 0e3eda5bab5ae9316a42725aea048fb350020ec7
Author: Anoop C S <anoopcs at redhat.com>
Date:   Tue Mar 20 11:32:20 2018 +0530

    vfs_glusterfs: Adapt to changes in libgfapi signatures
    
    VFS module for GlusterFS fails to compile due to recent changes done to
    some API signatures. Therefore adding missing arguments to those APIs
    adapting to new signatures.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13330
    
    Signed-off-by: Anoop C S <anoopcs at redhat.com>
    Reviewed-by: Guenther Deschner <gd at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Sun Feb  3 17:00:33 CET 2019 on sn-devel-144

commit 858a25abf4a71c1c1e2f15e3d61c8e378998f249
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Jan 24 10:38:41 2019 +0100

    libcli: Solaris cc can't return void values
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 64e05bc8c138e1155a27a992233015ebc0d91dbb
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Jan 24 10:37:21 2019 +0100

    librpc: Solaris cc does not like unnamed struct members
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

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

Summary of changes:
 libcli/auth/tests/ntlm_check.c  |  4 ++--
 librpc/ndr/ndr_compression.c    | 44 ++++++++++++++++++++---------------------
 source3/modules/vfs_glusterfs.c | 19 ++++++++++++++++++
 source3/wscript                 |  3 +++
 4 files changed, 46 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/auth/tests/ntlm_check.c b/libcli/auth/tests/ntlm_check.c
index 65c7b086008..886a1a342f8 100644
--- a/libcli/auth/tests/ntlm_check.c
+++ b/libcli/auth/tests/ntlm_check.c
@@ -180,7 +180,7 @@ static void test_ntlm_allowed(void **state)
 
 static void test_ntlm_allowed_lm_supplied(void **state)
 {
-	return test_ntlm_allowed(state);
+	test_ntlm_allowed(state);
 }
 
 static void test_ntlm_disabled(void **state)
@@ -345,7 +345,7 @@ static void test_ntlmv2_only_ntlm(void **state)
 
 static void test_ntlmv2_only_ntlm_and_lanman(void **state)
 {
-	return test_ntlmv2_only_ntlm(state);
+	test_ntlmv2_only_ntlm(state);
 }
 
 static void test_ntlmv2_only_ntlm_once(void **state)
diff --git a/librpc/ndr/ndr_compression.c b/librpc/ndr/ndr_compression.c
index f06a076a71f..c4a13a2f3ba 100644
--- a/librpc/ndr/ndr_compression.c
+++ b/librpc/ndr/ndr_compression.c
@@ -34,7 +34,7 @@ struct ndr_compression_state {
 			uint8_t *dict;
 			size_t dict_size;
 		} mszip;
-	};
+	} alg;
 };
 
 static voidpf ndr_zlib_alloc(voidpf opaque, uInt items, uInt size)
@@ -59,7 +59,7 @@ static enum ndr_err_code ndr_pull_compression_mszip_cab_chunk(struct ndr_pull *n
 	DATA_BLOB plain_chunk;
 	uint32_t plain_chunk_offset;
 	uint32_t plain_chunk_size;
-	z_stream *z = state->mszip.z;
+	z_stream *z = state->alg.mszip.z;
 	int z_ret;
 
 	plain_chunk_size = decompressed_len;
@@ -125,8 +125,8 @@ static enum ndr_err_code ndr_pull_compression_mszip_cab_chunk(struct ndr_pull *n
 	 * uncompressed output as dictionnary.
 	 */
 
-	if (state->mszip.dict_size) {
-		z_ret = inflateSetDictionary(z, state->mszip.dict, state->mszip.dict_size);
+	if (state->alg.mszip.dict_size) {
+		z_ret = inflateSetDictionary(z, state->alg.mszip.dict, state->alg.mszip.dict_size);
 		if (z_ret != Z_OK) {
 			return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION,
 					      "zlib inflateSetDictionary error %s (%d) %s (PULL)",
@@ -164,8 +164,8 @@ static enum ndr_err_code ndr_pull_compression_mszip_cab_chunk(struct ndr_pull *n
 	 * we can just store that instead of copying the memory over
 	 * the dict temp buffer.
 	 */
-	state->mszip.dict = plain_chunk.data;
-	state->mszip.dict_size = plain_chunk.length;
+	state->alg.mszip.dict = plain_chunk.data;
+	state->alg.mszip.dict_size = plain_chunk.length;
 
 	z_ret = inflateReset(z);
 	if (z_ret != Z_OK) {
@@ -217,7 +217,7 @@ static enum ndr_err_code ndr_push_compression_mszip_cab_chunk(struct ndr_push *n
 	comp_chunk.data[0] = 'C';
 	comp_chunk.data[1] = 'K';
 
-	z = state->mszip.z;
+	z = state->alg.mszip.z;
 	z->next_in	= plain_chunk.data;
 	z->avail_in	= plain_chunk.length;
 	z->total_in	= 0;
@@ -234,8 +234,8 @@ static enum ndr_err_code ndr_push_compression_mszip_cab_chunk(struct ndr_push *n
 	 * same CFFOLDER as a dictionnary for the compression.
 	 */
 
-	if (state->mszip.dict_size) {
-		z_ret = deflateSetDictionary(z, state->mszip.dict, state->mszip.dict_size);
+	if (state->alg.mszip.dict_size) {
+		z_ret = deflateSetDictionary(z, state->alg.mszip.dict, state->alg.mszip.dict_size);
 		if (z_ret != Z_OK) {
 			return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION,
 					      "zlib deflateSetDictionary error %s (%d) %s (PUSH)",
@@ -274,7 +274,7 @@ static enum ndr_err_code ndr_push_compression_mszip_cab_chunk(struct ndr_push *n
 				      zError(z_ret), z_ret, z->msg);
 	}
 
-	if (plain_chunk.length > talloc_array_length(state->mszip.dict)) {
+	if (plain_chunk.length > talloc_array_length(state->alg.mszip.dict)) {
 		return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION,
 				      "zlib dict buffer is too big (PUSH)");
 	}
@@ -289,8 +289,8 @@ static enum ndr_err_code ndr_push_compression_mszip_cab_chunk(struct ndr_push *n
 	 * still going to been valid for the lifetime of the
 	 * compressions state object.
 	 */
-	memcpy(state->mszip.dict, plain_chunk.data, plain_chunk.length);
-	state->mszip.dict_size = plain_chunk.length;
+	memcpy(state->alg.mszip.dict, plain_chunk.data, plain_chunk.length);
+	state->alg.mszip.dict_size = plain_chunk.length;
 
 	DEBUG(9,("MSZIP comp plain_chunk_size: %08X (%u) comp_chunk_size: %08X (%u)\n",
 		 (unsigned int)plain_chunk.length,
@@ -805,11 +805,11 @@ static enum ndr_err_code generic_mszip_init(TALLOC_CTX *mem_ctx,
 	z->zfree  = ndr_zlib_free;
 	z->opaque = mem_ctx;
 
-	state->mszip.z = z;
-	state->mszip.dict_size = 0;
+	state->alg.mszip.z = z;
+	state->alg.mszip.dict_size = 0;
 	/* pre-alloc dictionnary */
-	state->mszip.dict = talloc_array(mem_ctx, uint8_t, 0x8000);
-	NDR_ERR_HAVE_NO_MEMORY(state->mszip.dict);
+	state->alg.mszip.dict = talloc_array(mem_ctx, uint8_t, 0x8000);
+	NDR_ERR_HAVE_NO_MEMORY(state->alg.mszip.dict);
 
 	return NDR_ERR_SUCCESS;
 }
@@ -820,8 +820,8 @@ static void generic_mszip_free(struct ndr_compression_state *state)
 		return;
 	}
 
-	TALLOC_FREE(state->mszip.z);
-	TALLOC_FREE(state->mszip.dict);
+	TALLOC_FREE(state->alg.mszip.z);
+	TALLOC_FREE(state->alg.mszip.dict);
 }
 
 
@@ -842,11 +842,11 @@ enum ndr_err_code ndr_pull_compression_state_init(struct ndr_pull *ndr,
 		break;
 	case NDR_COMPRESSION_MSZIP_CAB:
 		NDR_CHECK(generic_mszip_init(ndr, s));
-		z_ret = inflateInit2(s->mszip.z, -MAX_WBITS);
+		z_ret = inflateInit2(s->alg.mszip.z, -MAX_WBITS);
 		if (z_ret != Z_OK) {
 			return ndr_pull_error(ndr, NDR_ERR_COMPRESSION,
 					      "zlib inflateinit2 error %s (%d) %s (PULL)",
-					      zError(z_ret), z_ret, s->mszip.z->msg);
+					      zError(z_ret), z_ret, s->alg.mszip.z->msg);
 		}
 		break;
 	default:
@@ -897,7 +897,7 @@ enum ndr_err_code ndr_push_compression_state_init(struct ndr_push *ndr,
 		break;
 	case NDR_COMPRESSION_MSZIP_CAB:
 		NDR_CHECK(generic_mszip_init(ndr, s));
-		z_ret = deflateInit2(s->mszip.z,
+		z_ret = deflateInit2(s->alg.mszip.z,
 				     Z_DEFAULT_COMPRESSION,
 				     Z_DEFLATED,
 				     -MAX_WBITS,
@@ -906,7 +906,7 @@ enum ndr_err_code ndr_push_compression_state_init(struct ndr_push *ndr,
 		if (z_ret != Z_OK) {
 			return ndr_push_error(ndr, NDR_ERR_COMPRESSION,
 					      "zlib inflateinit2 error %s (%d) %s (PUSH)",
-					      zError(z_ret), z_ret, s->mszip.z->msg);
+					      zError(z_ret), z_ret, s->alg.mszip.z->msg);
 		}
 		break;
 	default:
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index a241ac9db9f..601be5a2da4 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -633,7 +633,11 @@ static ssize_t vfs_gluster_pread(struct vfs_handle_struct *handle,
 		return -1;
 	}
 
+#ifdef HAVE_GFAPI_VER_7_6
+	return glfs_pread(glfd, data, n, offset, 0, NULL);
+#else
 	return glfs_pread(glfd, data, n, offset, 0);
+#endif
 }
 
 struct glusterfs_aio_state;
@@ -664,7 +668,14 @@ static int aio_wrapper_destructor(struct glusterfs_aio_wrapper *wrap)
  * threads once the async IO submitted is complete. To notify
  * Samba of the completion we use a pipe based queue.
  */
+#ifdef HAVE_GFAPI_VER_7_6
+static void aio_glusterfs_done(glfs_fd_t *fd, ssize_t ret,
+			       struct glfs_stat *prestat,
+			       struct glfs_stat *poststat,
+			       void *data)
+#else
 static void aio_glusterfs_done(glfs_fd_t *fd, ssize_t ret, void *data)
+#endif
 {
 	struct glusterfs_aio_state *state = NULL;
 	int sts = 0;
@@ -954,7 +965,11 @@ static ssize_t vfs_gluster_pwrite(struct vfs_handle_struct *handle,
 		return -1;
 	}
 
+#ifdef HAVE_GFAPI_VER_7_6
+	return glfs_pwrite(glfd, data, n, offset, 0, NULL, NULL);
+#else
 	return glfs_pwrite(glfd, data, n, offset, 0);
+#endif
 }
 
 static off_t vfs_gluster_lseek(struct vfs_handle_struct *handle,
@@ -1239,7 +1254,11 @@ static int vfs_gluster_ftruncate(struct vfs_handle_struct *handle,
 		return -1;
 	}
 
+#ifdef HAVE_GFAPI_VER_7_6
+	return glfs_ftruncate(glfd, offset, NULL, NULL);
+#else
 	return glfs_ftruncate(glfd, offset);
+#endif
 }
 
 static int vfs_gluster_fallocate(struct vfs_handle_struct *handle,
diff --git a/source3/wscript b/source3/wscript
index 8086359f706..0cd7f40317a 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1570,6 +1570,9 @@ main() {
         conf.CHECK_CFG(package='glusterfs-api', args='"glusterfs-api >= 6" --cflags --libs',
                        msg='Checking for glusterfs-api >= 6',
                        uselib_store="GFAPI_VER_6")
+        conf.CHECK_CFG(package='glusterfs-api', args='"glusterfs-api >= 7.6" --cflags --libs',
+                       msg='Checking for glusterfs-api >= 7.6',
+                       uselib_store="GFAPI_VER_7_6")
     else:
         conf.SET_TARGET_TYPE('gfapi', 'EMPTY')
         conf.undefine('HAVE_GLUSTERFS')


-- 
Samba Shared Repository



More information about the samba-cvs mailing list