svn commit: samba r3999 - in branches/SAMBA_4_0/source: librpc/idl rpc_server/drsuapi

metze at samba.org metze at samba.org
Mon Nov 29 11:13:57 GMT 2004


Author: metze
Date: 2004-11-29 11:13:56 +0000 (Mon, 29 Nov 2004)
New Revision: 3999

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3999

Log:
- reply with the same DsBindInfo blob as w2k3 in the server function

- add idl for drsuapi_DsReplicaSync() not yet complete

- just return WERR_OK for the drsuapi_DsReplicaSync() server function

metze

Modified:
   branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl
   branches/SAMBA_4_0/source/rpc_server/drsuapi/dcesrv_drsuapi.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl	2004-11-29 11:08:15 UTC (rev 3998)
+++ branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl	2004-11-29 11:13:56 UTC (rev 3999)
@@ -20,6 +20,18 @@
 	/* this is a magic guid you need to pass to DsBind to make drsuapi_DsWriteAccountSpn() work */
 	const string DRSUAPI_DS_BIND_GUID = "e24d201a-4fd6-11d1-a3da-0000f875ae0d";
 
+	/* this are the bind info blobs returned (seemed to be const):
+		w2k3 	7ffbff1f81a6ff5d80139441a372e9b779d70268f801000000000000
+		w2k  	7ffb1f00cb7fb9102391c143bda81fc90e0ff452f4000000
+	*/
+	const uint8 DRSUAPI_DS_BIND_INFO_RESPONSE_W2K3[] = {	0x7f,0xfb,0xff,0x1f,0x81,0xa6,0xff,0x5d,
+							    	0x80,0x13,0x94,0x41,0xa3,0x72,0xe9,0xb7,
+								0x79,0xd7,0x02,0x68,0xf8,0x01,0x00,0x00,
+								0x00,0x00,0x00,0x00};
+	const uint8 DRSUAPI_DS_BIND_INFO_RESPONSE_W2K[] = {	0x7f,0xfb,0x1f,0x00,0xcb,0x7f,0xb9,0x10,
+								0x23,0x91,0xc1,0x43,0xbd,0xa8,0x1f,0xc9,
+								0x0e,0x0f,0xf4,0x52,0xf4,0x00,0x00,0x00};
+
 	WERROR drsuapi_DsBind(
 		[in]	    GUID *bind_guid,
 		[in,out]    drsuapi_DsBindInfo *bind_info,
@@ -33,9 +45,32 @@
 		);
 
 	/*****************/
-        /* Function 0x02 */
-	WERROR DRSUAPI_REPLICA_SYNC();
+	/* Function 0x02 */
+	typedef struct {
+		uint32 unknown1;
+		uint32 unknown2;
+		GUID guid1;
+		[size_is(28)] uint8 unknown3[28];
+		[flag(STR_LEN4|STR_CHARLEN)] string nc_dn;
+	} drsuapi_DsReplicaSyncRequest1Info;
 
+	typedef struct {
+		drsuapi_DsReplicaSyncRequest1Info *info;
+		GUID guid1;
+		asclstr string1;
+		uint32 unknown1;
+	} drsuapi_DsReplicaSyncRequest1;
+
+	typedef union {
+		[case(1)] drsuapi_DsReplicaSyncRequest1 req1;
+	} drsuapi_DsReplicaSyncRequest;
+
+	WERROR drsuapi_DsReplicaSync(
+		[in,ref] policy_handle *bind_handle,
+		[in] uint32 level,
+		[in,switch_is(level)] drsuapi_DsReplicaSyncRequest req
+		);
+
 	/*****************/
         /* Function 0x03 */
 	WERROR DRSUAPI_GET_NC_CHANGES();

Modified: branches/SAMBA_4_0/source/rpc_server/drsuapi/dcesrv_drsuapi.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/drsuapi/dcesrv_drsuapi.c	2004-11-29 11:08:15 UTC (rev 3998)
+++ branches/SAMBA_4_0/source/rpc_server/drsuapi/dcesrv_drsuapi.c	2004-11-29 11:13:56 UTC (rev 3999)
@@ -42,6 +42,8 @@
 {
 	struct drsuapi_bind_state *b_state;
 	struct dcesrv_handle *handle;
+	struct drsuapi_DsBindInfo *bind_info;
+	const uint8_t bind_info_data[] = DRSUAPI_DS_BIND_INFO_RESPONSE_W2K3;
 
 	r->out.bind_info = NULL;
 	ZERO_STRUCTP(r->out.bind_handle);
@@ -64,6 +66,14 @@
 	handle->data = b_state;
 	handle->destroy = drsuapi_handle_destroy;
 
+	bind_info = talloc_p(mem_ctx, struct drsuapi_DsBindInfo);
+	WERR_TALLOC_CHECK(bind_info);
+	
+	bind_info->length = sizeof(bind_info_data);
+	bind_info->data = talloc_memdup(mem_ctx, bind_info_data, sizeof(bind_info_data));
+	WERR_TALLOC_CHECK(bind_info->data);
+
+	r->out.bind_info = bind_info;
 	*r->out.bind_handle = handle->wire_handle;
 
 	return WERR_OK;
@@ -94,12 +104,15 @@
 
 
 /* 
-  DRSUAPI_REPLICA_SYNC 
+  drsuapi_DsReplicaSync 
 */
-static WERROR DRSUAPI_REPLICA_SYNC(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-		       struct DRSUAPI_REPLICA_SYNC *r)
+static WERROR drsuapi_DsReplicaSync(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+		       struct drsuapi_DsReplicaSync *r)
 {
-	DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
+	/* TODO: implment this call correct!
+	 *       for now we just say yes
+	 */
+	return WERR_OK;
 }
 
 



More information about the samba-cvs mailing list