diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-03-05 19:42:15 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-03-05 19:42:15 +0100 |
commit | 63036a6f3380652c0cb54627bdeabcd212fa2f8c (patch) | |
tree | 90194f23cb1e6ca483e7773233c326a9b705f85f /source3/librpc/idl | |
parent | d41d580c600e3228ff8fee5c16c47580f661a240 (diff) | |
parent | 932c287a406048759fa1ac4bf86e29d96991ded1 (diff) | |
download | samba-63036a6f3380652c0cb54627bdeabcd212fa2f8c.tar.gz samba-63036a6f3380652c0cb54627bdeabcd212fa2f8c.tar.bz2 samba-63036a6f3380652c0cb54627bdeabcd212fa2f8c.zip |
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit 3482cd9b0e81bbc801f1cec33fca82fc45a3ddef)
Diffstat (limited to 'source3/librpc/idl')
-rw-r--r-- | source3/librpc/idl/krb5pac.idl | 119 | ||||
-rw-r--r-- | source3/librpc/idl/libnet_join.idl | 10 | ||||
-rw-r--r-- | source3/librpc/idl/lsa.idl | 112 | ||||
-rw-r--r-- | source3/librpc/idl/netlogon.idl | 34 | ||||
-rw-r--r-- | source3/librpc/idl/ntsvcs.idl | 419 | ||||
-rw-r--r-- | source3/librpc/idl/samr.idl | 10 | ||||
-rw-r--r-- | source3/librpc/idl/spoolss.idl | 473 | ||||
-rw-r--r-- | source3/librpc/idl/srvsvc.idl | 6 | ||||
-rw-r--r-- | source3/librpc/idl/svcctl.idl | 9 | ||||
-rw-r--r-- | source3/librpc/idl/unixinfo.idl | 56 |
10 files changed, 903 insertions, 345 deletions
diff --git a/source3/librpc/idl/krb5pac.idl b/source3/librpc/idl/krb5pac.idl new file mode 100644 index 0000000000..11f08e11aa --- /dev/null +++ b/source3/librpc/idl/krb5pac.idl @@ -0,0 +1,119 @@ +/* + krb5 PAC +*/ + +#include "idl_types.h" + +import "security.idl", "netlogon.idl", "samr.idl"; + +[ + uuid("12345778-1234-abcd-0000-00000000"), + version(0.0), + pointer_default(unique), + helpstring("Active Directory KRB5 PAC") +] +interface krb5pac +{ + typedef struct { + NTTIME logon_time; + [value(2*strlen_m(account_name))] uint16 size; + [charset(UTF16)] uint8 account_name[size]; + } PAC_LOGON_NAME; + + typedef [public,flag(NDR_PAHEX)] struct { + uint32 type; + [flag(NDR_REMAINING)] DATA_BLOB signature; + } PAC_SIGNATURE_DATA; + + typedef [gensize] struct { + netr_SamInfo3 info3; + dom_sid2 *res_group_dom_sid; + samr_RidWithAttributeArray res_groups; + } PAC_LOGON_INFO; + + typedef struct { + [value(2*strlen_m(upn_name))] uint16 upn_size; + uint16 unknown1; /* 0x10 */ + [value(2*strlen_m(domain_name))] uint16 domain_size; + uint16 unknown2; /* 0x50 */ + uint16 unknown3; /* 0x01 */ + uint16 unknown4; + uint32 unknown5; + [charset(UTF16)] uint8 upn_name[upn_size+2]; + [charset(UTF16)] uint8 domain_name[domain_size+2]; + uint32 unknown6; + } PAC_UNKNOWN_12; + + typedef [public] struct { + [value(0x00081001)] uint32 unknown1; + [value(0xCCCCCCCC)] uint32 unknown2; + [value(NDR_ROUND(ndr_size_PAC_LOGON_INFO(info, ndr->flags)+4,8))] uint32 _ndr_size; + [value(0x00000000)] uint32 unknown3; + PAC_LOGON_INFO *info; + } PAC_LOGON_INFO_CTR; + + typedef [public,v1_enum] enum { + PAC_TYPE_LOGON_INFO = 1, + PAC_TYPE_SRV_CHECKSUM = 6, + PAC_TYPE_KDC_CHECKSUM = 7, + PAC_TYPE_LOGON_NAME = 10, + PAC_TYPE_CONSTRAINED_DELEGATION = 11, + PAC_TYPE_UNKNOWN_12 = 12 + } PAC_TYPE; + + typedef [public,nodiscriminant,gensize] union { + [case(PAC_TYPE_LOGON_INFO)] PAC_LOGON_INFO_CTR logon_info; + [case(PAC_TYPE_SRV_CHECKSUM)] PAC_SIGNATURE_DATA srv_cksum; + [case(PAC_TYPE_KDC_CHECKSUM)] PAC_SIGNATURE_DATA kdc_cksum; + [case(PAC_TYPE_LOGON_NAME)] PAC_LOGON_NAME logon_name; + [case(PAC_TYPE_UNKNOWN_12)] PAC_UNKNOWN_12 unknown; + } PAC_INFO; + + typedef [public,nopush,nopull,noprint] struct { + PAC_TYPE type; + [value(_ndr_size_PAC_INFO(info, type, 0))] uint32 _ndr_size; + [relative,switch_is(type),subcontext(0),subcontext_size(_subcontext_size_PAC_INFO(r, ndr->flags)),flag(NDR_ALIGN8)] PAC_INFO *info; + [value(0)] uint32 _pad; /* Top half of a 64 bit pointer? */ + } PAC_BUFFER; + + typedef [public] struct { + uint32 num_buffers; + uint32 version; + PAC_BUFFER buffers[num_buffers]; + } PAC_DATA; + + typedef struct { + [flag(NDR_REMAINING)] DATA_BLOB remaining; + } DATA_BLOB_REM; + + typedef [public] struct { + PAC_TYPE type; + uint32 ndr_size; + [relative,subcontext(0),subcontext_size(NDR_ROUND(ndr_size,8)),flag(NDR_ALIGN8)] DATA_BLOB_REM *info; + [value(0)] uint32 _pad; /* Top half of a 64 bit pointer? */ + } PAC_BUFFER_RAW; + + typedef [public] struct { + uint32 num_buffers; + uint32 version; + PAC_BUFFER_RAW buffers[num_buffers]; + } PAC_DATA_RAW; + + void decode_pac( + [in] PAC_DATA pac + ); + + void decode_pac_raw( + [in] PAC_DATA_RAW pac + ); + + void decode_login_info( + [in] PAC_LOGON_INFO logon_info + ); + + /* used for samba3 netsamlogon cache */ + typedef [public] struct { + time_t timestamp; + netr_SamInfo3 info3; + } netsamlogoncache_entry; +} diff --git a/source3/librpc/idl/libnet_join.idl b/source3/librpc/idl/libnet_join.idl index 2741b7bd7b..3975d83a80 100644 --- a/source3/librpc/idl/libnet_join.idl +++ b/source3/librpc/idl/libnet_join.idl @@ -12,8 +12,9 @@ import "wkssvc.idl", "security.idl"; interface libnetjoin { typedef bitmap wkssvc_joinflags wkssvc_joinflags; + typedef enum netr_SchannelType netr_SchannelType; - [nopush,nopull] WERROR libnet_JoinCtx( + [nopush,nopull,noopnum] WERROR libnet_JoinCtx( [in] string dc_name, [in] string machine_name, [in,ref] string *domain_name, @@ -29,6 +30,7 @@ interface libnetjoin [in] boolean8 modify_config, [in] ads_struct *ads, [in] boolean8 debug, + [in] netr_SchannelType secure_channel_type, [out] string account_name, [out] string netbios_domain_name, [out] string dns_domain_name, @@ -39,7 +41,7 @@ interface libnetjoin [out] boolean8 domain_is_ad ); - [nopush,nopull] WERROR libnet_UnjoinCtx( + [nopush,nopull,noopnum] WERROR libnet_UnjoinCtx( [in] string dc_name, [in] string machine_name, [in] string domain_name, @@ -55,6 +57,8 @@ interface libnetjoin [out] string netbios_domain_name, [out] string dns_domain_name, [out] boolean8 modified_config, - [out] string error_string + [out] string error_string, + [out] boolean8 disabled_machine_account, + [out] boolean8 deleted_machine_account ); } diff --git a/source3/librpc/idl/lsa.idl b/source3/librpc/idl/lsa.idl index 305bab3d03..ee8a2fe6b2 100644 --- a/source3/librpc/idl/lsa.idl +++ b/source3/librpc/idl/lsa.idl @@ -23,7 +23,7 @@ import "security.idl"; typedef [public] struct { [value(2*strlen_m(string))] uint16 length; - [value(2*(strlen_m(string)+1))] uint16 size; + [value(2*strlen_m_term(string))] uint16 size; [charset(UTF16),size_is(size/2),length_is(length/2)] uint16 *string; } lsa_StringLarge; @@ -35,9 +35,15 @@ import "security.idl"; typedef [public] struct { [value(strlen_m(string))] uint16 length; [value(strlen_m(string))] uint16 size; - ascstr_noterm *string; + [charset(DOS),size_is(size),length_is(length)] uint8 *string; } lsa_AsciiString; + typedef [public] struct { + [value(strlen_m(string))] uint16 length; + [value(strlen_m_term(string))] uint16 size; + [charset(DOS),size_is(size),length_is(length)] uint8 *string; + } lsa_AsciiStringLarge; + /******************/ /* Function: 0x00 */ NTSTATUS lsa_Close ( @@ -117,12 +123,27 @@ import "security.idl"; lsa_QosInfo *sec_qos; } lsa_ObjectAttribute; + typedef [public,bitmap32bit] bitmap { + LSA_POLICY_VIEW_LOCAL_INFORMATION = 0x00000001, + LSA_POLICY_VIEW_AUDIT_INFORMATION = 0x00000002, + LSA_POLICY_GET_PRIVATE_INFORMATION = 0x00000004, + LSA_POLICY_TRUST_ADMIN = 0x00000008, + LSA_POLICY_CREATE_ACCOUNT = 0x00000010, + LSA_POLICY_CREATE_SECRET = 0x00000020, + LSA_POLICY_CREATE_PRIVILEGE = 0x00000040, + LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS = 0x00000080, + LSA_POLICY_SET_AUDIT_REQUIREMENTS = 0x00000100, + LSA_POLICY_AUDIT_LOG_ADMIN = 0x00000200, + LSA_POLICY_SERVER_ADMIN = 0x00000400, + LSA_POLICY_LOOKUP_NAMES = 0x00000800 + } lsa_PolicyAccessMask; + /* notice the screwup with the system_name - thats why MS created OpenPolicy2 */ [public] NTSTATUS lsa_OpenPolicy ( [in,unique] uint16 *system_name, [in] lsa_ObjectAttribute *attr, - [in] uint32 access_mask, + [in] lsa_PolicyAccessMask access_mask, [out] policy_handle *handle ); @@ -297,9 +318,9 @@ import "security.idl"; [public] NTSTATUS lsa_EnumAccounts ( [in] policy_handle *handle, - [in,out] uint32 *resume_handle, - [in,range(0,8192)] uint32 num_entries, - [out] lsa_SidArray *sids + [in,out,ref] uint32 *resume_handle, + [out,ref] lsa_SidArray *sids, + [in,range(0,8192)] uint32 num_entries ); @@ -360,6 +381,8 @@ import "security.idl"; } lsa_TransSidArray; const int LSA_REF_DOMAIN_LIST_MULTIPLIER = 32; + const int MAX_REF_DOMAINS = LSA_REF_DOMAIN_LIST_MULTIPLIER; + typedef struct { [range(0,1000)] uint32 count; [size_is(count)] lsa_DomainInfo *domains; @@ -387,10 +410,10 @@ import "security.idl"; [in] policy_handle *handle, [in,range(0,1000)] uint32 num_names, [in,size_is(num_names)] lsa_String names[], - [out,unique] lsa_RefDomainList *domains, - [in,out] lsa_TransSidArray *sids, + [out,ref] lsa_RefDomainList **domains, + [in,out,ref] lsa_TransSidArray *sids, [in] lsa_LookupNamesLevel level, - [in,out] uint32 *count + [in,out,ref] uint32 *count ); @@ -408,13 +431,16 @@ import "security.idl"; [size_is(count)] lsa_TranslatedName *names; } lsa_TransNameArray; + /* This number is based on Win2k and later maximum response allowed */ + const int MAX_LOOKUP_SIDS = 0x5000; /* 20480 */ + [public] NTSTATUS lsa_LookupSids ( [in] policy_handle *handle, - [in] lsa_SidArray *sids, - [out,unique] lsa_RefDomainList *domains, - [in,out] lsa_TransNameArray *names, + [in,ref] lsa_SidArray *sids, + [out,ref] lsa_RefDomainList **domains, + [in,out,ref] lsa_TransNameArray *names, [in] uint16 level, - [in,out] uint32 *count + [in,out,ref] uint32 *count ); @@ -453,7 +479,7 @@ import "security.idl"; NTSTATUS lsa_EnumPrivsAccount ( [in] policy_handle *handle, - [out,unique] lsa_PrivilegeSet *privs + [out,ref] lsa_PrivilegeSet **privs ); @@ -461,7 +487,7 @@ import "security.idl"; /* Function: 0x13 */ NTSTATUS lsa_AddPrivilegesToAccount( [in] policy_handle *handle, - [in] lsa_PrivilegeSet *privs + [in,ref] lsa_PrivilegeSet *privs ); @@ -637,8 +663,8 @@ import "security.idl"; /* Function: 0x1f */ NTSTATUS lsa_LookupPrivValue( [in] policy_handle *handle, - [in] lsa_String *name, - [out] lsa_LUID *luid + [in,ref] lsa_String *name, + [out,ref] lsa_LUID *luid ); @@ -682,14 +708,14 @@ import "security.idl"; } lsa_RightAttribute; typedef struct { - uint32 count; + [range(0,256)] uint32 count; [size_is(count)] lsa_StringLarge *names; } lsa_RightSet; NTSTATUS lsa_EnumAccountRights ( [in] policy_handle *handle, - [in] dom_sid2 *sid, - [out] lsa_RightSet *rights + [in,ref] dom_sid2 *sid, + [out,ref] lsa_RightSet *rights ); @@ -697,17 +723,17 @@ import "security.idl"; /* Function: 0x25 */ NTSTATUS lsa_AddAccountRights ( [in] policy_handle *handle, - [in] dom_sid2 *sid, - [in] lsa_RightSet *rights + [in,ref] dom_sid2 *sid, + [in,ref] lsa_RightSet *rights ); /**********************/ /* Function: 0x26 */ NTSTATUS lsa_RemoveAccountRights ( [in] policy_handle *handle, - [in] dom_sid2 *sid, - [in] uint32 unknown, - [in] lsa_RightSet *rights + [in,ref] dom_sid2 *sid, + [in] uint8 remove_all, + [in,ref] lsa_RightSet *rights ); /* Function: 0x27 */ @@ -737,7 +763,7 @@ import "security.idl"; [public] NTSTATUS lsa_OpenPolicy2 ( [in,unique] [string,charset(UTF16)] uint16 *system_name, [in] lsa_ObjectAttribute *attr, - [in] uint32 access_mask, + [in] lsa_PolicyAccessMask access_mask, [out] policy_handle *handle ); @@ -879,11 +905,11 @@ import "security.idl"; [public] NTSTATUS lsa_LookupSids2( [in] policy_handle *handle, - [in] lsa_SidArray *sids, - [out,unique] lsa_RefDomainList *domains, - [in,out] lsa_TransNameArray2 *names, + [in,ref] lsa_SidArray *sids, + [out,ref] lsa_RefDomainList **domains, + [in,out,ref] lsa_TransNameArray2 *names, [in] uint16 level, - [in,out] uint32 *count, + [in,out,ref] uint32 *count, [in] uint32 unknown1, [in] uint32 unknown2 ); @@ -907,10 +933,10 @@ import "security.idl"; [in] policy_handle *handle, [in,range(0,1000)] uint32 num_names, [in,size_is(num_names)] lsa_String names[], - [out,unique] lsa_RefDomainList *domains, - [in,out] lsa_TransSidArray2 *sids, + [out,ref] lsa_RefDomainList **domains, + [in,out,ref] lsa_TransSidArray2 *sids, [in] lsa_LookupNamesLevel level, - [in,out] uint32 *count, + [in,out,ref] uint32 *count, [in] uint32 unknown1, [in] uint32 unknown2 ); @@ -960,10 +986,10 @@ import "security.idl"; [in] policy_handle *handle, [in,range(0,1000)] uint32 num_names, [in,size_is(num_names)] lsa_String names[], - [out,unique] lsa_RefDomainList *domains, - [in,out] lsa_TransSidArray3 *sids, + [out,ref] lsa_RefDomainList **domains, + [in,out,ref] lsa_TransSidArray3 *sids, [in] lsa_LookupNamesLevel level, - [in,out] uint32 *count, + [in,out,ref] uint32 *count, [in] uint32 unknown1, [in] uint32 unknown2 ); @@ -1035,11 +1061,11 @@ import "security.idl"; /* Function 0x4c */ [public] NTSTATUS lsa_LookupSids3( - [in] lsa_SidArray *sids, - [out,unique] lsa_RefDomainList *domains, - [in,out] lsa_TransNameArray2 *names, + [in,ref] lsa_SidArray *sids, + [out,ref] lsa_RefDomainList **domains, + [in,out,ref] lsa_TransNameArray2 *names, [in] uint16 level, - [in,out] uint32 *count, + [in,out,ref] uint32 *count, [in] uint32 unknown1, [in] uint32 unknown2 ); @@ -1048,10 +1074,10 @@ import "security.idl"; NTSTATUS lsa_LookupNames4( [in,range(0,1000)] uint32 num_names, [in,size_is(num_names)] lsa_String names[], - [out,unique] lsa_RefDomainList *domains, - [in,out] lsa_TransSidArray3 *sids, + [out,ref] lsa_RefDomainList **domains, + [in,out,ref] lsa_TransSidArray3 *sids, [in] lsa_LookupNamesLevel level, - [in,out] uint32 *count, + [in,out,ref] uint32 *count, [in] uint32 unknown1, [in] uint32 unknown2 ); diff --git a/source3/librpc/idl/netlogon.idl b/source3/librpc/idl/netlogon.idl index ae16884896..5979701703 100644 --- a/source3/librpc/idl/netlogon.idl +++ b/source3/librpc/idl/netlogon.idl @@ -245,7 +245,7 @@ interface netlogon [in,unique] netr_Authenticator *credential, [in,out,unique] netr_Authenticator *return_authenticator, [in] uint16 logon_level, - [in] [switch_is(logon_level)] netr_LogonLevel logon, + [in,ref] [switch_is(logon_level)] netr_LogonLevel *logon, [in] uint16 validation_level, [out,ref] [switch_is(validation_level)] netr_Validation *validation, [out,ref] uint8 *authoritative @@ -272,7 +272,8 @@ interface netlogon NTSTATUS netr_ServerReqChallenge( [in,unique,string,charset(UTF16)] uint16 *server_name, [in,string,charset(UTF16)] uint16 computer_name[], - [in,out,ref] netr_Credential *credentials + [in,ref] netr_Credential *credentials, + [out,ref] netr_Credential *return_credentials ); @@ -286,7 +287,8 @@ interface netlogon [in,string,charset(UTF16)] uint16 account_name[], [in] netr_SchannelType secure_channel_type, [in,string,charset(UTF16)] uint16 computer_name[], - [in,out,ref] netr_Credential *credentials + [in,ref] netr_Credential *credentials, + [out,ref] netr_Credential *return_credentials ); @@ -298,9 +300,9 @@ interface netlogon [in] [string,charset(UTF16)] uint16 account_name[], [in] netr_SchannelType secure_channel_type, [in] [string,charset(UTF16)] uint16 computer_name[], - [in] netr_Authenticator credential, - [in] samr_Password new_password, - [out,ref] netr_Authenticator *return_authenticator + [in,ref] netr_Authenticator *credential, + [out,ref] netr_Authenticator *return_authenticator, + [in,ref] samr_Password *new_password ); @@ -680,12 +682,12 @@ interface netlogon NTSTATUS netr_DatabaseDeltas( [in] [string,charset(UTF16)] uint16 logon_server[], [in] [string,charset(UTF16)] uint16 computername[], - [in] netr_Authenticator credential, + [in,ref] netr_Authenticator *credential, [in,out,ref] netr_Authenticator *return_authenticator, [in] netr_SamDatabaseID database_id, [in,out,ref] udlong *sequence_num, - [in] uint32 preferredmaximumlength, - [out,ref] netr_DELTA_ENUM_ARRAY *delta_enum_array + [out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array, + [in] uint32 preferredmaximumlength ); @@ -796,6 +798,7 @@ interface netlogon /* function_code values */ typedef [v1_enum] enum { + NETLOGON_CONTROL_SYNC = 2, NETLOGON_CONTROL_REDISCOVER = 5, NETLOGON_CONTROL_TC_QUERY = 6, NETLOGON_CONTROL_TRANSPORT_NOTIFY = 7, @@ -834,7 +837,7 @@ interface netlogon [in,unique] [string,charset(UTF16)] uint16 *logon_server, [in] uint32 function_code, [in] uint32 level, - [in][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION data, + [in,ref][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION *data, [out,ref][switch_is(level)] netr_CONTROL_QUERY_INFORMATION *query ); @@ -854,7 +857,8 @@ interface netlogon [in] [string,charset(UTF16)] uint16 account_name[], [in] netr_SchannelType secure_channel_type, [in] [string,charset(UTF16)] uint16 computer_name[], - [in,out,ref] netr_Credential *credentials, + [in,ref] netr_Credential *credentials, + [out,ref] netr_Credential *return_credentials, [in,out,ref] uint32 *negotiate_flags ); @@ -865,13 +869,13 @@ interface netlogon NTSTATUS netr_DatabaseSync2( [in] [string,charset(UTF16)] uint16 logon_server[], [in] [string,charset(UTF16)] uint16 computername[], - [in] netr_Authenticator credential, + [in] netr_Authenticator *credential, [in,out,ref] netr_Authenticator *return_authenticator, [in] netr_SamDatabaseID database_id, [in] uint16 restart_state, [in,out,ref] uint32 *sync_context, - [in] uint32 preferredmaximumlength, - [out,ref] netr_DELTA_ENUM_ARRAY *delta_enum_array + [out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array, + [in] uint32 preferredmaximumlength ); @@ -1253,7 +1257,7 @@ interface netlogon [in,unique] [string,charset(UTF16)] uint16 *server_name, [in,unique] [string,charset(UTF16)] uint16 *computer_name, [in] uint16 logon_level, - [in] [switch_is(logon_level)] netr_LogonLevel logon, + [in,ref] [switch_is(logon_level)] netr_LogonLevel *logon, [in] uint16 validation_level, [out,ref] [switch_is(validation_level)] netr_Validation *validation, [out,ref] uint8 *authoritative, diff --git a/source3/librpc/idl/ntsvcs.idl b/source3/librpc/idl/ntsvcs.idl index 05ba68e727..af0c7032da 100644 --- a/source3/librpc/idl/ntsvcs.idl +++ b/source3/librpc/idl/ntsvcs.idl @@ -9,69 +9,358 @@ ] interface ntsvcs { - void PNP_Disconnect(); - void PNP_Connect(); - void PNP_GetVersion(); - void PNP_GetGlobalState(); - void PNP_InitDetection(); - void PNP_ReportLogOn(); - void PNP_ValidateDeviceInstance(); - void PNP_GetRootDeviceInstance(); - void PNP_GetRelatedDeviceInstance(); - void PNP_EnumerateSubKeys(); - void PNP_GetDeviceList(); - void PNP_GetDeviceListSize(); - void PNP_GetDepth(); - void PNP_GetDeviceRegProp(); - void PNP_SetDeviceRegProp(); - void PNP_GetClassInstance(); - void PNP_CreateKey(); - void PNP_DeleteRegistryKey(); - void PNP_GetClassCount(); - void PNP_GetClassName(); - void PNP_DeleteClassKey(); - void PNP_GetInterfaceDeviceAlias(); - void PNP_GetInterfaceDeviceList(); - void PNP_GetInterfaceDeviceListSize(); - void PNP_RegisterDeviceClassAssociation(); - void PNP_UnregisterDeviceClassAssociation(); - void PNP_GetClassRegProp(); - void PNP_SetClassRegProp(); - void PNP_CreateDevInst(); - void PNP_DeviceInstanceAction(); - void PNP_GetDeviceStatus(); - void PNP_SetDeviceProblem(); - void PNP_DisableDevInst(); - void PNP_UninstallDevInst(); - void PNP_AddID(); - void PNP_RegisterDriver(); - void PNP_QueryRemove(); - void PNP_RequestDeviceEject(); - void PNP_IsDockStationPresent(); - void PNP_RequestEjectPC(); - void PNP_HwProfFlags(); - void PNP_GetHwProfInfo(); - void PNP_AddEmptyLogConf(); - void PNP_FreeLogConf(); - void PNP_GetFirstLogConf(); - void PNP_GetNextLogConf(); - void PNP_GetLogConfPriority(); - void PNP_AddResDes(); - void PNP_FreeResDes(); - void PNP_GetNextResDes(); - void PNP_GetResDesData(); - void PNP_GetResDesDataSize(); - void PNP_ModifyResDes(); - void PNP_DetectResourceLimit(); - void PNP_QueryResConfList(); - void PNP_SetHwProf(); - void PNP_QueryArbitratorFreeData(); - void PNP_QueryArbitratorFreeSize(); - void PNP_RunDetection(); - void PNP_RegisterNotification(); - void PNP_UnregisterNotification(); - void PNP_GetCustomDevProp(); - void PNP_GetVersionInternal(); - void PNP_GetBlockedDriverInfo(); - void PNP_GetServerSideDeviceInstallFlags(); + /******************/ + /* Function: 0x00 */ + + WERROR PNP_Disconnect(); + + /******************/ + /* Function: 0x01 */ + + WERROR PNP_Connect(); + + /******************/ + /* Function: 0x02 */ + + WERROR PNP_GetVersion( + [out,ref] uint16 *version + ); + + /******************/ + /* Function: 0x03 */ + + WERROR PNP_GetGlobalState(); + + /******************/ + /* Function: 0x04 */ + + WERROR PNP_InitDetection(); + + /******************/ + /* Function: 0x05 */ + + WERROR PNP_ReportLogOn(); + + /******************/ + /* Function: 0x06 */ + + WERROR PNP_ValidateDeviceInstance( + [in,ref] [string,charset(UTF16)] uint16 *devicepath, + [in] uint32 flags + ); + + /******************/ + /* Function: 0x07 */ + + WERROR PNP_GetRootDeviceInstance(); + + /******************/ + /* Function: 0x08 */ + + WERROR PNP_GetRelatedDeviceInstance(); + + /******************/ + /* Function: 0x09 */ + + WERROR PNP_EnumerateSubKeys(); + + /******************/ + /* Function: 0x0a */ + + WERROR PNP_GetDeviceList(); + + /******************/ + /* Function: 0x0b */ + + WERROR PNP_GetDeviceListSize( + [in,unique] [string,charset(UTF16)] uint16 *devicename, + [out,ref] uint32 *size, + [in] uint32 flags + ); + + /******************/ + /* Function: 0x0c */ + + WERROR PNP_GetDepth(); + + /******************/ + /* Function: 0x0d */ + + WERROR PNP_GetDeviceRegProp(); + + /******************/ + /* Function: 0x0e */ + + WERROR PNP_SetDeviceRegProp(); + + /******************/ + /* Function: 0x0f */ + + WERROR PNP_GetClassInstance(); + + /******************/ + /* Function: 0x10 */ + + WERROR PNP_CreateKey(); + + /******************/ + /* Function: 0x11 */ + + WERROR PNP_DeleteRegistryKey(); + + /******************/ + /* Function: 0x12 */ + + WERROR PNP_GetClassCount(); + + /******************/ + /* Function: 0x13 */ + + WERROR PNP_GetClassName(); + + /******************/ + /* Function: 0x14 */ + + WERROR PNP_DeleteClassKey(); + + /******************/ + /* Function: 0x15 */ + + WERROR PNP_GetInterfaceDeviceAlias(); + + /******************/ + /* Function: 0x16 */ + + WERROR PNP_GetInterfaceDeviceList(); + + /******************/ + /* Function: 0x17 */ + + WERROR PNP_GetInterfaceDeviceListSize(); + + /******************/ + /* Function: 0x18 */ + + WERROR PNP_RegisterDeviceClassAssociation(); + + /******************/ + /* Function: 0x19 */ + + WERROR PNP_UnregisterDeviceClassAssociation(); + + /******************/ + /* Function: 0x1a */ + + WERROR PNP_GetClassRegProp(); + + /******************/ + /* Function: 0x1b */ + + WERROR PNP_SetClassRegProp(); + + /******************/ + /* Function: 0x1c */ + + WERROR PNP_CreateDevInst(); + + /******************/ + /* Function: 0x1d */ + + WERROR PNP_DeviceInstanceAction(); + + /******************/ + /* Function: 0x1e */ + + WERROR PNP_GetDeviceStatus(); + + /******************/ + /* Function: 0x1f */ + + WERROR PNP_SetDeviceProblem(); + + /******************/ + /* Function: 0x20 */ + + WERROR PNP_DisableDevInst(); + + /******************/ + /* Function: 0x21 */ + + WERROR PNP_UninstallDevInst(); + + /******************/ + /* Function: 0x22 */ + + WERROR PNP_AddID(); + + /******************/ + /* Function: 0x23 */ + + WERROR PNP_RegisterDriver(); + + /******************/ + /* Function: 0x24 */ + + WERROR PNP_QueryRemove(); + + /******************/ + /* Function: 0x25 */ + + WERROR PNP_RequestDeviceEject(); + + /******************/ + /* Function: 0x26 */ + + WERROR PNP_IsDockStationPresent(); + + /******************/ + /* Function: 0x27 */ + + WERROR PNP_RequestEjectPC(); + + /******************/ + /* Function: 0x28 */ + + WERROR PNP_HwProfFlags( + [in] uint32 unknown1, + [in,ref] [string,charset(UTF16)] uint16 *devicepath, + [in] uint32 unknown2, + [in,out,ref] uint32 *unknown3, + [in,out,unique] uint16 *unknown4, + [in,unique] [string,charset(UTF16)] uint16 *unknown5, + [out,unique] [string,charset(UTF16)] uint16 **unknown5a, + [in] uint32 unknown6, + [in] uint32 unknown7 + ); + + /******************/ + /* Function: 0x29 */ + + typedef struct { + uint32 unknown1; + uint16 unknown2[160]; + uint32 unknown3; + } PNP_HwProfInfo; + + WERROR PNP_GetHwProfInfo( + [in] uint32 idx, + [in,out,ref] PNP_HwProfInfo *info, + [in] uint32 unknown1, + [in] uint32 unknown2 + ); + + /******************/ + /* Function: 0x2a */ + + WERROR PNP_AddEmptyLogConf(); + + /******************/ + /* Function: 0x2b */ + + WERROR PNP_FreeLogConf(); + + /******************/ + /* Function: 0x2c */ + + WERROR PNP_GetFirstLogConf(); + + /******************/ + /* Function: 0x2d */ + + WERROR PNP_GetNextLogConf(); + + /******************/ + /* Function: 0x2e */ + + WERROR PNP_GetLogConfPriority(); + + /******************/ + /* Function: 0x2f */ + + WERROR PNP_AddResDes(); + + /******************/ + /* Function: 0x30 */ + + WERROR PNP_FreeResDes(); + + /******************/ + /* Function: 0x31 */ + + WERROR PNP_GetNextResDes(); + + /******************/ + /* Function: 0x32 */ + + WERROR PNP_GetResDesData(); + + /******************/ + /* Function: 0x33 */ + + WERROR PNP_GetResDesDataSize(); + + /******************/ + /* Function: 0x34 */ + + WERROR PNP_ModifyResDes(); + + /******************/ + /* Function: 0x35 */ + + WERROR PNP_DetectResourceLimit(); + + /******************/ + /* Function: 0x36 */ + + WERROR PNP_QueryResConfList(); + + /******************/ + /* Function: 0x37 */ + + WERROR PNP_SetHwProf(); + + /******************/ + /* Function: 0x38 */ + + WERROR PNP_QueryArbitratorFreeData(); + + /******************/ + /* Function: 0x39 */ + + WERROR PNP_QueryArbitratorFreeSize(); + + /******************/ + /* Function: 0x3a */ + + WERROR PNP_RunDetection(); + + /******************/ + /* Function: 0x3b */ + + WERROR PNP_RegisterNotification(); + + /******************/ + /* Function: 0x3c */ + + WERROR PNP_UnregisterNotification(); + + /******************/ + /* Function: 0x3d */ + + WERROR PNP_GetCustomDevProp(); + + /******************/ + /* Function: 0x3e */ + + WERROR PNP_GetVersionInternal(); + + /******************/ + /* Function: 0x3f */ + + WERROR PNP_GetBlockedDriverInfo(); + + /******************/ + /* Function: 0x40 */ + + WERROR PNP_GetServerSideDeviceInstallFlags(); } diff --git a/source3/librpc/idl/samr.idl b/source3/librpc/idl/samr.idl index ebd1975458..c2449d3088 100644 --- a/source3/librpc/idl/samr.idl +++ b/source3/librpc/idl/samr.idl @@ -316,6 +316,10 @@ import "misc.idl", "lsa.idl", "security.idl"; /************************/ /* Function 0x0b */ + + const int MAX_SAM_ENTRIES_W2K = 0x400; /* 1024 */ + const int MAX_SAM_ENTRIES_W95 = 50; + NTSTATUS samr_EnumDomainGroups( [in] policy_handle *domain_handle, [in,out,ref] uint32 *resume_handle, @@ -779,6 +783,10 @@ import "misc.idl", "lsa.idl", "security.idl"; SAMR_FIELD_OWF_PWD = 0x20000000 } samr_FieldsPresent; + /* used for 'password_expired' in samr_UserInfo21 */ + const int PASS_MUST_CHANGE_AT_NEXT_LOGON = 0x01; + const int PASS_DONT_CHANGE_AT_NEXT_LOGON = 0x00; + typedef struct { NTTIME last_logon; NTTIME last_logoff; @@ -968,7 +976,7 @@ import "misc.idl", "lsa.idl", "security.idl"; typedef struct { uint32 idx; - lsa_AsciiString account_name; + lsa_AsciiStringLarge account_name; } samr_DispEntryAscii; typedef struct { diff --git a/source3/librpc/idl/spoolss.idl b/source3/librpc/idl/spoolss.idl index b64dfa481b..2144393ebd 100644 --- a/source3/librpc/idl/spoolss.idl +++ b/source3/librpc/idl/spoolss.idl @@ -3,16 +3,17 @@ /* spoolss interface definitions */ +import "security.idl", "winreg.idl"; [ uuid("12345678-1234-abcd-ef00-0123456789ab"), version(1.0), endpoint("ncacn_np:[\\pipe\\spoolss]"), pointer_default(unique), helpstring("Spooler SubSystem"), - depends(security), helper("librpc/ndr/ndr_spoolss_buf.h") ] interface spoolss { + typedef [v1_enum] enum winreg_Type winreg_Type; typedef struct { uint16 year; uint16 month; @@ -57,7 +58,7 @@ } spoolss_PrinterInfo0; typedef [public,gensize] struct { - string32 devicename; + [charset(UTF16)] uint16 devicename[32]; uint16 specversion; uint16 driverversion; uint16 size; @@ -76,7 +77,7 @@ uint16 yresolution; uint16 ttoption; uint16 collate; - string32 formname; + [charset(UTF16)] uint16 formname[32]; uint16 logpixels; uint32 bitsperpel; uint32 pelswidth; @@ -103,7 +104,6 @@ PRINTER_ENUM_REMOTE = 0x00000010, PRINTER_ENUM_SHARED = 0x00000020, PRINTER_ENUM_NETWORK = 0x00000040, - PRINTER_ENUM_UNKNOWN_8 = 0x00000008, PRINTER_ENUM_EXPAND = 0x00004000, PRINTER_ENUM_CONTAINER = 0x00008000, PRINTER_ENUM_ICON1 = 0x00010000, @@ -253,13 +253,13 @@ /* we are using this as internal parsing code */ [public,noopnum,noprint] WERROR _spoolss_EnumPrinters( [in] spoolss_EnumPrinterFlags flags, - [in] [string,charset(UTF16)] uint16 *server, + [in,unique] [string,charset(UTF16)] uint16 *server, [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, - [out] DATA_BLOB *info, - [out] uint32 *needed, - [out] uint32 *count + [out,unique] DATA_BLOB *info, + [out] uint32 needed, + [out] uint32 count ); [public,noopnum,noprint] void __spoolss_EnumPrinters( [in] uint32 level, @@ -268,16 +268,16 @@ ); [nopull,nopush] WERROR spoolss_EnumPrinters( [in] spoolss_EnumPrinterFlags flags, - [in] [string,charset(UTF16)] uint16 *server, + [in,unique] [string,charset(UTF16)] uint16 *server, [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, /* what we have here is a subcontext containing an array of no discriminant unions * and the array has no size in front */ - [out,switch_is(level),size_is(count)] spoolss_PrinterInfo *info, - [out] uint32 *needed, - [out] uint32 *count + [out,unique,switch_is(level),size_is(count)] spoolss_PrinterInfo *info, + [out] uint32 needed, + [out] uint32 count ); /******************/ @@ -287,9 +287,9 @@ [subcontext(4),subcontext_size(_ndr_size)] spoolss_DeviceMode *devmode; } spoolss_DevmodeContainer; - WERROR spoolss_OpenPrinter( - [in] [string,charset(UTF16)] uint16 *printername, - [in] [string,charset(UTF16)] uint16 *datatype, + [public] WERROR spoolss_OpenPrinter( + [in,unique] [string,charset(UTF16)] uint16 *printername, + [in,unique] [string,charset(UTF16)] uint16 *datatype, [in] spoolss_DevmodeContainer devmode_ctr, [in] uint32 access_mask, [out,ref] policy_handle *handle @@ -338,7 +338,7 @@ WERROR spoolss_SetJob( [in,ref] policy_handle *handle, [in] uint32 job_id, - [in] spoolss_JobInfoContainer *ctr, + [in,unique] spoolss_JobInfoContainer *ctr, [in] spoolss_JobControl command ); @@ -348,10 +348,10 @@ [in,ref] policy_handle *handle, [in] uint32 job_id, [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, - [out,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_JobInfo *info, - [out] uint32 *needed + [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_JobInfo *info, + [out] uint32 needed ); /******************/ @@ -361,11 +361,11 @@ [in] uint32 firstjob, [in] uint32 numjobs, [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, - [out] DATA_BLOB *info, - [out] uint32 *needed, - [out] uint32 *count + [out,unique] DATA_BLOB *info, + [out] uint32 needed, + [out] uint32 count ); [public,noopnum,noprint] void __spoolss_EnumJobs( [in] uint32 level, @@ -377,11 +377,11 @@ [in] uint32 firstjob, [in] uint32 numjobs, [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, - [out,switch_is(level),size_is(count)] spoolss_JobInfo *info, - [out] uint32 *needed, - [out] uint32 *count + [out,unique,switch_is(level),size_is(count)] spoolss_JobInfo *info, + [out] uint32 needed, + [out] uint32 count ); /******************/ @@ -431,13 +431,13 @@ /******************/ /* Function: 0x08 */ - WERROR spoolss_GetPrinter( + [public] WERROR spoolss_GetPrinter( [in,ref] policy_handle *handle, [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, - [out,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_PrinterInfo *info, - [out] uint32 *needed + [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_PrinterInfo *info, + [out] uint32 needed ); /******************/ @@ -537,14 +537,14 @@ /******************/ /* Function: 0x0a */ [public,noopnum,noprint] WERROR _spoolss_EnumPrinterDrivers( - [in] [string,charset(UTF16)] uint16 *server, - [in] [string,charset(UTF16)] uint16 *environment, + [in,unique] [string,charset(UTF16)] uint16 *server, + [in,unique] [string,charset(UTF16)] uint16 *environment, [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, - [out] DATA_BLOB *info, - [out] uint32 *needed, - [out] uint32 *count + [out,unique] DATA_BLOB *info, + [out] uint32 needed, + [out] uint32 count ); [public,noopnum,noprint] void __spoolss_EnumPrinterDrivers( [in] uint32 level, @@ -552,14 +552,14 @@ [out,switch_is(level)] spoolss_DriverInfo info[count] ); [nopull,nopush] WERROR spoolss_EnumPrinterDrivers( - [in] [string,charset(UTF16)] uint16 *server, - [in] [string,charset(UTF16)] uint16 *environment, + [in,unique] [string,charset(UTF16)] uint16 *server, + [in,unique] [string,charset(UTF16)] uint16 *environment, [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, - [out,switch_is(level),size_is(count)] spoolss_DriverInfo *info, - [out] uint32 *needed, - [out] uint32 *count + [out,unique,switch_is(level),size_is(count)] spoolss_DriverInfo *info, + [out] uint32 needed, + [out] uint32 count ); /******************/ @@ -581,21 +581,21 @@ [default] spoolss_DriverDirectoryInfo1 info1; } spoolss_DriverDirectoryInfo; - WERROR spoolss_GetPrinterDriverDirectory( - [in] [string,charset(UTF16)] uint16 *server, - [in] [string,charset(UTF16)] uint16 *environment, + [public] WERROR spoolss_GetPrinterDriverDirectory( + [in,unique] [string,charset(UTF16)] uint16 *server, + [in,unique] [string,charset(UTF16)] uint16 *environment, [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, - [out,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverDirectoryInfo *info, - [out] uint32 *needed + [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverDirectoryInfo *info, + [out] uint32 needed ); /******************/ /* Function: 0x0d */ WERROR spoolss_DeletePrinterDriver( [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 *server, + [in,unique] [string,charset(UTF16)] uint16 *server, [in] [string,charset(UTF16)] uint16 architecture[], [in] [string,charset(UTF16)] uint16 driver[] ); @@ -617,14 +617,14 @@ } spoolss_PrintProcessorInfo; [public,noopnum,noprint] WERROR _spoolss_EnumPrintProcessors( - [in] [string,charset(UTF16)] uint16 *servername, - [in] [string,charset(UTF16)] uint16 *environment, + [in,unique] [string,charset(UTF16)] uint16 *servername, + [in,unique] [string,charset(UTF16)] uint16 *environment, [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, - [out] DATA_BLOB *info, - [out] uint32 *needed, - [out] uint32 *count + [out,unique] DATA_BLOB *info, + [out] uint32 needed, + [out] uint32 count ); [public,noopnum,noprint] void __spoolss_EnumPrintProcessors( [in] uint32 level, @@ -632,14 +632,14 @@ [out,switch_is(level)] spoolss_PrintProcessorInfo info[count] ); [nopull,nopush] WERROR spoolss_EnumPrintProcessors( - [in] [string,charset(UTF16)] uint16 *servername, - [in] [string,charset(UTF16)] uint16 *environment, + [in,unique] [string,charset(UTF16)] uint16 *servername, + [in,unique] [string,charset(UTF16)] uint16 *environment, [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, - [out,switch_is(level),size_is(count)] spoolss_PrintProcessorInfo *info, - [out] uint32 *needed, - [out] uint32 *count + [out,unique,switch_is(level),size_is(count)] spoolss_PrintProcessorInfo *info, + [out] uint32 needed, + [out] uint32 count ); /******************/ @@ -666,7 +666,7 @@ [in,ref] policy_handle *handle, [in] uint32 level, [in,switch_is(level)] spoolss_DocumentInfo info, - [out] uint32 *job_id + [out] uint32 job_id ); /******************/ @@ -681,7 +681,7 @@ [in,ref] policy_handle *handle, [in] DATA_BLOB data, [in,value(r->in.data.length)] uint32 _data_size, - [out] uint32 *num_written + [out] uint32 num_written ); /******************/ @@ -701,8 +701,8 @@ WERROR spoolss_ReadPrinter( [in,ref] policy_handle *handle, [in] uint32 data_size, - [out] DATA_BLOB *data, - [out,value(r->out.data.length)] uint32 *_data_size + [out] DATA_BLOB data, + [out,value(r->out.data.length)] uint32 _data_size ); /******************/ @@ -766,21 +766,21 @@ [in,ref] policy_handle *handle, [in] [string,charset(UTF16)] uint16 value_name[], [in] uint32 offered, - [out] spoolss_PrinterDataType *type, - [out] DATA_BLOB *data, - [out] uint32 *needed + [out] spoolss_PrinterDataType type, + [out] DATA_BLOB data, + [out] uint32 needed ); [noopnum,noprint,public] void __spoolss_GetPrinterData( [in] spoolss_PrinterDataType type, - [out,switch_is(type)] spoolss_PrinterData *data + [out,switch_is(type)] spoolss_PrinterData data ); - [nopull,nopush] WERROR spoolss_GetPrinterData( + [nopull,nopush,public] WERROR spoolss_GetPrinterData( [in,ref] policy_handle *handle, [in] [string,charset(UTF16)] uint16 value_name[], [in] uint32 offered, - [out] spoolss_PrinterDataType *type, - [out,subcontext(4),subcontext_size(offered),switch_is(type)] spoolss_PrinterData *data, - [out] uint32 *needed + [out] spoolss_PrinterDataType type, + [out,subcontext(4),subcontext_size(offered),switch_is(type)] spoolss_PrinterData data, + [out] uint32 needed ); /******************/ @@ -790,11 +790,11 @@ [in] [string,charset(UTF16)] uint16 value_name[], [in] spoolss_PrinterDataType type, [in] DATA_BLOB data, - [in] uint32 *_offered + [in] uint32 _offered ); [noopnum,nopull,noprint,public] void __spoolss_SetPrinterData( [in] spoolss_PrinterDataType type, - [out,switch_is(type)] spoolss_PrinterData *data + [out,switch_is(type)] spoolss_PrinterData data ); [nopush] WERROR spoolss_SetPrinterData( [in,ref] policy_handle *handle, @@ -811,7 +811,7 @@ /******************/ /* Function: 0x1d */ - WERROR spoolss_ClosePrinter( + [public] WERROR spoolss_ClosePrinter( [in,out,ref] policy_handle *handle ); @@ -877,10 +877,10 @@ [in,ref] policy_handle *handle, [in] [string,charset(UTF16)] uint16 form_name[], [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, - [out,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_FormInfo *info, - [out] uint32 *needed + [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_FormInfo *info, + [out] uint32 needed ); /******************/ @@ -897,11 +897,11 @@ [public,noopnum,noprint] WERROR _spoolss_EnumForms( [in,ref] policy_handle *handle, [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, - [out] DATA_BLOB *info, - [out] uint32 *needed, - [out] uint32 *count + [out,unique] DATA_BLOB *info, + [out] uint32 needed, + [out] uint32 count ); [public,noopnum,noprint] void __spoolss_EnumForms( [in] uint32 level, @@ -911,11 +911,11 @@ [nopull,nopush] WERROR spoolss_EnumForms( [in,ref] policy_handle *handle, [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, - [out,switch_is(level),size_is(count)] spoolss_FormInfo *info, - [out] uint32 *needed, - [out] uint32 *count + [out,unique,switch_is(level),size_is(count)] spoolss_FormInfo *info, + [out] uint32 needed, + [out] uint32 count ); typedef struct { @@ -947,13 +947,13 @@ /******************/ /* Function: 0x23 */ [public,noopnum,noprint] WERROR _spoolss_EnumPorts( - [in] [string,charset(UTF16)] uint16 *servername, + [in,unique] [string,charset(UTF16)] uint16 *servername, [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, - [out] DATA_BLOB *info, - [out] uint32 *needed, - [out] uint32 *count + [out,unique] DATA_BLOB *info, + [out] uint32 needed, + [out] uint32 count ); [public,noopnum,noprint] void __spoolss_EnumPorts( [in] uint32 level, @@ -961,13 +961,13 @@ [out,switch_is(level)] spoolss_PortInfo info[count] ); [nopull,nopush] WERROR spoolss_EnumPorts( - [in] [string,charset(UTF16)] uint16 *servername, + [in,unique] [string,charset(UTF16)] uint16 *servername, [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, - [out,switch_is(level),size_is(count)] spoolss_PortInfo *info, - [out] uint32 *needed, - [out] uint32 *count + [out,unique,switch_is(level),size_is(count)] spoolss_PortInfo *info, + [out] uint32 needed, + [out] uint32 count ); /******************/ @@ -989,13 +989,13 @@ } spoolss_MonitorInfo; [public,noopnum,noprint] WERROR _spoolss_EnumMonitors( - [in] [string,charset(UTF16)] uint16 *servername, + [in,unique] [string,charset(UTF16)] uint16 *servername, [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, - [out] DATA_BLOB *info, - [out] uint32 *needed, - [out] uint32 *count + [out,unique] DATA_BLOB *info, + [out] uint32 needed, + [out] uint32 count ); [public,noopnum,noprint] void __spoolss_EnumMonitors( [in] uint32 level, @@ -1003,19 +1003,19 @@ [out,switch_is(level)] spoolss_MonitorInfo info[count] ); [nopull,nopush] WERROR spoolss_EnumMonitors( - [in] [string,charset(UTF16)] uint16 *servername, + [in,unique] [string,charset(UTF16)] uint16 *servername, [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, - [out,switch_is(level),size_is(count)] spoolss_MonitorInfo *info, - [out] uint32 *needed, - [out] uint32 *count + [out,unique,switch_is(level),size_is(count)] spoolss_MonitorInfo *info, + [out] uint32 needed, + [out] uint32 count ); /******************/ /* Function: 0x25 */ WERROR spoolss_AddPort( - [in] [string,charset(UTF16)] uint16 *server_name, + [in,unique] [string,charset(UTF16)] uint16 *server_name, [in] uint32 unknown, [in] [string,charset(UTF16)] uint16 monitor_name[] ); @@ -1101,16 +1101,16 @@ /* Function: 0x35 */ WERROR spoolss_GetPrinterDriver2( [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 *architecture, + [in,unique] [string,charset(UTF16)] uint16 *architecture, [in] uint32 level, - [in] DATA_BLOB *buffer, + [in,unique] DATA_BLOB *buffer, [in] uint32 offered, [in] uint32 client_major_version, [in] uint32 client_minor_version, - [out] DATA_BLOB *info, - [out] uint32 *needed, - [out] uint32 *server_major_version, - [out] uint32 *server_minor_version + [out,unique] DATA_BLOB *info, + [out] uint32 needed, + [out] uint32 server_major_version, + [out] uint32 server_minor_version ); /******************/ @@ -1125,7 +1125,8 @@ /******************/ /* Function: 0x38 */ - WERROR spoolss_FindClosePrinterNotify( + [public] WERROR spoolss_FindClosePrinterNotify( + [in,ref] policy_handle *handle ); /******************/ @@ -1135,7 +1136,13 @@ /******************/ /* Function: 0x3a */ - WERROR spoolss_ReplyOpenPrinter( + [public] WERROR spoolss_ReplyOpenPrinter( + [in,string,charset(UTF16)] uint16 server_name[], + [in] uint32 printer_local, + [in] winreg_Type type, + [in] uint32 unknown1, + [in] uint32 unknown2, + [out,ref] policy_handle *handle ); /******************/ @@ -1145,7 +1152,8 @@ /******************/ /* Function: 0x3c */ - WERROR spoolss_ReplyClosePrinter( + [public] WERROR spoolss_ReplyClosePrinter( + [in,out,ref] policy_handle *handle ); /******************/ @@ -1168,31 +1176,65 @@ WERROR spoolss_ResetPrinterEx( ); + typedef [enum16bit] enum { + SPOOLSS_FIELD_SERVER_NAME = 0, + SPOOLSS_FIELD_PRINTER_NAME = 1, + SPOOLSS_FIELD_SHARE_NAME = 2, + SPOOLSS_FIELD_PORT_NAME = 3, + SPOOLSS_FIELD_DRIVER_NAME = 4, + SPOOLSS_FIELD_COMMENT = 5, + SPOOLSS_FIELD_LOCATION = 6, + SPOOLSS_FIELD_DEVMODE = 7, + SPOOLSS_FIELD_SEPFILE = 8, + SPOOLSS_FIELD_PRINT_PROCESSOR = 9, + SPOOLSS_FIELD_PARAMETERS = 10, + SPOOLSS_FIELD_DATATYPE = 11, + SPOOLSS_FIELD_SECURITY_DESCRIPTOR=12, + SPOOLSS_FIELD_ATTRIBUTES = 13, + SPOOLSS_FIELD_PRIORITY = 14, + SPOOLSS_FIELD_DEFAULT_PRIORITY = 15, + SPOOLSS_FIELD_START_TIME = 16, + SPOOLSS_FIELD_UNTIL_TIME = 17, + SPOOLSS_FIELD_STATUS = 18, + SPOOLSS_FIELD_STATUS_STRING = 19, + SPOOLSS_FIELD_CJOBS = 20, + SPOOLSS_FIELD_AVERAGE_PPM = 21, + SPOOLSS_FIELD_TOTAL_PAGES = 22, + SPOOLSS_FIELD_PAGES_PRINTED = 23, + SPOOLSS_FIELD_TOTAL_BYTES = 24, + SPOOLSS_FIELD_BYTES_PRINTED = 25 + } spoolss_Field; + + typedef [enum16bit] enum { + SPOOLSS_NOTIFY_PRINTER = 0, + SPOOLSS_NOTIFY_JOB = 1 + } spoolss_NotifyType; + /******************/ /* Function: 0x41 */ - typedef [flag(NDR_PAHEX)] struct { + typedef struct { + spoolss_NotifyType type; uint16 u1; - uint16 u2; + uint32 u2; uint32 u3; - uint32 u4; uint32 count; - [size_is(count)] uint16 *array; - } spoolss_RemoteFindFirstPrinterChangeNotifyEx_t2; + [size_is(count)] spoolss_Field *fields; + } spoolss_NotifyOptionsArray; typedef struct { - uint32 u1; - uint32 u2; + uint32 version; + uint32 flags; uint32 count; - [size_is(count)] spoolss_RemoteFindFirstPrinterChangeNotifyEx_t2 *t2; - } spoolss_RemoteFindFirstPrinterChangeNotifyEx_t1; + [size_is(count)] spoolss_NotifyOptionsArray *options; + } spoolss_NotifyOptionsContainer; - WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx( + [public] WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx( [in,ref] policy_handle *handle, - [in] uint32 u1, - [in] uint32 u2, - [in] [string,charset(UTF16)] uint16 *str, - [in] uint32 u3, - [in] spoolss_RemoteFindFirstPrinterChangeNotifyEx_t1 *t1 + [in] uint32 flags, + [in] uint32 options, + [in,unique] [string,charset(UTF16)] uint16 *str, + [in] uint32 printer_local, + [in,unique] spoolss_NotifyOptionsContainer *t1 ); /******************/ @@ -1200,9 +1242,55 @@ WERROR spoolss_RouterRefreshPrinterChangeNotification( ); + typedef struct { + uint32 size; + [size_is(size/2),unique,charset(UTF16)] uint16 *string; + } spoolss_NotifyUTF16String; + + typedef struct { + uint32 size; + [size_is(size),charset(DOS)] uint8 *string; + } spoolss_NotifyDOSString; + + typedef struct { + uint16 data[8]; + } spoolss_NotifyBlobData; + + typedef struct { + uint32 len; + [unique] spoolss_NotifyBlobData *data; + } spoolss_NotifyBlob; + + typedef [switch_type(uint32)] union { + [case(1)] dlong integer; + [case(2)] spoolss_NotifyUTF16String utf16_string; + [case(3)] spoolss_NotifyDOSString ascii_string; + [case(4)] spoolss_NotifyBlob blob; + [case(5)] spoolss_NotifyDOSString ascii_string; + } spoolss_NotifyData; + + typedef struct { + spoolss_NotifyType type; + spoolss_Field field; + uint32 variable_type; + uint32 job_id; + [switch_is(variable_type)] spoolss_NotifyData data; + } spoolss_Notify; + + typedef struct { + uint32 version; + uint32 flags; + uint32 count; + [size_is(count)] spoolss_Notify notifies[]; + } spoolss_NotifyInfo; + /******************/ /* Function: 0x43 */ - WERROR spoolss_RemoteFindNextPrinterChangeNotifyEx( + [public] WERROR spoolss_RemoteFindNextPrinterChangeNotifyEx( + [in,ref] policy_handle *handle, + [in] uint32 change_low, + [in,unique] spoolss_NotifyOptionsContainer *container, + [out, unique] spoolss_NotifyInfo *info ); /******************/ @@ -1224,11 +1312,72 @@ [case(1)] spoolss_UserLevel1 *level1; } spoolss_UserLevel; + typedef bitmap { + SERVER_ACCESS_ADMINISTER = 0x00000001, + SERVER_ACCESS_ENUMERATE = 0x00000002, + PRINTER_ACCESS_ADMINISTER = 0x00000004, + PRINTER_ACCESS_USE = 0x00000008, + JOB_ACCESS_ADMINISTER = 0x00000010 + } spoolss_AccessRights; + + /* Access rights for print servers */ + const int SERVER_ALL_ACCESS = SEC_STD_REQUIRED | + SERVER_ACCESS_ADMINISTER | + SERVER_ACCESS_ENUMERATE; + + const int SERVER_READ = SEC_STD_READ_CONTROL | + SERVER_ACCESS_ENUMERATE; + + const int SERVER_WRITE = STANDARD_RIGHTS_WRITE_ACCESS | + SERVER_ACCESS_ADMINISTER | + SERVER_ACCESS_ENUMERATE; + + const int SERVER_EXECUTE = SEC_STD_READ_CONTROL | + SERVER_ACCESS_ENUMERATE; + + /* Access rights for printers */ + const int PRINTER_ALL_ACCESS = SEC_STD_REQUIRED | + PRINTER_ACCESS_ADMINISTER | + PRINTER_ACCESS_USE; + + const int PRINTER_READ = SEC_STD_READ_CONTROL | + PRINTER_ACCESS_USE; + + const int PRINTER_WRITE = STANDARD_RIGHTS_WRITE_ACCESS | + PRINTER_ACCESS_USE; + + const int PRINTER_EXECUTE = SEC_STD_READ_CONTROL | + PRINTER_ACCESS_USE; + + /* Access rights for jobs */ + const int JOB_ALL_ACCESS = SEC_STD_REQUIRED | + JOB_ACCESS_ADMINISTER; + + const int JOB_READ = SEC_STD_READ_CONTROL | + JOB_ACCESS_ADMINISTER; + + const int JOB_WRITE = STANDARD_RIGHTS_WRITE_ACCESS | + JOB_ACCESS_ADMINISTER; + + const int JOB_EXECUTE = SEC_STD_READ_CONTROL | + JOB_ACCESS_ADMINISTER; + + /* ACE masks for various print permissions */ + const int PRINTER_ACE_FULL_CONTROL = SEC_GENERIC_ALL | + PRINTER_ALL_ACCESS; + + const int PRINTER_ACE_MANAGE_DOCUMENTS = SEC_GENERIC_ALL | + READ_CONTROL_ACCESS; + + const int PRINTER_ACE_PRINT = GENERIC_EXECUTE_ACCESS | + READ_CONTROL_ACCESS | + PRINTER_ACCESS_USE; + /******************/ /* Function: 0x45 */ - WERROR spoolss_OpenPrinterEx( - [in] [string,charset(UTF16)] uint16 *printername, - [in] [string,charset(UTF16)] uint16 *datatype, + [public] WERROR spoolss_OpenPrinterEx( + [in,unique] [string,charset(UTF16)] uint16 *printername, + [in,unique] [string,charset(UTF16)] uint16 *datatype, [in] spoolss_DevmodeContainer devmode_ctr, [in] uint32 access_mask, [in] uint32 level, @@ -1239,11 +1388,11 @@ /******************/ /* Function: 0x46 */ WERROR spoolss_AddPrinterEx( - [in] [string,charset(UTF16)] uint16 *server, + [in,unique] [string,charset(UTF16)] uint16 *server, [in] uint32 level, - [in,switch_is(level)] spoolss_PrinterInfo *info, + [in,unique,switch_is(level)] spoolss_PrinterInfo *info, [in] spoolss_DevmodeContainer devmode_ctr, - [in] security_descriptor *secdesc, + [in,unique] security_descriptor *secdesc, [in] uint32 ulevel, [in,switch_is(ulevel)] spoolss_UserLevel userlevel ); @@ -1258,12 +1407,13 @@ WERROR spoolss_EnumPrinterData( [in,ref] policy_handle *handle, [in] uint32 enum_index, + [out,ref,size_is(value_offered/2),charset(UTF16)] uint16 *value_name, [in] uint32 value_offered, - [out] lstring *value_name, - [out] uint32 *value_needed, - [out] uint32 *printerdata_type, - [out] DATA_BLOB *buffer, - [in,out,ref] uint32 *data_size + [out,ref] uint32 *value_needed, + [out,ref] uint32 *printerdata_type, + [out,ref] DATA_BLOB *buffer, + [in] uint32 data_offered, + [out,ref] uint32 *data_needed ); /******************/ @@ -1306,25 +1456,30 @@ [in] [string,charset(UTF16)] uint16 key_name[], [in] [string,charset(UTF16)] uint16 value_name[], [in] uint32 offered, - [out] uint32 *type, - [out] DATA_BLOB *buffer, - [out] uint32 *needed + [out] uint32 type, + [out] DATA_BLOB buffer, + [out] uint32 needed ); /******************/ /* Function: 0x4f */ - WERROR spoolss_EnumPrinterDataEx( + [public] WERROR spoolss_EnumPrinterDataEx( [in,ref] policy_handle *handle, [in] [string,charset(UTF16)] uint16 key_name[], [in] uint32 offered, - [out] DATA_BLOB *buffer, - [out] uint32 *needed, - [out] uint32 *count + [out] DATA_BLOB buffer, + [out] uint32 needed, + [out] uint32 count ); /******************/ /* Function: 0x50 */ - WERROR spoolss_EnumPrinterKey( + [public] WERROR spoolss_EnumPrinterKey( + [in, ref] policy_handle *handle, + [in] [string,charset(UTF16)] uint16 key_name[], + [out] uint32 key_buffer_size, + [out] uint16 key_buffer[key_buffer_size], + [in,out] uint32 needed ); /******************/ @@ -1374,14 +1529,14 @@ [in,value(r->in.in_data.length)] uint32 _in_data_length, [in] uint32 offered, [in] uint32 unknown1, - [out] DATA_BLOB *out_data, - [out] uint32 *needed, - [out] uint32 *unknown2 + [out] DATA_BLOB out_data, + [out] uint32 needed, + [out] uint32 unknown2 ); /******************/ /* Function: 0x59 */ - WERROR spoolss_AddPrinterDriverEx( + [public] WERROR spoolss_AddPrinterDriverEx( ); /******************/ diff --git a/source3/librpc/idl/srvsvc.idl b/source3/librpc/idl/srvsvc.idl index 2f23fd1e70..4ad7bebdbd 100644 --- a/source3/librpc/idl/srvsvc.idl +++ b/source3/librpc/idl/srvsvc.idl @@ -577,7 +577,7 @@ import "security.idl", "svcctl.idl"; [in,unique] [string,charset(UTF16)] uint16 *server_unc, [in] [string,charset(UTF16)] uint16 share_name[], [in] uint32 level, - [in,switch_is(level)] srvsvc_NetShareInfo info, + [in,ref,switch_is(level)] srvsvc_NetShareInfo *info, [in,out,unique] uint32 *parm_error ); @@ -1120,7 +1120,7 @@ import "security.idl", "svcctl.idl"; WERROR srvsvc_NetSrvSetInfo( [in,unique] [string,charset(UTF16)] uint16 *server_unc, [in] uint32 level, - [in,switch_is(level)] srvsvc_NetSrvInfo info, + [in,ref,switch_is(level)] srvsvc_NetSrvInfo *info, [in,out,unique] uint32 *parm_error ); @@ -1299,7 +1299,7 @@ import "security.idl", "svcctl.idl"; /* Function: 0x1c */ WERROR srvsvc_NetRemoteTOD( [in,unique] [string,charset(UTF16)] uint16 *server_unc, - [out,unique] srvsvc_NetRemoteTODInfo *info + [out,ref] srvsvc_NetRemoteTODInfo **info ); /**************************/ diff --git a/source3/librpc/idl/svcctl.idl b/source3/librpc/idl/svcctl.idl index 97c9f0e24b..e36a0918bf 100644 --- a/source3/librpc/idl/svcctl.idl +++ b/source3/librpc/idl/svcctl.idl @@ -115,11 +115,20 @@ /*****************/ /* Function 0x04 */ WERROR svcctl_QueryServiceObjectSecurity( + [in] policy_handle *handle, + [in] uint32 security_flags, + [out,ref,size_is(buffer_size)] uint8 *buffer, + [in,range(0,0x40000)] uint32 buffer_size, + [out,ref,range(0,0x40000)] uint32 *needed ); /*****************/ /* Function 0x05 */ WERROR svcctl_SetServiceObjectSecurity( + [in] policy_handle *handle, + [in] uint32 security_flags, + [in,ref,size_is(buffer_size)] uint8 *buffer, + [in] uint32 buffer_size ); /*****************/ diff --git a/source3/librpc/idl/unixinfo.idl b/source3/librpc/idl/unixinfo.idl deleted file mode 100644 index 48bc565fff..0000000000 --- a/source3/librpc/idl/unixinfo.idl +++ /dev/null @@ -1,56 +0,0 @@ -#include "idl_types.h" -/* - Unixinfo interface definition -*/ - -import "security.idl"; - -[ uuid("9c54e310-a955-4885-bd31-78787147dfa6"), - version(0.0), - endpoint("ncacn_np:[\\pipe\\unixinfo]", "ncacn_ip_tcp:", "ncalrpc:"), - pointer_default(unique), - helpstring("Unixinfo specific stuff") -] interface unixinfo -{ - /******************/ - /* Function: 0x00 */ - NTSTATUS unixinfo_SidToUid ( - [in] dom_sid sid, - [out] hyper *uid - ); - - /******************/ - /* Function: 0x01 */ - NTSTATUS unixinfo_UidToSid ( - [in] hyper uid, - [out] dom_sid *sid - ); - - /******************/ - /* Function: 0x02 */ - NTSTATUS unixinfo_SidToGid ( - [in] dom_sid sid, - [out] hyper *gid - ); - - /******************/ - /* Function: 0x03 */ - NTSTATUS unixinfo_GidToSid ( - [in] hyper gid, - [out] dom_sid *sid - ); - - typedef struct { - NTSTATUS status; - utf8string homedir; - utf8string shell; - } unixinfo_GetPWUidInfo; - - /******************/ - /* Function: 0x04 */ - NTSTATUS unixinfo_GetPWUid ( - [in,out,ref,range(0,1023)] uint32 *count, - [in,size_is(*count)] hyper uids[], - [out,size_is(*count)] unixinfo_GetPWUidInfo infos[*] - ); -} |