[SCM] Samba Shared Repository - branch master updated

Andrew Tridgell tridge at samba.org
Tue Feb 16 04:43:59 MST 2010


The branch, master has been updated
       via  eda16f2... s4-kcc: remove a qsort() that snuck into the new topology code
       via  e3a272c... s4-rpc: don't use auth padding in rpc bind requests as it breaks s3
      from  1e13d3f... s4-dcerpc: fixed auth padding to be relative to the stub, not packet

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


- Log -----------------------------------------------------------------
commit eda16f2410d7a6d79505b102aca8f111de4871d9
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Feb 16 22:41:45 2010 +1100

    s4-kcc: remove a qsort() that snuck into the new topology code

commit e3a272c3f23139e69c4e671e6b7b756d727c4e61
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Feb 16 22:18:16 2010 +1100

    s4-rpc: don't use auth padding in rpc bind requests as it breaks s3
    
    The s3 RPC server returns a bind_nak if it gets a rpc bind with auth
    padding. This change forces a padding length of zero to maximimise
    compatibility with s3 servers.
    
    I've left the padding code in as a #if 0 to make it easier for us to
    test/fix the s3 server code, which should be changed to correctly
    handle arbitrary auth padding in all rpc requests with auth trailers.

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

Summary of changes:
 source4/dsdb/kcc/kcc_topology.c  |    3 +--
 source4/librpc/rpc/dcerpc_util.c |    7 +++++++
 2 files changed, 8 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/kcc/kcc_topology.c b/source4/dsdb/kcc/kcc_topology.c
index 53de556..571bd84 100644
--- a/source4/dsdb/kcc/kcc_topology.c
+++ b/source4/dsdb/kcc/kcc_topology.c
@@ -146,8 +146,7 @@ static NTSTATUS kcctpl_create_graph(TALLOC_CTX *mem_ctx,
 						 guids->count);
 	NT_STATUS_HAVE_NO_MEMORY_AND_FREE(graph->vertices.data, graph);
 
-	qsort(guids->data, guids->count, sizeof(struct GUID),
-	      QSORT_CAST GUID_compare);
+	TYPESAFE_QSORT(guids->data, guids->count, GUID_compare);
 
 	for (i = 0; i < guids->count; i++) {
 		graph->vertices.data[i].id = guids->data[i];
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index f412361..aafa283 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -83,12 +83,19 @@ NTSTATUS ncacn_push_auth(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
 	}
 
 	if (auth_info) {
+#if 0
+		/* the s3 rpc server doesn't handle auth padding in
+		   bind requests. Use zero auth padding to keep us
+		   working with old servers */
 		uint32_t offset = ndr->offset;
 		ndr_err = ndr_push_align(ndr, 16);
 		if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 			return ndr_map_error2ntstatus(ndr_err);
 		}
 		auth_info->auth_pad_length = ndr->offset - offset;
+#else
+		auth_info->auth_pad_length = 0;
+#endif
 		ndr_err = ndr_push_dcerpc_auth(ndr, NDR_SCALARS|NDR_BUFFERS, auth_info);
 		if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 			return ndr_map_error2ntstatus(ndr_err);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list