From 2f39a9fe621a0c80688fe06712bd5b0495ca7e65 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 23 Nov 2004 08:57:42 +0000 Subject: r3920: - it seem that we need to send a magic bind_guid in DsBind() to make DsWriteAccountSpn() work - add idl and torture test for DsWriteAccountSpn() metze (This used to be commit 625826ad9050c68407ae5e8abfee13699986303c) --- source4/librpc/idl/drsuapi.idl | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/drsuapi.idl b/source4/librpc/idl/drsuapi.idl index 17e84fffab..481c1a1de1 100644 --- a/source4/librpc/idl/drsuapi.idl +++ b/source4/librpc/idl/drsuapi.idl @@ -17,8 +17,11 @@ interface drsuapi [size_is(length)] uint8 data[]; } drsuapi_DsBindInfo; + /* 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"; + WERROR drsuapi_DsBind( - [in] GUID *server_guid, + [in] GUID *bind_guid, [in,out] drsuapi_DsBindInfo *bind_info, [out,ref] policy_handle *bind_handle ); @@ -145,8 +148,39 @@ interface drsuapi ); /*****************/ - /* Function 0x0d */ - WERROR DRSUAPI_WRITE_SPN(); + /* Function 0x0d */ + typedef enum { + DRSUAPI_DS_SPN_OPERATION_ADD = 0, + DRSUAPI_DS_SPN_OPERATION_REPLACE= 1, + DRSUAPI_DS_SPN_OPERATION_DELETE = 2 + } drsuapi_DsSpnOperation; + + typedef struct { + int32 operation; + int32 unknown1; + unistr *object_dn; + [range(0,10000)] uint32 count; + [size_is(count)] drsuapi_DsNameString *spn_names; + } drsuapi_DsWriteAccountSpnRequest1; + + typedef union { + [case(1)] drsuapi_DsWriteAccountSpnRequest1 req1; + } drsuapi_DsWriteAccountSpnRequest; + + typedef struct { + WERROR status; + } drsuapi_DsWriteAccountSpnResult1; + + typedef union { + [case(1)] drsuapi_DsWriteAccountSpnResult1 res1; + } drsuapi_DsWriteAccountSpnResult; + + WERROR drsuapi_DsWriteAccountSpn( + [in,ref] policy_handle *bind_handle, + [in, out] uint32 level, + [in,switch_is(level)] drsuapi_DsWriteAccountSpnRequest req, + [out,switch_is(level)] drsuapi_DsWriteAccountSpnResult res + ); /*****************/ /* Function 0x0e */ -- cgit