diff options
Diffstat (limited to 'source4/librpc')
-rw-r--r-- | source4/librpc/config.m4 | 1 | ||||
-rw-r--r-- | source4/librpc/idl/browser.idl | 47 | ||||
-rw-r--r-- | source4/librpc/idl/dcom.idl | 443 | ||||
-rw-r--r-- | source4/librpc/idl/epmapper.idl | 30 | ||||
-rw-r--r-- | source4/librpc/idl/keysvc.idl | 2 | ||||
-rw-r--r-- | source4/librpc/idl/policyagent.idl | 11 | ||||
-rw-r--r-- | source4/librpc/idl/protected_storage.idl | 1 | ||||
-rw-r--r-- | source4/librpc/idl/svcctl.idl | 294 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc_util.c | 6 |
9 files changed, 795 insertions, 40 deletions
diff --git a/source4/librpc/config.m4 b/source4/librpc/config.m4 index ba46cac36c..2d0bad9cc4 100644 --- a/source4/librpc/config.m4 +++ b/source4/librpc/config.m4 @@ -13,6 +13,7 @@ SMB_SUBSYSTEM(LIBNDR_RAW,[], librpc/gen_ndr/ndr_lsads.o librpc/gen_ndr/ndr_dfs.o librpc/gen_ndr/ndr_drsuapi.o + librpc/gen_ndr/ndr_policyagent.o librpc/gen_ndr/ndr_samr.o librpc/gen_ndr/ndr_spoolss.o librpc/gen_ndr/ndr_wkssvc.o diff --git a/source4/librpc/idl/browser.idl b/source4/librpc/idl/browser.idl index e1441c7857..4d48c9a935 100644 --- a/source4/librpc/idl/browser.idl +++ b/source4/librpc/idl/browser.idl @@ -6,5 +6,50 @@ interface browser { /******************/ /* Function 0x00 */ - NTSTATUS browser_Unknown0(); + NTSTATUS BrowserrServerEnum(); + + /******************/ + /* Function 0x01 */ + NTSTATUS BrowserrDebugCall(); + + /******************/ + /* Function 0x02 */ + NTSTATUS BrowserrQueryOtherDomains(); + + /******************/ + /* Function 0x03 */ + NTSTATUS BrowserrResetNetlogonState(); + + /******************/ + /* Function 0x04 */ + NTSTATUS BrowserrDebugTrace(); + + /******************/ + /* Function 0x05 */ + NTSTATUS BrowserrQueryStatistics(); + + /******************/ + /* Function 0x06 */ + NTSTATUS BrowserResetStatistics(); + + /******************/ + /* Function 0x07 */ + NTSTATUS NetrBrowserStatisticsClear(); + + /******************/ + /* Function 0x08 */ + NTSTATUS NetrBrowserStatisticsGet(); + + /******************/ + /* Function 0x09 */ + NTSTATUS BrowserrSetNetlogonState(); + + /******************/ + /* Function 0x10 */ + NTSTATUS BrowserrQueryEmulatedDomains(); + + /******************/ + /* Function 0x11 */ + NTSTATUS BrowserrServerEnumEx(); + } diff --git a/source4/librpc/idl/dcom.idl b/source4/librpc/idl/dcom.idl index fc432c6aa4..5e7c530023 100644 --- a/source4/librpc/idl/dcom.idl +++ b/source4/librpc/idl/dcom.idl @@ -1,35 +1,429 @@ -/* - this is just a placeholder until we start to support DCOM calls -*/ +#include "idl_types.h" + +#define HRESULT uint32 [ - uuid(99fcfec4-5260-101b-bbcb-00aa0021347a), - version(0.0) + uuid(99fcfe60-5260-101b-bbcb-00aa0021347a), + pointer_default(unique) ] -interface IOXIDResolver +interface ObjectRpcBaseTypes { + WERROR stub(); + + typedef [public] struct { + uint32 upper; + uint32 lower; + } hyper; + + ////////////////////////////////////////////////////////////// + // Identifier Definitions + //////////////////////////////////////////////////////////// + + // Machine Identifier +#define MID hyper + + + // Object Exporter Identifier +#define OXID hyper + + // Object Identifer +#define OID hyper + + // Ping Set Identifier +#define SETID hyper + + // Interface Pointer Identifier +#define IPID GUID + + // Causality Identifier +#define CID GUID + +#define CLSID GUID + +#define IID GUID + + ////////////////////////////////////////////////////////////////// + // ORPC Call Packet Format + ////////////////////////////////////////////////////////////////// + // COM_MINOR_VERSION = 1 (NT4.0, SP1, SP2, DCOM95). + // - Initial Release + // - Must be used when talking to downlevel machines, including + // on Remote Activation calls. + // COM_MINOR_VERSION = 2 (NT4.0 SP3 and beyond). + // - Added ResolveOxid2 to IObjectExporter to retrieve the + // COM version number of the server. Passed to the NDR engine + // to fix fatal endian-ness flaw in the way OLEAUTOMATION marshals + // BSTRS. Previous way used trailing padding, which is not NDR + // compatible. See Bug# 69189. + // COM_MINOR_VERSION = 3 (NT4.0 SP4 and DCOM95 builds 1018 and beyond) + // - OLEAUT32 added two new types to the SAFEARRAY, but SAFEARRAY + // previously included the "default" keyword, which prevented + // downlevel NDR engines from correctly handling any extensions. + // Machines with version >=5.3 don't use "default" and will + // gracefully handle future extensions to SAFEARRAY. + // old constants (for convenience) + const uint16 COM_MINOR_VERSION_1 = 1; + const uint16 COM_MINOR_VERSION_2 = 2; + // current version + const uint16 COM_MAJOR_VERSION = 5; + const uint16 COM_MINOR_VERSION = 3; + // Component Object Model version number + + typedef [public] struct + { + uint16 MajorVersion; // Major version number + uint16 MinorVersion; // Minor version number + } COMVERSION; + + + // enumeration of additional information present in the call packet. + // Should be an enum but DCE IDL does not support sparse enumerators. + const uint32 ORPCF_NULL = 0; // no additional info in packet + const uint32 ORPCF_LOCAL = 1; // call is local to this machine + const uint32 ORPCF_RESERVED1 = 2; // reserved for local use + const uint32 ORPCF_RESERVED2 = 4; // reserved for local use + const uint32 ORPCF_RESERVED3 = 8; // reserved for local use + const uint32 ORPCF_RESERVED4 = 16; // reserved for local use + // Extension to implicit parameters. + typedef [public] struct + { + GUID id; // Extension identifier. + uint32 size; // Extension size. + //FIXME[size_is((size+7)&~7)] uint8 data[]; // Extension data. + [size_is(size)] uint8 data[]; + } ORPC_EXTENT; + + + // Array of extensions. + typedef struct + { + uint32 size; // Num extents. + uint32 reserved; // Must be zero. + //FIXME[size_is((size+1)&~1,), unique] ORPC_EXTENT **extent; // extents + [size_is(size),unique] ORPC_EXTENT extent[]; + } ORPC_EXTENT_ARRAY; + + + // implicit 'this' pointer which is the first [in] parameter on + // every ORPC call. + typedef [public] struct + { + COMVERSION version; // COM version number + uint32 flags; // ORPCF flags for presence of other data + uint32 reserved1; // set to zero + CID cid; // causality id of caller + // Extensions. + [unique] ORPC_EXTENT_ARRAY *extensions; + } ORPCTHIS; + + + // implicit 'that' pointer which is the first [out] parameter on + // every ORPC call. + typedef [public] struct + { + uint32 flags; // ORPCF flags for presence of other data + // Extensions. + [unique] ORPC_EXTENT_ARRAY *extensions; + } ORPCTHAT; + + + ////////////////////////////////////////////////////////////////// + // + // Marshaled COM Interface Wire Format + // + ////////////////////////////////////////////////////////////////// + // DUALSTRINGARRAYS are the return type for arrays of network addresses, + // arrays of endpoints and arrays of both used in many ORPC interfaces + typedef struct + { + uint16 wTowerId; // Cannot be zero. + uint16 aNetworkAddr; // Zero terminated. + } STRINGBINDING; + + + const uint16 COM_C_AUTHZ_NONE = 0xffff; + typedef struct + { + uint16 wAuthnSvc; // Cannot be zero. + uint16 wAuthzSvc; // Must not be zero. + uint16 aPrincName; // Zero terminated. + } SECURITYBINDING; + + + typedef [public] struct + { + uint16 wNumEntries; // Number of entries in array. + uint16 wSecurityOffset; // Offset of security info. + // The array contains two parts, a set of STRINGBINDINGs + // and a set of SECURITYBINDINGs. Each set is terminated by an + // extra zero. The shortest array contains four zeros. + [size_is(wNumEntries)] uint16 aStringArray[]; + } DUALSTRINGARRAY; + + + // signature value for OBJREF (object reference, actually the + // marshaled form of a COM interface). + const uint32 OBJREF_SIGNATURE = 0x574f454d; // 'MEOW' + + // flag values for OBJREF + typedef enum { + OBJREF_STANDARD = 0x1, // standard marshaled objref + OBJREF_HANDLER = 0x2, // handler marshaled objref + OBJREF_CUSTOM = 0x4 // custom marshaled objref + } OBJREF_FLAGS; + + // Flag values for a STDOBJREF (standard part of an OBJREF). + // SORF_OXRES1 - SORF_OXRES8 are reserved for the object exporters + // use only, object importers must ignore them and must not enforce MBZ. + const uint32 SORF_OXRES1 = 0x1; // reserved for exporter + const uint32 SORF_OXRES2 = 0x20; // reserved for exporter + const uint32 SORF_OXRES3 = 0x40; // reserved for exporter + const uint32 SORF_OXRES4 = 0x80; // reserved for exporter + const uint32 SORF_OXRES5 = 0x100;// reserved for exporter + const uint32 SORF_OXRES6 = 0x200;// reserved for exporter + const uint32 SORF_OXRES7 = 0x400;// reserved for exporter + const uint32 SORF_OXRES8 = 0x800;// reserved for exporter + const uint32 SORF_NULL = 0x0; // convenient for initializing SORF + const uint32 SORF_NOPING = 0x1000;// Pinging is not required + // standard object reference + typedef struct + { + uint32 flags; // STDOBJREF flags (see above) + uint32 cPublicRefs; // count of references passed + OXID oxid; // oxid of server with this oid + OID oid; // oid of object with this ipid + IPID ipid; // ipid of Interface + } STDOBJREF; + + + typedef struct + { + STDOBJREF std; // standard objref + DUALSTRINGARRAY saResAddr; // resolver address + } u_standard; + + typedef struct + { + STDOBJREF std; // standard objref + CLSID clsid; // Clsid of handler code + DUALSTRINGARRAY saResAddr; // resolver address + } u_handler; + + typedef struct + { + CLSID clsid; // Clsid of unmarshaling code + uint32 cbExtension; // size of extension data + uint32 size; // size of data that follows + [size_is(size), ref] uint8 *pData; // extension + class specific data + } u_custom; + + + + typedef union + { + [case(OBJREF_STANDARD)] u_standard u_standard; + [case(OBJREF_HANDLER)] u_handler u_handler; + [case(OBJREF_CUSTOM)] u_custom u_custom; + } OBJREF_Types; + + // OBJREF is the format of a marshaled interface pointer. + typedef struct + { + uint32 flags; // OBJREF flags (see above) + GUID iid; // interface identifier + [switch_is(flags), switch_type(uint32)] OBJREF_Types u_objref; + } OBJREF; + // wire representation of a marshalled interface pointer + typedef [public] struct + { + uint32 ulCntData; // size of data + [size_is(ulCntData)] uint8 abData[]; // data (OBJREF) + } MInterfacePointer; - /*****************/ - /* Function 0x00 */ - WERROR ResolveOxid(); } +////////////////////////////////////////////////////////////////// + +// The remote version of Iunknown. This interface exists on every +// OXID (whether an OXID represents either a thread or a process is +// implementation specific). It is used by clients to query for new +// interfaces, get additional references (for marshaling), and release +// outstanding references. +// This interface is passed along during OXID resolution. +// +[ + uuid(00000131-0000-0000-C000-000000000046), + version(0.0) +] +interface IRemUnknown // : IUnknown +{ + typedef struct + { + HRESULT hResult; // result of call + STDOBJREF std; // data for returned interface + } + REMQIRESULT; + + HRESULT RemQueryInterface ( + [in] IPID *ripid, // interface to QI on + [in] uint32 cRefs, // count of AddRefs requested + [in] uint16 cIids, // count of IIDs that follow + [in, size_is(cIids)] + IID* iids // IIDs to QI for + /*FIXME: [out, size_is(,cIids)] + REMQIRESULT** ppQIResults // results returned*/ + ); + typedef struct + { + IPID ipid; // ipid to AddRef/Release + uint32 cPublicRefs; + uint32 cPrivateRefs; + } REMINTERFACEREF; + + HRESULT RemAddRef ( + [in] uint16 cInterfaceRefs, + [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[], + [out, size_is(cInterfaceRefs)] HRESULT* pResults + ); + HRESULT RemRelease ( + [in] uint16 cInterfaceRefs, + [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[] + ); +} +// Derived from IRemUnknown, this interface supports Remote Query interface +// for objects that supply additional data beyond the STDOBJREF in their +// marshaled interface packets. [ - uuid(4d9f4ab8-7d1c-11cf-861e-0020af6e7c57), - version(0.0) +uuid(00000143-0000-0000-C000-000000000046), +version(0.0) ] -interface IRemoteActivation + +interface IRemUnknown2 //: IRemUnknown { + HRESULT RemQueryInterface2 ( + [in] IPID *ripid, + [in] uint16 cIids, + [in, size_is(cIids)] IID *iids, + [out, size_is(cIids)] HRESULT *phr + //FIXME [out, size_is(cIids)] MInterfacePointer **ppMIF + ); - /*****************/ - /* Function 0x00 */ - NTSTATUS RemoteActivation(); } +[ uuid(99fcfec4-5260-101b-bbcb-00aa0021347a), + pointer_default(unique) +] +interface IOXIDResolver +{ + // Method to get the protocol sequences, string bindings + // and machine id for an object server given its OXID. + typedef [public] struct { + DUALSTRINGARRAY *ppdsaOxidBindings; + } ppdsaOxidBindingsArray; + + [idempotent] WERROR ResolveOxid ( + [in,ref] policy_handle *hRpc, + [in] OXID *pOxid, + [in] uint16 cRequestedProtseqs, + [in, size_is(cRequestedProtseqs)] uint16 arRequestedProtseqs[], + [out, ref] ppdsaOxidBindingsArray *ppdsaOxidBindings, + [out, ref] IPID *pipidRemUnknown, + [out, ref] uint32 *pAuthnHint + ); + + // Simple ping is used to ping a Set. Client machines use this + // to inform the object exporter that it is still using the + // members of the set. + // Returns S_TRUE if the SetId is known by the object exporter, + // S_FALSE if not. + [idempotent] WERROR SimplePing ( + [in] policy_handle hRpc, + [in] SETID *pSetId // Must not be zero + ); + + // Complex ping is used to create sets of OIDs to ping. The + // whole set can subsequently be pinged using SimplePing, + // thus reducing network traffic. + [idempotent] WERROR ComplexPing ( + [in] policy_handle hRpc, + [in, out] SETID *pSetId, // In of 0 on first call for new set. + [in] uint16 SequenceNum, + [in] uint16 cAddToSet, + [in] uint16 cDelFromSet, + // add these OIDs to the set + [in, unique, size_is(cAddToSet)] OID AddToSet[], + //remove these OIDs from the set + [in, unique, size_is(cDelFromSet)] OID DelFromSet[], + [out] uint16 *pPingBackoffFactor// 2^factor = multipler + ); + // In some cases the client maybe unsure that a particular + // binding will reach the server. (For example, when the oxid + // bindings have more then one TCP/IP binding) This call + // can be used to validate the binding + // from the client. + [idempotent] WERROR ServerAlive ( + [in] policy_handle hRpc + ); + // Method to get the protocol sequences, string bindings, + // RemoteUnknown IPID and COM version for an object server + // given its OXID. Supported by DCOM + // version 5.2 and above. + [idempotent] error_status_t ResolveOxid2 ( + [in] policy_handle hRpc, + [in] OXID *pOxid, + [in] uint16 cRequestedProtseqs, + [in, size_is(cRequestedProtseqs)] + uint16 arRequestedProtseqs[], + [out, ref] ppdsaOxidBindingsArray *ppdsaOxidBindings, + [out, ref] IPID *pipidRemUnknown, + [out, ref] uint32 *pAuthnHint, + [out, ref] COMVERSION *pComVersion + ); + +} [ +uuid(4d9f4ab8-7d1c-11cf-861e-0020af6e7c57), + version(0.0), + pointer_default(unique) +] +interface IRemoteActivation +{ + typedef [public] struct { + MInterfacePointer *ppInterfaceData; + } ppInterfaceDataArray; + + const uint32 MODE_GET_CLASS_OBJECT = 0xffffffff; + HRESULT RemoteActivation ( + [in] policy_handle hRpc, + [in] ORPCTHIS *ORPCthis, + [out] ORPCTHAT *ORPCthat, + [in] GUID *Clsid, + [in, unique] unistr *pwszObjectName, + [in, unique] MInterfacePointer *pObjectStorage, + [in] uint32 ClientImpLevel, + [in] uint32 Mode, + [in] uint32 Interfaces, + [in,unique,size_is(Interfaces)] IID *pIIDs, + [in] uint16 cRequestedProtseqs, + [in, size_is(cRequestedProtseqs)] + uint16 RequestedProtseqs[], + [out] OXID *pOxid, + [out] ppdsaOxidBindingsArray *ppdsaOxidBindings, + [out] IPID *pipidRemUnknown, + [out] uint32 *pAuthnHint, + [out] COMVERSION *pServerVersion, + [out] HRESULT *phr, + [out,size_is(Interfaces)] ppInterfaceDataArray *ppInterfaceData, + [out,size_is(Interfaces)] HRESULT *pResults + ); +} + + +/* The Win2k equivalent of IRemoteActivation */ +[ uuid(000001a0-0000-0000-c000-000000000046), version(0.0) ] @@ -40,4 +434,23 @@ interface ISystemActivator /* Function 0x00 */ NTSTATUS isa_Unknown0(); + /*****************/ + /* Function 0x01 */ + NTSTATUS isa_Unknown1(); + + /*****************/ + /* Function 0x02 */ + NTSTATUS isa_Unknown2(); + + /*****************/ + /* Function 0x03 */ + NTSTATUS isa_Unknown3(); + + + // Binding strings and the OBJREF_SIGNATURE in this call + /*****************/ + /* Function 0x04 */ + NTSTATUS isa_Unknown4(); + + } diff --git a/source4/librpc/idl/epmapper.idl b/source4/librpc/idl/epmapper.idl index 5db65cd7cf..fb6fa4ae7f 100644 --- a/source4/librpc/idl/epmapper.idl +++ b/source4/librpc/idl/epmapper.idl @@ -2,6 +2,10 @@ /* endpoint mapper interface + Related links: + http://www.opengroup.org/onlinepubs/9629399/apdxl.htm : Details on towers +http://www.opengroup.org/onlinepubs/9629399/chap6.htm#tagcjh_11_02_03_01: binding strings + */ [ @@ -36,14 +40,22 @@ interface epmapper } epm_prot_uuid; typedef enum { - EPM_PROTOCOL_TCP = 0x07, - EPM_PROTOCOL_IP = 0x09, - EPM_PROTOCOL_PIPE = 0x10, - EPM_PROTOCOL_NETBIOS = 0x11, - EPM_PROTOCOL_RPC_C = 0x0b, - EPM_PROTOCOL_UUID = 0x0d, - EPM_PROTOCOL_SMB = 0x0f, - EPM_PROTOCOL_HTTP = 0x1f + EPM_PROTOCOL_NCACN_DNET_NSP = 0x04, + EPM_PROTOCOL_NCACN_OSI_TP4 = 0x05, + EPM_PROTOCOL_NCACN_OSI_CLNS = 0x06, + EPM_PROTOCOL_NCACN_TCP = 0x07, + EPM_PROTOCOL_NCADG_UDP = 0x08, + EPM_PROTOCOL_NCACN_IP = 0x09, + EPM_PROTOCOL_NCADG_RPC = 0x0a, /* Connectionless RPC */ + EPM_PROTOCOL_NCACN_RPC_C = 0x0b, + EPM_PROTOCOL_NCACN_SPX = 0x0c, + EPM_PROTOCOL_UUID = 0x0d, + EPM_PROTOCOL_NCADG_IPX = 0x0e, + EPM_PROTOCOL_NCACN_SMB = 0x0f, + EPM_PROTOCOL_NCACN_PIPE = 0x10, + EPM_PROTOCOL_NCACN_NETBIOS = 0x11, + EPM_PROTOCOL_NCACN_NB_NB = 0x12, + EPM_PROTOCOL_NCACN_HTTP = 0x1f } epm_protocols; typedef [nodiscriminant] union { @@ -158,7 +170,7 @@ interface epmapper /**********************/ - /* Function 0x05 */ + /* Function 0x06 */ void epm_MgmtDelete( [in] uint32 object_speced, [in] GUID *object, diff --git a/source4/librpc/idl/keysvc.idl b/source4/librpc/idl/keysvc.idl index 396e0fedaf..fd96b65d2e 100644 --- a/source4/librpc/idl/keysvc.idl +++ b/source4/librpc/idl/keysvc.idl @@ -2,6 +2,8 @@ cryptographic key services interface */ + +/* Also seen as: 0d72a7d4-6148-11d1-b4aa-00c04fb66ea0 */ [ uuid(8d0ffe72-d252-11d0-bf8f-00c04fd9126b), version(1.0) diff --git a/source4/librpc/idl/policyagent.idl b/source4/librpc/idl/policyagent.idl new file mode 100644 index 0000000000..75765243af --- /dev/null +++ b/source4/librpc/idl/policyagent.idl @@ -0,0 +1,11 @@ + +/* IPSec policy agent (Win2k) */ +[ + uuid(d335b8f6-cb31-11d0-b0f9-006097ba4e54), + version(1.5) +] interface policyagent +{ + /*****************/ + /* Function 0x00 */ + WERROR policyagent_Dummy(); +} diff --git a/source4/librpc/idl/protected_storage.idl b/source4/librpc/idl/protected_storage.idl index aaf223bbb2..4391c89081 100644 --- a/source4/librpc/idl/protected_storage.idl +++ b/source4/librpc/idl/protected_storage.idl @@ -2,6 +2,7 @@ /* protected_storage interface definitions + Also seen with UUID: c9378ff1-16f7-11d0-a0b2-00aa0061426a ver 1.0 */ [ uuid(e3514235-4b06-11d1-ab04-00c04fc2dcd2), diff --git a/source4/librpc/idl/svcctl.idl b/source4/librpc/idl/svcctl.idl index 2048fea433..da910b772c 100644 --- a/source4/librpc/idl/svcctl.idl +++ b/source4/librpc/idl/svcctl.idl @@ -47,6 +47,28 @@ SERVICE_STATE_INACTIVE=0x02, SERVICE_STATE_ALL=0x03 } ServiceState; + + typedef enum { + SV_TYPE_WORKSTATION =0x00000001, + SV_TYPE_SERVER =0x00000002, + SV_TYPE_DOMAIN_CTRL =0x00000008, + SV_TYPE_DOMAIN_BAKCTRL =0x00000010, + SV_TYPE_TIME_SOURCE =0x00000020, + SV_TYPE_AFP =0x00000040, + SV_TYPE_DOMAIN_MEMBER =0x00000100, + SV_TYPE_PRINTQ_SERVER =0x00000200, + SV_TYPE_DIALIN_SERVER =0x00000400, + SV_TYPE_XENIX_SERVER =0x00000800, + SV_TYPE_SERVER_UNIX =0x00000800, + SV_TYPE_NT =0x00001000, + SV_TYPE_WFW =0x00002000, + SV_TYPE_POTENTIAL_BROWSER =0x00010000, + SV_TYPE_BACKUP_BROWSER =0x00020000, + SV_TYPE_MASTER_BROWSER =0x00040000, + SV_TYPE_DOMAIN_MASTER =0x00080000, + SV_TYPE_LOCAL_LIST_ONLY =0x40000000, + SV_TYPE_DOMAIN_ENUM =0x80000000 + } SERVICE_BITS; /*****************/ /* Function 0x00 */ @@ -57,11 +79,19 @@ /*****************/ /* Function 0x01 */ - WERROR svcctl_ControlService(); + typedef enum { + FIXME=1 + } SERVICE_CONTROL; + + WERROR svcctl_ControlService( + [in,ref] policy_handle *handle, + [in] uint32 control, + [out] SERVICE_STATUS status + ); /*****************/ /* Function 0x02 */ - WERROR svcctl_DeleteService(); + WERROR svcctl_DeleteService([in,ref] policy_handle *handle); /*****************/ /* Function 0x03 */ @@ -101,23 +131,54 @@ /*****************/ /* Function 0x0a */ - WERROR svcctl_SCSetServiceBits(); + WERROR svcctl_SCSetServiceBitsW( + [in,ref] policy_handle *handle, + [in] uint32 bits, + [in] boolean32 bitson, + [in] boolean32 immediate); /*****************/ /* Function 0x0b */ - WERROR svcctl_ChangeServiceConfig(); + WERROR svcctl_ChangeServiceConfigW([in,ref] policy_handle *handle, + [in] uint32 type, + [in] uint32 start, + [in] uint32 error, + [in] unistr *binary_path, + [in] unistr *load_order_group, + [out] uint32 tag_id, + [in] unistr *dependencies, + [in] unistr *service_start_name, + [in] unistr *password, + [in] unistr *display_name); /*****************/ /* Function 0x0c */ - WERROR svcctl_CreateService(); + WERROR svcctl_CreateServiceW([in,ref] policy_handle *handle, + [in] unistr *ServiceName, + [in] unistr *DisplayName, + [in] uint32 desired_access, + [in] uint32 type, + [in] uint32 start_type, + [in] uint32 error_control, + [in] unistr *binary_path, + [in] unistr *LoadOrderGroupKey, + [out] uint32 *TagId, + [in] unistr *dependencies, + [in] unistr *service_start_name, + [in] unistr *password); /*****************/ /* Function 0x0d */ - WERROR svcctl_EnumDependentServices(); + WERROR svcctl_EnumDependentServicesW([in,ref] policy_handle *service, + [in] uint32 state, + [out] ENUM_SERVICE_STATUS *status, + [in] uint32 buf_size, + [out] uint32 bytes_needed, + [out] uint32 services_returned); /*****************/ /* Function 0x0e */ - WERROR svcctl_EnumServicesStatus( + WERROR svcctl_EnumServicesStatusW( [in,ref] policy_handle *handle, [in] uint32 type, [in] uint32 state, @@ -129,7 +190,7 @@ ); /*****************/ /* Function 0x0f */ - WERROR svcctl_OpenSCManager( + WERROR svcctl_OpenSCManagerW( [in] unistr *MachineName, [in] unistr *DatabaseName, [in] uint32 access_mask, @@ -137,15 +198,21 @@ /*****************/ /* Function 0x10 */ - WERROR svcctl_OpenService(); + WERROR svcctl_OpenServiceW([in,ref] policy_handle *scmanager_handle, + [in] unistr *ServiceName, + [in] uint32 access_mask); /*****************/ /* Function 0x11 */ - WERROR svcctl_QueryServiceConfig(); + WERROR svcctl_QueryServiceConfigW([in,ref] policy_handle *handle, + [out] uint8 query[buf_size], //QUERY_SERVICE_CONFIG + [in] uint32 buf_size, + [out] uint32 bytes_needed + ); /*****************/ /* Function 0x12 */ - WERROR svcctl_QueryServiceLockStatus( + WERROR svcctl_QueryServiceLockStatusW( [in,ref] policy_handle *handle, [in] uint32 buf_size, [out,ref] SERVICE_LOCK_STATUS *status, @@ -154,8 +221,211 @@ /*****************/ /* Function 0x13 */ - WERROR svcctl_StartService( + WERROR svcctl_StartServiceW( + [in,ref] policy_handle *handle, + [in] uint32 NumArgs, + [in,length_of(NumArgs)] unistr *Arguments); + + /*****************/ + /* Function 0x14 */ + WERROR svcctl_GetServiceDisplayNameW([in,ref] policy_handle *handle, + [in] unistr *service_name, + [out] unistr *display_name, + [in,out] uint32 *display_name_length); + /*****************/ + /* Function 0x15 */ + WERROR svcctl_GetServiceKeyNameW([in,ref] policy_handle *handle, + [in] unistr *service_name, + [out] unistr *key_name, + [in,out] uint32 *display_name_length); + /*****************/ + /* Function 0x16 */ + WERROR svcctl_SCSetServiceBitsA( + [in,ref] policy_handle *handle, + [in] uint32 bits, + [in] boolean32 bitson, + [in] boolean32 immediate); + + /*****************/ + /* Function 0x17 */ + WERROR svcctl_ChangeServiceConfigA([in,ref] policy_handle *handle, + [in] uint32 type, + [in] uint32 start, + [in] uint32 error, + [in] unistr *binary_path, + [in] unistr *load_order_group, + [out] uint32 tag_id, + [in] unistr *dependencies, + [in] unistr *service_start_name, + [in] unistr *password, + [in] unistr *display_name); + + /*****************/ + /* Function 0x18 */ + WERROR svcctl_CreateServiceA([in,ref] policy_handle *handle, + [in] unistr *ServiceName, + [in] unistr *DisplayName, + [in] uint32 desired_access, + [in] uint32 type, + [in] uint32 start_type, + [in] uint32 error_control, + [in] unistr *binary_path, + [in] unistr *LoadOrderGroupKey, + [out] uint32 *TagId, + [in] unistr *dependencies, + [in] unistr *service_start_name, + [in] unistr *password); + + /*****************/ + /* Function 0x19 */ + WERROR svcctl_EnumDependentServicesA([in,ref] policy_handle *service, + [in] uint32 state, + [out] ENUM_SERVICE_STATUS *status, + [in] uint32 buf_size, + [out] uint32 bytes_needed, + [out] uint32 services_returned); + + /*****************/ + /* Function 0x1a */ + WERROR svcctl_EnumServicesStatusA( + [in,ref] policy_handle *handle, + [in] uint32 type, + [in] uint32 state, + [in] uint32 buf_size, + [out,size_is(buf_size)] uint8 service[*], + [out] uint32 bytes_needed, + [out] uint32 services_returned, + [in,out] uint32 *resume_handle + ); + + /*****************/ + /* Function 0x1b */ + WERROR svcctl_OpenSCManagerA( + [in] unistr *MachineName, + [in] unistr *DatabaseName, + [in] uint32 access_mask, + [out,ref] policy_handle *handle); + + /*****************/ + /* Function 0x1c */ + WERROR svcctl_OpenServiceA([in,ref] policy_handle *scmanager_handle, + [in] unistr *ServiceName, + [in] uint32 access_mask); + + /*****************/ + /* Function 0x1d */ + WERROR svcctl_QueryServiceConfigA([in,ref] policy_handle *handle, + [out] uint8 query[buf_size], //QUERYU_SERVICE_CONFIG + [in] uint32 buf_size, + [out] uint32 bytes_needed + ); + + /*****************/ + /* Function 0x1e */ + WERROR svcctl_QueryServiceLockStatusA( + [in,ref] policy_handle *handle, + [in] uint32 buf_size, + [out,ref] SERVICE_LOCK_STATUS *status, + [out,ref] uint32 *required_buf_size + ); + + /*****************/ + /* Function 0x1f */ + WERROR svcctl_StartServiceA( [in,ref] policy_handle *handle, [in] uint32 NumArgs, [in,length_of(NumArgs)] unistr *Arguments); + + /*****************/ + /* Function 0x20 */ + WERROR svcctl_GetServiceDisplayNameA([in,ref] policy_handle *handle, + [in] unistr *service_name, + [out] unistr *display_name, + [in,out] uint32 *display_name_length); + /*****************/ + /* Function 0x21 */ + WERROR svcctl_GetServiceKeyNameA([in,ref] policy_handle *handle, + [in] unistr *service_name, + [out] unistr *key_name, + [in,out] uint32 *display_name_length); + + /*****************/ + /* Function 0x22 */ + WERROR svcctl_GetCurrentGroupeStateW(); + + /*****************/ + /* Function 0x23 */ + WERROR svcctl_EnumServiceGroupW(); + + /*****************/ + /* Function 0x24 */ + WERROR svcctl_ChangeServiceConfig2A([in,ref] policy_handle *handle, + [in] uint32 info_level, + [in] uint8 *info + ); + + /*****************/ + /* Function 0x25 */ + WERROR svcctl_ChangeServiceConfig2W([in,ref] policy_handle *handle, + [in] uint32 info_level, + [in] uint8 *info); + + /*****************/ + /* Function 0x26 */ + WERROR svcctl_QueryServiceConfig2A( + [in,ref] policy_handle *handle, + [in] uint32 info_level, + [out] uint8 buffer[buf_size], + [in] uint32 buf_size, + [out] uint32 bytes_needed); + + /*****************/ + /* Function 0x27 */ + WERROR svcctl_QueryServiceConfig2W( + [in,ref] policy_handle *handle, + [in] uint32 info_level, + [out] uint8 buffer[buf_size], + [in] uint32 buf_size, + [out] uint32 bytes_needed); + + /*****************/ + /* Function 0x28 */ + WERROR svcctl_QueryServiceStatusEx( + [in,ref] policy_handle *handle, + [in] uint32 info_level, + [out] uint8 buffer[buf_size], + [in] uint32 buf_size, + [out] uint32 bytes_needed); + + /*****************/ + /* Function 0x29 */ + WERROR EnumServicesStatusExA( + [in,ref] policy_handle *scmanager, + [in] uint32 info_level, + [in] uint32 type, + [in] uint32 state, + [out] uint8 services[buf_size], + [in] uint32 buf_size, + [out] uint32 bytes_needed, + [out] uint32 service_returned, + [in,out] uint32 *resume_handle, + [out] unistr *group_name); + + /*****************/ + /* Function 0x2a */ + WERROR EnumServicesStatusExW( + [in,ref] policy_handle *scmanager, + [in] uint32 info_level, + [in] uint32 type, + [in] uint32 state, + [out] uint8 services[buf_size], + [in] uint32 buf_size, + [out] uint32 bytes_needed, + [out] uint32 service_returned, + [in,out] uint32 *resume_handle, + [out] unistr *group_name); + + /*****************/ + /* Function 0x2b */ + WERROR svcctl_SCSendTSMessage(); } diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index 7f3d49061a..7068d7b0b5 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -105,17 +105,17 @@ NTSTATUS dcerpc_epm_map_tcp_port(const char *server, twr.towers.floors[1].rhs.rhs_data = data_blob_talloc_zero(p->mem_ctx, 2); /* on an RPC connection ... */ - twr.towers.floors[2].lhs.protocol = EPM_PROTOCOL_RPC_C; + twr.towers.floors[2].lhs.protocol = EPM_PROTOCOL_NCACN_RPC_C; twr.towers.floors[2].lhs.info.lhs_data = data_blob(NULL, 0); twr.towers.floors[2].rhs.rhs_data = data_blob_talloc_zero(p->mem_ctx, 2); /* on a TCP port ... */ - twr.towers.floors[3].lhs.protocol = EPM_PROTOCOL_TCP; + twr.towers.floors[3].lhs.protocol = EPM_PROTOCOL_NCACN_TCP; twr.towers.floors[3].lhs.info.lhs_data = data_blob(NULL, 0); twr.towers.floors[3].rhs.rhs_data = data_blob_talloc_zero(p->mem_ctx, 2); /* on an IP link ... */ - twr.towers.floors[4].lhs.protocol = EPM_PROTOCOL_IP; + twr.towers.floors[4].lhs.protocol = EPM_PROTOCOL_NCACN_IP; twr.towers.floors[4].lhs.info.lhs_data = data_blob(NULL, 0); twr.towers.floors[4].rhs.rhs_data = data_blob_talloc_zero(p->mem_ctx, 4); |