Changeset 988 for vendor/current/librpc
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- Location:
- vendor/current/librpc
- Files:
-
- 35 added
- 1 deleted
- 70 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/librpc/idl/auth.idl
r740 r988 2 2 3 3 /* 4 security IDL structures 4 Authentication IDL structures 5 6 These are NOT public network structures, but it is helpful to define 7 these things in IDL. They may change without ABI breakage or 8 warning. 9 5 10 */ 6 11 7 12 import "misc.idl", "security.idl", "lsa.idl", "krb5pac.idl"; 13 [ 14 pyhelper("librpc/ndr/py_auth.c"), 15 helper("../librpc/ndr/ndr_auth.h"), 16 helpstring("internal Samba authentication structures") 17 ] 8 18 9 19 interface auth … … 18 28 * during local privilage and group manipulations */ 19 29 typedef [public] struct { 20 utf8stringaccount_name;21 utf8stringdomain_name;30 [unique,charset(UTF8),string] char *account_name; 31 [unique,charset(UTF8),string] char *domain_name; 22 32 23 utf8stringfull_name;24 utf8stringlogon_script;25 utf8stringprofile_path;26 utf8stringhome_directory;27 utf8stringhome_drive;28 utf8stringlogon_server;33 [unique,charset(UTF8),string] char *full_name; 34 [unique,charset(UTF8),string] char *logon_script; 35 [unique,charset(UTF8),string] char *profile_path; 36 [unique,charset(UTF8),string] char *home_directory; 37 [unique,charset(UTF8),string] char *home_drive; 38 [unique,charset(UTF8),string] char *logon_server; 29 39 30 40 NTTIME last_logon; … … 48 58 uint32 num_dc_sids; 49 59 [size_is(num_dc_sids)] dom_sid dc_sids[*]; 50 PAC_SIGNATURE_DATA *pac_srv_sig;51 PAC_SIGNATURE_DATA *pac_kdc_sig;52 60 } auth_user_info_torture; 53 61 54 62 typedef [public] struct { 55 utf8stringunix_name;63 [unique,charset(UTF8),string] char *unix_name; 56 64 57 65 /* … … 62 70 * smb request. See set_current_user_info in source3. 63 71 */ 64 utf8stringsanitized_username;72 [unique,charset(UTF8),string] char *sanitized_username; 65 73 } auth_user_info_unix; 66 74 … … 71 79 [size_is(num_sids)] dom_sid sids[*]; 72 80 auth_user_info *info; 73 DATA_BLOB user_session_key;74 DATA_BLOB lm_session_key;81 [noprint] DATA_BLOB user_session_key; 82 [noprint] DATA_BLOB lm_session_key; 75 83 } auth_user_info_dc; 76 84 … … 80 88 auth_user_info *info; 81 89 auth_user_info_unix *unix_info; 82 DATA_BLOB session_key; 83 DATA_BLOB exported_gssapi_credentials; 90 [value(NULL), ignore] auth_user_info_torture *torture; 91 92 /* This is the final session key, as used by SMB signing, and 93 * (truncated to 16 bytes) encryption on the SAMR and LSA pipes 94 * when over ncacn_np. 95 * It is calculated by NTLMSSP from the session key in the info3, 96 * and is set from the Kerberos session key using 97 * krb5_auth_con_getremotesubkey(). 98 * 99 * Bottom line, it is not the same as the session keys in info3. 100 */ 101 102 [noprint] DATA_BLOB session_key; 103 104 [value(NULL), ignore] cli_credentials *credentials; 105 } auth_session_info; 106 107 typedef [public] struct { 108 auth_session_info *session_info; 109 [noprint] DATA_BLOB exported_gssapi_credentials; 84 110 } auth_session_info_transport; 85 111 } -
vendor/current/librpc/idl/backupkey.idl
r740 r988 48 48 } bkrp_dc_serverwrap_key; 49 49 50 [public] typedef struct { 51 } bkrp_empty; 52 50 53 [public,gensize] typedef struct { 51 54 uint32 version; … … 96 99 } bkrp_access_check_v3; 97 100 101 [public] typedef struct { 102 uint8 r3[32]; 103 uint8 mac[20]; 104 dom_sid sid; 105 [subcontext(0),flag(NDR_REMAINING)] DATA_BLOB secret_data; 106 } bkrp_rc4encryptedpayload; 107 108 [public] typedef struct { 109 [value(0x00000001)] uint32 magic; 110 uint32 payload_length; 111 uint32 ciphertext_length; 112 GUID guid; 113 uint8 r2[68]; 114 uint8 rc4encryptedpayload[ciphertext_length]; 115 } bkrp_server_side_wrapped; 116 117 [public] typedef struct { 118 [flag(NDR_REMAINING)] DATA_BLOB opaque; 119 } bkrp_opaque_blob; 120 121 typedef enum { 122 BACKUPKEY_SERVER_WRAP_VERSION = 1, 123 BACKUPKEY_CLIENT_WRAP_VERSION2 = 2, 124 BACKUPKEY_CLIENT_WRAP_VERSION3 = 3 125 } bkrp_versions; 126 98 127 typedef enum { 99 128 BACKUPKEY_INVALID_GUID_INTEGER = 0xFFFF, 100 129 BACKUPKEY_RESTORE_GUID_INTEGER = 0x0000, 101 BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID_INTEGER = 0x0001 130 BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID_INTEGER = 0x0001, 131 BACKUPKEY_RESTORE_GUID_WIN2K_INTEGER = 0x0002, 132 BACKUPKEY_BACKUP_GUID_INTEGER = 0x0003 102 133 } bkrp_guid_to_integer; 103 134 104 135 [public] typedef [nodiscriminant] union { 105 136 [case(BACKUPKEY_RESTORE_GUID_INTEGER)] bkrp_client_side_wrapped restore_req; 106 [case(BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID_INTEGER)] bkrp_client_side_wrapped cert_req; 137 [case(BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID_INTEGER)] bkrp_empty empty; 138 [case(BACKUPKEY_RESTORE_GUID_WIN2K_INTEGER)] bkrp_server_side_wrapped unsign_req; 139 [case(BACKUPKEY_BACKUP_GUID_INTEGER)] bkrp_opaque_blob sign_req; 107 140 } bkrp_data_in_blob; 108 141 -
vendor/current/librpc/idl/dcerpc.idl
r919 r988 6 6 to do it this way 7 7 8 see http://www.opengroup.org/onlinepubs/9629399/chap12.htm for packet 9 layouts 8 See [C706 - DCE 1.1: Remote Procedure Call] for the OpenGroup 9 DCERPC specification: 10 http://pubs.opengroup.org/onlinepubs/9629399/toc.htm 11 12 See C706 - Chapter 12: RPC PDU Encodings for packet layouts: 13 http://www.opengroup.org/onlinepubs/9629399/chap12.htm 14 15 See also [MS-RPCE] for the Microsoft 16 "Remote Procedure Call Protocol Extensions". 17 http://msdn.microsoft.com/en-us/library/cc243560.aspx 18 10 19 */ 11 20 import "misc.idl"; … … 13 22 cpp_quote("extern const uint8_t DCERPC_SEC_VT_MAGIC[8];") 14 23 24 [ 25 helper("../librpc/ndr/ndr_dcerpc.h") 26 ] 15 27 interface dcerpc 16 28 { … … 37 49 38 50 typedef [nodiscriminant] union { 51 [case(LIBNDR_FLAG_OBJECT_PRESENT)] GUID object; 39 52 [default] dcerpc_empty empty; 40 [case(LIBNDR_FLAG_OBJECT_PRESENT)] GUID object;41 53 } dcerpc_object; 42 54 … … 45 57 uint16 context_id; 46 58 uint16 opnum; 47 [switch_is(ndr->flags & LIBNDR_FLAG_OBJECT_PRESENT)] dcerpc_object object; 59 /* 60 * NDR_DCERPC_REQUEST_OBJECT_PRESENT 61 * is defined differently for ndr_dcerpc.c and py_dcerpc.c 62 */ 63 [switch_is(NDR_DCERPC_REQUEST_OBJECT_PRESENT)] dcerpc_object object; 48 64 [flag(NDR_ALIGN8)] DATA_BLOB _pad; 49 65 [flag(NDR_REMAINING)] DATA_BLOB stub_and_verifier; 50 66 } dcerpc_request; 51 67 52 const int DCERPC_BIND_REASON_ASYNTAX = 1; 53 const int DCERPC_BIND_PROVIDER_REJECT = 2; 54 const int DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED = 4; 55 const int DCERPC_BIND_REASON_INVALID_AUTH_TYPE = 8; 56 57 typedef struct { 58 uint16 result; 59 uint16 reason; 68 typedef [enum16bit] enum { 69 DCERPC_BIND_ACK_RESULT_ACCEPTANCE = 0, 70 DCERPC_BIND_ACK_RESULT_USER_REJECTION = 1, 71 DCERPC_BIND_ACK_RESULT_PROVIDER_REJECTION = 2, 72 DCERPC_BIND_ACK_RESULT_NEGOTIATE_ACK = 3 73 } dcerpc_bind_ack_result; 74 75 const int DCERPC_BIND_PROVIDER_REJECT = 76 DCERPC_BIND_ACK_RESULT_PROVIDER_REJECTION; 77 78 typedef [enum16bit] enum { 79 DCERPC_BIND_ACK_REASON_NOT_SPECIFIED = 0, 80 DCERPC_BIND_ACK_REASON_ABSTRACT_SYNTAX_NOT_SUPPORTED = 1, 81 DCERPC_BIND_ACK_REASON_TRANSFER_SYNTAXES_NOT_SUPPORTED = 2, 82 DCERPC_BIND_ACK_REASON_LOCAL_LIMIT_EXCEEDED = 3 83 } dcerpc_bind_ack_reason_values; 84 85 const int DCERPC_BIND_REASON_ASYNTAX = 86 DCERPC_BIND_ACK_REASON_ABSTRACT_SYNTAX_NOT_SUPPORTED; 87 88 typedef [bitmap16bit] bitmap { 89 DCERPC_BIND_TIME_SECURITY_CONTEXT_MULTIPLEXING = 0x0001, 90 DCERPC_BIND_TIME_KEEP_CONNECTION_ON_ORPHAN = 0x0002 91 } dcerpc_bind_time_features; 92 93 typedef [nodiscriminant] union { 94 [case(DCERPC_BIND_ACK_RESULT_NEGOTIATE_ACK)] 95 dcerpc_bind_time_features negotiate; 96 [default] dcerpc_bind_ack_reason_values value; 97 } dcerpc_bind_ack_reason; 98 99 typedef struct { 100 dcerpc_bind_ack_result result; 101 [switch_is(result)] dcerpc_bind_ack_reason reason; 60 102 ndr_syntax_id syntax; 61 103 } dcerpc_ack_ctx; … … 65 107 uint16 max_recv_frag; 66 108 uint32 assoc_group_id; 67 [value(strlen (secondary_address)+1)] uint16 secondary_address_size;109 [value(strlen_m_term_null(secondary_address))] uint16 secondary_address_size; 68 110 [charset(DOS)] uint8 secondary_address[secondary_address_size]; 69 111 [flag(NDR_ALIGN4)] DATA_BLOB _pad1; … … 73 115 } dcerpc_bind_ack; 74 116 75 typedef struct { 76 uint32 num_versions; 77 uint32 versions[num_versions]; 78 } dcerpc_bind_nak_versions; 79 80 typedef [nodiscriminant] union { 81 [case(DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED)] dcerpc_bind_nak_versions v; 82 [default] ; 83 } dcerpc_bind_nak_versions_ctr; 84 85 typedef struct { 86 uint16 reject_reason; 87 [switch_is(reject_reason)] dcerpc_bind_nak_versions_ctr versions; 117 typedef [public,enum16bit] enum { 118 DCERPC_BIND_NAK_REASON_NOT_SPECIFIED = 0, 119 DCERPC_BIND_NAK_REASON_TEMPORARY_CONGESTION = 1, 120 DCERPC_BIND_NAK_REASON_LOCAL_LIMIT_EXCEEDED = 2, 121 DCERPC_BIND_NAK_REASON_PROTOCOL_VERSION_NOT_SUPPORTED = 4, 122 DCERPC_BIND_NAK_REASON_INVALID_AUTH_TYPE = 8, 123 DCERPC_BIND_NAK_REASON_INVALID_CHECKSUM = 9 124 } dcerpc_bind_nak_reason; 125 126 const int DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED = 127 DCERPC_BIND_NAK_REASON_PROTOCOL_VERSION_NOT_SUPPORTED; 128 const int DCERPC_BIND_REASON_INVALID_AUTH_TYPE = 129 DCERPC_BIND_NAK_REASON_INVALID_AUTH_TYPE; 130 131 typedef [public] struct { 132 uint8 rpc_vers; /* RPC version */ 133 uint8 rpc_vers_minor; /* Minor version */ 134 } dcerpc_bind_nak_version; 135 136 typedef [public,nopull] struct { 137 dcerpc_bind_nak_reason reject_reason; 138 uint8 num_versions; 139 dcerpc_bind_nak_version versions[num_versions]; 140 [flag(NDR_REMAINING)] DATA_BLOB _pad; 88 141 } dcerpc_bind_nak; 89 142 … … 145 198 DCERPC_NCA_S_FAULT_CODESET_CONV_ERROR = 0x1C000023, 146 199 DCERPC_NCA_S_FAULT_OBJECT_NOT_FOUND = 0x1C000024, 147 DCERPC_NCA_S_FAULT_NO_CLIENT_STUB = 0x1C000025 200 DCERPC_NCA_S_FAULT_NO_CLIENT_STUB = 0x1C000025, 201 DCERPC_FAULT_ACCESS_DENIED = 0x00000005, 202 DCERPC_FAULT_NO_CALL_ACTIVE = 0x000006bd, 203 DCERPC_FAULT_CANT_PERFORM = 0x000006d8, 204 DCERPC_FAULT_OUT_OF_RESOURCES = 0x000006d9, 205 DCERPC_FAULT_BAD_STUB_DATA = 0x000006f7, 206 DCERPC_FAULT_SEC_PKG_ERROR = 0x00000721 148 207 } dcerpc_nca_status; 149 208 150 const int DCERPC_FAULT_OP_RNG_ERROR = 0x1c010002;151 const int DCERPC_FAULT_UNK_IF = 0x1c010003;152 const int DCERPC_FAULT_NDR = 0x000006f7;153 const int DCERPC_FAULT_INVALID_TAG = 0x1c000006;154 const int DCERPC_FAULT_CONTEXT_MISMATCH = 0x1c00001a;209 const int DCERPC_FAULT_OP_RNG_ERROR = DCERPC_NCA_S_OP_RNG_ERROR; 210 const int DCERPC_FAULT_UNK_IF = DCERPC_NCA_S_UNKNOWN_IF; 211 const int DCERPC_FAULT_NDR = DCERPC_FAULT_BAD_STUB_DATA; 212 const int DCERPC_FAULT_INVALID_TAG = DCERPC_NCA_S_FAULT_INVALID_TAG; 213 const int DCERPC_FAULT_CONTEXT_MISMATCH = DCERPC_NCA_S_FAULT_CONTEXT_MISMATCH; 155 214 const int DCERPC_FAULT_OTHER = 0x00000001; 156 const int DCERPC_FAULT_ACCESS_DENIED = 0x00000005;157 const int DCERPC_FAULT_CANT_PERFORM = 0x000006d8;158 const int DCERPC_FAULT_SEC_PKG_ERROR = 0x00000721;159 215 160 216 /* we return this fault when we haven't yet run the test … … 207 263 208 264 const uint8 DCERPC_AUTH_TRAILER_LENGTH = 8; 265 const uint8 DCERPC_AUTH_PAD_ALIGNMENT = 16; 209 266 210 267 typedef [public] struct { … … 469 526 const int DCERPC_PFC_FLAG_PENDING_CANCEL = 470 527 DCERPC_PFC_FLAG_PENDING_CANCEL_OR_HDR_SIGNING; 471 const i st DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN =528 const int DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN = 472 529 DCERPC_PFC_FLAG_PENDING_CANCEL_OR_HDR_SIGNING; 473 530 … … 478 535 const uint32 DCERPC_FRAG_MAX_SIZE = 5840; 479 536 const uint8 DCERPC_AUTH_LEN_OFFSET = 10; 480 const uint8 DCERPC_CALL_ID_OFFSET = 12;481 537 const uint8 DCERPC_NCACN_PAYLOAD_OFFSET = 16; 482 538 const uint32 DCERPC_NCACN_PAYLOAD_MAX_SIZE = 0x400000; /* 4 MByte */ -
vendor/current/librpc/idl/dcom.idl
r414 r988 27 27 /*****************/ 28 28 /* Function 0x00 */ 29 /* Returns the interface with the specified IID 29 /* Returns the interface with the specified IID 30 30 if implemented by this object */ 31 [local] WERROR QueryInterface([in,unique] GUID *iid, 32 [out,iid_is(riid)] IUnknown **data); 31 [local] WERROR QueryInterface( 32 [in,unique] GUID *iid, 33 [out,iid_is(riid)] IUnknown **data 34 ); 33 35 34 36 /*****************/ … … 48 50 ] interface IClassFactory : IUnknown 49 51 { 50 [local] WERROR CreateInstance([in,unique] MInterfacePointer *pUnknown, 51 [in,unique] GUID *iid, 52 [out, iid_is(riid),unique] MInterfacePointer *ppv); 52 [local] WERROR CreateInstance( 53 [in,unique] MInterfacePointer *pUnknown, 54 [in,unique] GUID *iid, 55 [out, iid_is(riid),unique] MInterfacePointer *ppv 56 ); 53 57 54 58 [call_as(CreateInstance)] WERROR RemoteCreateInstance(); … … 56 60 /* Set lock to TRUE when you want to do a lock 57 61 and set it to FALSE when you want to unlock */ 58 [local] WERROR LockServer([in] uint8 lock); 62 [local] WERROR LockServer( 63 [in] uint8 lock 64 ); 59 65 60 66 [call_as(LockServer)] WERROR RemoteLockServer(); … … 76 82 interface IRemUnknown : IUnknown 77 83 { 78 typedef [public] struct 84 typedef [public] struct 79 85 { 80 86 WERROR hResult; /* result of call */ … … 91 97 ); 92 98 93 typedef struct 99 typedef struct 94 100 { 95 101 GUID ipid; /* ipid to AddRef/Release */ … … 99 105 100 106 [call_as(AddRef)] WERROR RemAddRef ( 101 102 103 107 [in] uint16 cInterfaceRefs, 108 [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[], 109 [out, size_is(cInterfaceRefs), unique] WERROR *pResults 104 110 ); 105 111 106 112 [call_as(Release)] WERROR RemRelease ( 107 108 113 [in] uint16 cInterfaceRefs, 114 [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[] 109 115 ); 110 116 } … … 115 121 ] interface IClassActivator : IUnknown 116 122 { 117 void GetClassObject([in] GUID clsid, 118 [in] uint32 context, 119 [in] uint32 locale, 120 [in] GUID iid, 121 [out, iid_is(iid)] MInterfacePointer *data); 123 void GetClassObject( 124 [in] GUID clsid, 125 [in] uint32 context, 126 [in] uint32 locale, 127 [in] GUID iid, 128 [out, iid_is(iid)] MInterfacePointer *data 129 ); 122 130 } 123 131 … … 134 142 pointer_default(unique), 135 143 uuid("c6f3ee72-ce7e-11d1-b71e-00c04fc3111a") 136 ] interface IMachineLocalActivator 144 ] interface IMachineLocalActivator 137 145 { 138 146 WERROR IMachineLocalActivator_foo(); … … 147 155 } 148 156 149 /* Looks like this is the equivalent of .NET's 157 /* Looks like this is the equivalent of .NET's 150 158 System.Activator class */ 151 159 [ … … 155 163 interface ISystemActivator : IClassActivator 156 164 { 157 WERROR ISystemActivatorRemoteCreateInstance([in] hyper unknown1, /* OXID ? */ 158 [in] MInterfacePointer iface1, 159 [in] hyper unknown2, 160 [out] uint32 *unknown3, 161 [out] MInterfacePointer *iface2); 165 WERROR ISystemActivatorRemoteCreateInstance( 166 [in] hyper unknown1, /* OXID ? */ 167 [in] MInterfacePointer iface1, 168 [in] hyper unknown2, 169 [out] uint32 *unknown3, 170 [out] MInterfacePointer *iface2 171 ); 162 172 } 163 173 … … 176 186 { 177 187 [call_as(QueryInterface2)] WERROR RemQueryInterface2 ( 178 179 180 181 182 188 [in, unique] GUID *ripid, 189 [in] uint16 cIids, 190 [in, size_is(cIids), unique] GUID *iids, 191 [out, size_is(cIids), unique] WERROR *phr, 192 [out, size_is(cIids), unique] MInterfacePointer *ppMIF 183 193 ); 184 194 } … … 193 203 /* Function 0x03 */ 194 204 WERROR GetTypeInfoCount( 195 [out, unique] uint16 *pctinfo); 205 [out, unique] uint16 *pctinfo 206 ); 196 207 197 208 typedef struct { … … 201 212 /* Function 0x04 */ 202 213 WERROR GetTypeInfo ( 203 [in] uint16 iTInfo, 204 [in] uint32 lcid, 205 [out, unique] REF_ITypeInfo *ppTInfo); 214 [in] uint16 iTInfo, 215 [in] uint32 lcid, 216 [out, unique] REF_ITypeInfo *ppTInfo 217 ); 206 218 207 219 /*****************/ 208 220 /* Function 0x05 */ 209 221 WERROR GetIDsOfNames( 210 [in, unique] GUID *riid, 211 /*FIXME[in,size_is(cNames)] OLESTR *rgszNames[], */ 212 [in] uint16 cNames, 213 [in] uint32 lcid, 214 [out,size_is(cNames), unique] uint32 *rgDispId); 222 [in, unique] GUID *riid, 223 /*FIXME[in,size_is(cNames)] OLESTR *rgszNames[], */ 224 [in] uint16 cNames, 225 [in] uint32 lcid, 226 [out,size_is(cNames), unique] uint32 *rgDispId 227 ); 215 228 216 229 typedef struct { … … 231 244 /* Function 0x06 */ 232 245 WERROR Invoke( 233 [in] uint32 dispIdMember, 234 [in, unique] GUID *riid, 235 [in] uint32 lcid, 236 [in] uint16 wFlags, 237 [out,in, unique] DISPPARAMS *pDispParams, 238 [out, unique] VARIANT *pVarResult, 239 [out, unique] EXCEPINFO *pExcepInfo, 240 [out, unique] uint16 *puArgErr); 246 [in] uint32 dispIdMember, 247 [in, unique] GUID *riid, 248 [in] uint32 lcid, 249 [in] uint16 wFlags, 250 [out,in, unique] DISPPARAMS *pDispParams, 251 [out, unique] VARIANT *pVarResult, 252 [out, unique] EXCEPINFO *pExcepInfo, 253 [out, unique] uint16 *puArgErr 254 ); 241 255 } 242 256 … … 252 266 253 267 [ 254 uuid( DA23F6DB-6F45-466C-9EED-0B65286F2D78),268 uuid("DA23F6DB-6F45-466C-9EED-0B65286F2D78"), 255 269 helpstring("ICoffeeMachine Interface"), 256 270 pointer_default(unique), … … 277 291 { 278 292 WERROR Read( 279 280 [in] uint32 num_requested,281 282 283 293 [out, size_is(num_requested), length_is(*num_read)] uint8 pv[], 294 [in] uint32 num_requested, 295 [in, unique] uint32 *num_readx, 296 [out] uint32 *num_read 297 ); 284 298 285 299 WERROR Write( 286 [in,size_is(num_requested),unique] uint8 *data, 287 [in] uint32 num_requested, 288 [out] uint32 *num_written); 300 [in,size_is(num_requested),unique] uint8 *data, 301 [in] uint32 num_requested, 302 [out] uint32 *num_written 303 ); 289 304 } 290 305 … … 294 309 helpstring("simple class"), 295 310 internal 296 ] coclass simple 311 ] coclass simple 297 312 { 298 313 interface IStream; -
vendor/current/librpc/idl/dfsblobs.idl
r740 r988 54 54 [relative_short] nstring *DFS_alt_path; 55 55 [relative_short] nstring *netw_address; 56 /* As stated in MS DFSC 2.2.4.3.1 this array was guid but now MUST be 16 null bytes*/57 56 } dfs_normal_referral; 58 57 … … 75 74 76 75 typedef [flag(NDR_NOALIGN)] struct { 76 uint16 size; 77 77 DFS_SERVER_TYPE server_type; 78 78 DFS_FLAGS_REFERRAL entry_flags; 79 79 uint32 ttl; 80 80 [switch_is(entry_flags & DFS_FLAG_REFERRAL_DOMAIN_RESP)] dfs_referral referrals; 81 } dfs_referral_v3_remaining;82 83 typedef [flag(NDR_NOALIGN)] struct {84 uint16 size;85 dfs_referral_v3_remaining data;86 81 /* this is either 0 or 16 bytes */ 87 82 [switch_is(size - 18)] dfs_padding service_site_guid; 88 83 } dfs_referral_v3; 89 90 typedef struct {91 uint16 size;92 DFS_SERVER_TYPE server_type;93 DFS_FLAGS_REFERRAL entry_flags;94 uint32 ttl;95 dfs_normal_referral r1;96 } dfs_referral_v4;97 84 98 85 typedef [nodiscriminant] union { … … 100 87 [case(2)] dfs_referral_v2 v2; 101 88 [case(3)] dfs_referral_v3 v3; 102 [case(4)] dfs_referral_v 4v4;89 [case(4)] dfs_referral_v3 v4; 103 90 [default]; 104 91 } dfs_referral_version; -
vendor/current/librpc/idl/dns.idl
r740 r988 9 9 */ 10 10 11 import "misc.idl" ;11 import "misc.idl", "dnsp.idl"; 12 12 [ 13 13 helper("librpc/ndr/ndr_dns.h"), … … 37 37 DNS_OPCODE_IQUERY = (0x1<<11), 38 38 DNS_OPCODE_STATUS = (0x2<<11), 39 DNS_OPCODE_ REGISTER= (0x5<<11),39 DNS_OPCODE_UPDATE = (0x5<<11), 40 40 DNS_OPCODE_RELEASE = (0x6<<11), 41 41 DNS_OPCODE_WACK = (0x7<<11), … … 47 47 /* rcode values */ 48 48 typedef [public] enum { 49 DNS_RCODE_OK = 0x0, 50 DNS_RCODE_FORMERR = 0x1, 51 DNS_RCODE_SERVFAIL = 0x2, 52 DNS_RCODE_NXDOMAIN = 0x3, 53 DNS_RCODE_NOTIMP = 0x4, 54 DNS_RCODE_REFUSED = 0x5, 55 DNS_RCODE_YXDOMAIN = 0x6, 56 DNS_RCODE_YXRRSET = 0x7, 57 DNS_RCODE_NXRRSET = 0x8, 58 DNS_RCODE_NOTAUTH = 0x9, 59 DNS_RCODE_NOTZONE = 0xA 49 DNS_RCODE_OK = 0x00, 50 DNS_RCODE_FORMERR = 0x01, 51 DNS_RCODE_SERVFAIL = 0x02, 52 DNS_RCODE_NXDOMAIN = 0x03, 53 DNS_RCODE_NOTIMP = 0x04, 54 DNS_RCODE_REFUSED = 0x05, 55 DNS_RCODE_YXDOMAIN = 0x06, 56 DNS_RCODE_YXRRSET = 0x07, 57 DNS_RCODE_NXRRSET = 0x08, 58 DNS_RCODE_NOTAUTH = 0x09, 59 DNS_RCODE_NOTZONE = 0x0A, 60 DNS_RCODE_BADSIG = 0x10, 61 DNS_RCODE_BADKEY = 0x11, 62 DNS_RCODE_BADTIME = 0x12, 63 DNS_RCODE_BADMODE = 0x13, 64 DNS_RCODE_BADNAME = 0x14, 65 DNS_RCODE_BADALG = 0x15 60 66 } dns_rcode; 61 67 62 68 typedef [public,enum16bit] enum { 63 DNS_QCLASS_I P= 0x0001,69 DNS_QCLASS_IN = 0x0001, 64 70 DNS_QCLASS_NONE = 0x00FE, 65 71 DNS_QCLASS_ANY = 0x00FF … … 101 107 DNS_QTYPE_NAPTR = 0x0023, 102 108 DNS_QTYPE_DNAME = 0x0027, 109 DNS_QTYPE_OPT = 0x0029, 103 110 DNS_QTYPE_DS = 0x002B, 104 111 DNS_QTYPE_RRSIG = 0x002E, … … 106 113 DNS_QTYPE_DNSKEY = 0x0030, 107 114 DNS_QTYPE_DHCID = 0x0031, 108 DNS_QTYPE_ALL = 0x00FF, 109 DNS_QTYPE_WINS = 0xFF01, 110 DNS_QTYPE_WINSR = 0xFF02 115 DNS_QTYPE_TKEY = 0x00F9, 116 DNS_QTYPE_TSIG = 0x00FA, 117 DNS_QTYPE_AXFR = 0x00FC, 118 DNS_QTYPE_MAILB = 0x00FD, 119 DNS_QTYPE_MAILA = 0x00FE, 120 DNS_QTYPE_ALL = 0x00FF 111 121 } dns_qtype; 122 123 typedef [public,enum16bit] enum { 124 DNS_TKEY_MODE_NULL = 0x0000, 125 DNS_TKEY_MODE_SERVER = 0x0001, 126 DNS_TKEY_MODE_DH = 0x0002, 127 DNS_TKEY_MODE_GSSAPI = 0x0003, 128 DNS_TKEY_MODE_CLIENT = 0x0004, 129 DNS_TKEY_MODE_DELETE = 0x0005, 130 DNS_TKEY_MODE_LAST = 0xFFFF 131 } dns_tkey_mode; 112 132 113 133 typedef [public] struct { … … 133 153 134 154 typedef [public] struct { 155 uint16 preference; 156 dns_string exchange; 157 } dns_mx_record; 158 159 typedef [public,nopull] struct { 160 dnsp_string_list txt; 161 } dns_txt_record; 162 163 typedef [public] struct { 164 dns_string mbox; 165 dns_string txt; 166 167 } dns_rp_record; 168 169 typedef [public] struct { 135 170 uint16 priority; 136 171 uint16 weight; … … 140 175 141 176 typedef [public] struct { 142 uint16 preference; 143 dns_string exchange; 144 } dns_mx_record; 177 uint16 option_code; 178 uint16 option_length; 179 uint8 option_data[option_length]; 180 } dns_opt_record; 181 182 typedef [public] struct { 183 dns_string algorithm; 184 uint32 inception; 185 uint32 expiration; 186 dns_tkey_mode mode; 187 uint16 error; 188 uint16 key_size; 189 uint8 key_data[key_size]; 190 uint16 other_size; 191 uint8 other_data[other_size]; 192 } dns_tkey_record; 193 194 typedef [public] struct { 195 dns_string algorithm_name; 196 uint16 time_prefix; /* 0 until February 2106*/ 197 uint32 time; 198 uint16 fudge; 199 uint16 mac_size; 200 uint8 mac[mac_size]; 201 uint16 original_id; 202 uint16 error; 203 uint16 other_size; 204 uint8 other_data[other_size]; 205 } dns_tsig_record; 206 207 typedef [flag(NDR_NOALIGN|NDR_BIG_ENDIAN|NDR_PAHEX),public] struct { 208 dns_string name; 209 dns_qclass rr_class; 210 uint32 ttl; 211 dns_string algorithm_name; 212 uint16 time_prefix; /* 0 until February 2106*/ 213 uint32 time; 214 uint16 fudge; 215 uint16 original_id; 216 uint16 error; 217 uint16 other_size; 218 uint8 other_data[other_size]; 219 } dns_fake_tsig_rec; 145 220 146 221 typedef [nodiscriminant,public,flag(NDR_NOALIGN)] union { … … 150 225 [case(DNS_QTYPE_SOA)] dns_soa_record soa_record; 151 226 [case(DNS_QTYPE_PTR)] dns_string ptr_record; 227 [case(DNS_QTYPE_HINFO)] dnsp_hinfo hinfo_record; 152 228 [case(DNS_QTYPE_MX)] dns_mx_record mx_record; 229 [case(DNS_QTYPE_TXT)] dns_txt_record txt_record; 230 [case(DNS_QTYPE_RP)] dns_rp_record rp_record; 153 231 [case(DNS_QTYPE_AAAA)] ipv6address ipv6_record; 154 232 [case(DNS_QTYPE_SRV)] dns_srv_record srv_record; 233 [case(DNS_QTYPE_OPT)] dns_opt_record opt_record; 234 [case(DNS_QTYPE_TSIG)] dns_tsig_record tsig_record; 235 [case(DNS_QTYPE_TKEY)] dns_tkey_record tkey_record; 155 236 [default]; 156 237 } dns_rdata; … … 182 263 this is a convenience hook for ndrdump 183 264 */ 184 void decode_dns_name_packet(265 [nopython] void decode_dns_name_packet( 185 266 [in] dns_name_packet packet 186 267 ); -
vendor/current/librpc/idl/dnsp.idl
r740 r988 24 24 interface dnsp 25 25 { 26 typedef [enum16bit ] enum {26 typedef [enum16bit,public] enum { 27 27 DNS_TYPE_TOMBSTONE = 0x0, 28 28 DNS_TYPE_A = 0x1, … … 66 66 } dns_record_type; 67 67 68 typedef [bitmap32bit] bitmap { 69 DNS_RPC_FLAG_SUPPRESS_NOTIFY = 0x00010000, 70 DNS_RPC_FLAG_AGING_ON = 0x00020000, 71 DNS_RPC_FLAG_OPEN_ACL = 0x00040000, 72 DNS_RPC_FLAG_NODE_COMPLETE = 0x00800000, 73 DNS_RPC_FLAG_NODE_STICKY = 0x01000000, 74 DNS_RPC_FLAG_RECORD_CREATE_PTR = 0x02000000, 75 DNS_RPC_FLAG_RECORD_TTL_CHANGE = 0x04000000, 76 DNS_RPC_FLAG_RECORD_DEFAULT_TTL = 0x08000000, 77 DNS_RPC_FLAG_ZONE_DELEGATION = 0x10000000, 78 DNS_RPC_FLAG_AUTH_ZONE_ROOT = 0x20000000, 79 DNS_RPC_FLAG_ZONE_ROOT = 0x40000000, 80 DNS_RPC_FLAG_CACHE_DATA = 0x80000000 81 } 82 dns_rpc_node_flags; 83 84 68 85 typedef [enum8bit] enum { 69 86 DNS_RANK_NONE = 0x00, … … 82 99 } dns_record_rank; 83 100 101 typedef [v1_enum] enum { 102 DNS_ZONE_TYPE_CACHE = 0x00, 103 DNS_ZONE_TYPE_PRIMARY = 0x01, 104 DNS_ZONE_TYPE_SECONDARY = 0x02, 105 DNS_ZONE_TYPE_STUB = 0x03, 106 DNS_ZONE_TYPE_FORWARDER = 0x04, 107 DNS_ZONE_TYPE_SECONDARY_CACHE = 0x05 108 } dns_zone_type; 109 110 typedef [public,enum8bit] enum { 111 DNS_ZONE_UPDATE_OFF = 0x00, 112 DNS_ZONE_UPDATE_UNSECURE = 0x01, 113 DNS_ZONE_UPDATE_SECURE = 0x02 114 } dns_zone_update; 115 116 typedef [v1_enum] enum { 117 DSPROPERTY_ZONE_EMPTY = 0x00, 118 DSPROPERTY_ZONE_TYPE = 0x01, 119 DSPROPERTY_ZONE_ALLOW_UPDATE = 0x02, 120 DSPROPERTY_ZONE_SECURE_TIME = 0x08, 121 DSPROPERTY_ZONE_NOREFRESH_INTERVAL = 0x10, 122 DSPROPERTY_ZONE_SCAVENGING_SERVERS = 0x11, 123 DSPROPERTY_ZONE_AGING_ENABLED_TIME = 0x12, 124 DSPROPERTY_ZONE_REFRESH_INTERVAL = 0x20, 125 DSPROPERTY_ZONE_AGING_STATE = 0x40, 126 DSPROPERTY_ZONE_DELETED_FROM_HOSTNAME = 0x80, 127 DSPROPERTY_ZONE_MASTER_SERVERS = 0x81, 128 DSPROPERTY_ZONE_AUTO_NS_SERVERS = 0x82, 129 DSPROPERTY_ZONE_DCPROMO_CONVERT = 0x83, 130 DSPROPERTY_ZONE_SCAVENGING_SERVERS_DA = 0x90, 131 DSPROPERTY_ZONE_MASTER_SERVERS_DA = 0x91, 132 DSPROPERTY_ZONE_NS_SERVERS_DA = 0x92, 133 DSPROPERTY_ZONE_NODE_DBFLAGS = 0x100 134 135 } dns_property_id; 136 137 typedef [enum8bit] enum { 138 DCPROMO_CONVERT_NONE = 0x00, 139 DCPROMO_CONVERT_DOMAIN = 0x01, 140 DCPROMO_CONVERT_FOREST = 0x02 141 } dns_dcpromo_flag; 142 84 143 typedef [public] struct { 85 144 uint32 serial; … … 109 168 } dnsp_srv; 110 169 170 typedef struct { 171 uint32 addrCount; 172 [size_is(addrCount)] uint32 *addr; 173 } dnsp_ip4_array; 174 175 typedef struct { 176 uint16 family; 177 uint16 port; 178 ipv4address ipv4; 179 ipv6address ipv6; 180 uint8 pad[8]; 181 uint32 unused[8]; 182 } dnsp_dns_addr; 183 184 typedef [public] struct { 185 uint32 MaxCount; 186 uint32 AddrCount; 187 uint32 Tag; 188 uint16 Family; 189 uint16 Reserved0; 190 uint32 MatchFlag; 191 uint32 Reserved1; 192 uint32 Reserved2; 193 dnsp_dns_addr AddrArray[AddrCount]; 194 } dnsp_dns_addr_array; 195 196 typedef [public,nopull,nopush,noprint,gensize] struct { 197 uint8 count; 198 dnsp_string str[count]; 199 } dnsp_string_list; 200 111 201 typedef [nodiscriminant,gensize] union { 112 202 [case(DNS_TYPE_TOMBSTONE)] NTTIME timestamp; … … 116 206 [case(DNS_TYPE_SOA)] [flag(NDR_BIG_ENDIAN)] dnsp_soa soa; 117 207 [case(DNS_TYPE_MX)] [flag(NDR_BIG_ENDIAN)] dnsp_mx mx; 118 [case(DNS_TYPE_TXT)] dnsp_string txt;208 [case(DNS_TYPE_TXT)] dnsp_string_list txt; 119 209 [case(DNS_TYPE_PTR)] dnsp_name ptr; 120 210 [case(DNS_TYPE_HINFO)] dnsp_hinfo hinfo; … … 133 223 uint16 flags; 134 224 uint32 dwSerial; 135 225 [flag(NDR_BIG_ENDIAN)] uint32 dwTtlSeconds; 136 226 uint32 dwReserved; 137 227 uint32 dwTimeStamp; … … 139 229 } dnsp_DnssrvRpcRecord; 140 230 231 typedef [nodiscriminant,gensize] union { 232 [case(DSPROPERTY_ZONE_EMPTY)] ; 233 [case(DSPROPERTY_ZONE_TYPE)] dns_zone_type zone_type; 234 [case(DSPROPERTY_ZONE_ALLOW_UPDATE)] dns_zone_update allow_update_flag; 235 [case(DSPROPERTY_ZONE_SECURE_TIME)] NTTIME zone_secure_time; 236 [case(DSPROPERTY_ZONE_NOREFRESH_INTERVAL)] uint32 norefresh_hours; 237 [case(DSPROPERTY_ZONE_REFRESH_INTERVAL)] uint32 refresh_hours; 238 [case(DSPROPERTY_ZONE_AGING_STATE)] uint32 aging_enabled; 239 [case(DSPROPERTY_ZONE_SCAVENGING_SERVERS)] dnsp_ip4_array servers; 240 [case(DSPROPERTY_ZONE_AGING_ENABLED_TIME)] uint32 next_scavenging_cycle_hours; 241 [case(DSPROPERTY_ZONE_DELETED_FROM_HOSTNAME)] utf8string deleted_by_hostname; 242 [case(DSPROPERTY_ZONE_MASTER_SERVERS)] dnsp_ip4_array master_servers; 243 [case(DSPROPERTY_ZONE_AUTO_NS_SERVERS)] dnsp_ip4_array ns_servers; 244 [case(DSPROPERTY_ZONE_DCPROMO_CONVERT)] dns_dcpromo_flag dcpromo_flag; 245 [case(DSPROPERTY_ZONE_SCAVENGING_SERVERS_DA)] dnsp_dns_addr_array s_ns_servers; 246 [case(DSPROPERTY_ZONE_MASTER_SERVERS_DA)] dnsp_dns_addr_array z_master_servers; 247 [case(DSPROPERTY_ZONE_NS_SERVERS_DA)] dnsp_dns_addr_array d_ns_servers; 248 [case(DSPROPERTY_ZONE_NODE_DBFLAGS)] dns_rpc_node_flags flags; 249 } dnsPropertyData; 250 251 /* this is the format for the dnsProperty attribute in the DNS 252 partitions in AD */ 253 typedef [flag(NDR_NOALIGN),public] struct { 254 [value(ndr_size_dnsPropertyData(&data,id,ndr->flags))] uint32 wDataLength; 255 uint32 namelength; 256 [value(0)] uint32 flag; 257 [value(1)] uint32 version; 258 dns_property_id id; 259 [switch_is(wDataLength?id:DSPROPERTY_ZONE_EMPTY)] dnsPropertyData data; 260 uint32 name; 261 } dnsp_DnsProperty; 141 262 142 263 /* 143 th is is a convenience hookfor ndrdump264 these are convenience hooks for ndrdump 144 265 */ 145 void decode_DnssrvRpcRecord(266 [nopython] void decode_DnssrvRpcRecord( 146 267 [in] dnsp_DnssrvRpcRecord blob 147 268 ); 269 270 [nopython] void decode_DnsProperty( 271 [in] dnsp_DnsProperty blob 272 ); 148 273 } -
vendor/current/librpc/idl/dnsserver.idl
r414 r988 1 #include "idl_types.h" 1 2 /* 2 3 dnsserver interface definition 4 for a protocol descrition see [MS-DNSP].pdf 3 5 */ 6 7 import "misc.idl", "dnsp.idl"; 4 8 5 9 [ uuid("50abc2a4-574d-40b3-9d66-ee4fd5fba076"), 6 10 version(5.0), 7 11 pointer_default(unique), 8 helpstring("DNS Server") 12 endpoint("ncacn_ip_tcp:", "ncacn_np:[\\pipe\\dnsserver]"), 13 helper("../librpc/ndr/ndr_dnsserver.h"), 14 helpstring("DNS Management Server") 9 15 ] interface dnsserver 10 16 { 11 void dnsserver_foo(); 17 18 #define wchar_t uint16 19 #define BOOLEAN boolean8 20 #define BOOL boolean32 21 #define BYTE uint8 22 #define UCHAR uint8 23 #define CHAR char 24 #define PBYTE BYTE* 25 #define DWORD uint32 26 #define PDWORD uint32 * 27 28 /* */ 29 /* DNS RPC data types */ 30 /* */ 31 32 typedef [v1_enum] enum { 33 DNS_RPC_USE_TCPIP = 0x00000001, 34 DNS_RPC_USE_NAMED_PIPE = 0x00000002, 35 DNS_RPC_USE_LPC = 0x00000004, 36 DNS_RPC_USE_ALL_PROTOCOLS = 0xFFFFFFFF 37 } 38 DNS_RPC_PROTOCOLS; 39 40 typedef [v1_enum] enum { 41 DNS_CLIENT_VERSION_W2K = 0x00000000, 42 DNS_CLIENT_VERSION_DOTNET = 0x00060000, 43 DNS_CLIENT_VERSION_LONGHORN = 0x00070000 44 } 45 DNS_RPC_CLIENT_VERSION; 46 47 /* Return buffer */ 48 typedef struct { 49 DWORD dwLength; 50 [size_is(dwLength)] BYTE Buffer[]; 51 } DNS_RPC_BUFFER; 52 53 /* String Array */ 54 typedef struct { 55 [range(0,10000)] DWORD dwCount; 56 [size_is(dwCount),string,charset(UTF8)] char * pszStrings[]; 57 } DNS_RPC_UTF8_STRING_LIST; 58 59 /* Name and parameter value */ 60 typedef struct { 61 DWORD dwParam; 62 [string, charset(UTF8)] char * pszNodeName; 63 } 64 DNS_RPC_NAME_AND_PARAM; 65 66 67 /* */ 68 /* DNS Resource Record data types */ 69 /* */ 70 71 /* DNS_RECORD_TYPE is defined in dnsp.idl as dns_record_type */ 72 /* DNS_RPC_NODE_FLAGS is defined in dnsp.idl as dns_rpc_node_flags */ 73 74 typedef [public,gensize] struct { 75 [value(strlen(str))] uint8 len; 76 [charset(UNIX)] uint8 str[len]; 77 } 78 DNS_RPC_NAME; 79 80 typedef struct { 81 uint16 wLength; 82 uint16 wRecordCount; 83 uint32 dwFlags; 84 uint32 dwChildCount; 85 DNS_RPC_NAME dnsNodeName; 86 } 87 DNS_RPC_NODE; 88 89 typedef struct { 90 uint32 dwSerialNo; 91 uint32 dwRefresh; 92 uint32 dwRetry; 93 uint32 dwExpire; 94 uint32 dwMinimumTtl; 95 DNS_RPC_NAME NamePrimaryServer; 96 DNS_RPC_NAME ZoneAdministratorEmail; 97 } 98 DNS_RPC_RECORD_SOA; 99 100 typedef struct { 101 uint16 wPreference; 102 DNS_RPC_NAME nameExchange; 103 } 104 DNS_RPC_RECORD_NAME_PREFERENCE; 105 106 typedef [nopull,nopush] struct { 107 uint8 count; 108 DNS_RPC_NAME str[count]; 109 } 110 DNS_RPC_RECORD_STRING; 111 112 typedef struct { 113 uint16 wPriority; 114 uint16 wWeight; 115 uint16 wPort; 116 DNS_RPC_NAME nameTarget; 117 } 118 DNS_RPC_RECORD_SRV; 119 120 typedef [nodiscriminant,gensize,flag(NDR_NOALIGN)] union { 121 [case(DNS_TYPE_TOMBSTONE)] NTTIME timestamp; 122 [case(DNS_TYPE_A)] [flag(NDR_BIG_ENDIAN)] ipv4address ipv4; 123 [case(DNS_TYPE_NS)] DNS_RPC_NAME name; 124 [case(DNS_TYPE_MD)] DNS_RPC_NAME name; 125 [case(DNS_TYPE_MF)] DNS_RPC_NAME name; 126 [case(DNS_TYPE_CNAME)] DNS_RPC_NAME name; 127 [case(DNS_TYPE_SOA)] DNS_RPC_RECORD_SOA soa; 128 [case(DNS_TYPE_MB)] DNS_RPC_NAME name; 129 [case(DNS_TYPE_MG)] DNS_RPC_NAME name; 130 [case(DNS_TYPE_MR)] DNS_RPC_NAME name; 131 [case(DNS_TYPE_PTR)] DNS_RPC_NAME ptr; 132 [case(DNS_TYPE_HINFO)] DNS_RPC_NAME hinfo; 133 [case(DNS_TYPE_MX)] DNS_RPC_RECORD_NAME_PREFERENCE mx; 134 [case(DNS_TYPE_TXT)] DNS_RPC_RECORD_STRING txt; 135 [case(DNS_TYPE_AAAA)] ipv6address ipv6; 136 [case(DNS_TYPE_SRV)] DNS_RPC_RECORD_SRV srv; 137 [case(DNS_TYPE_DNAME)] DNS_RPC_NAME name; 138 } 139 DNS_RPC_DATA; 140 141 typedef [public] struct { 142 [value(ndr_size_DNS_RPC_DATA(&data,wType,0))] uint16 wDataLength; 143 dns_record_type wType; 144 DWORD dwFlags; 145 DWORD dwSerial; 146 DWORD dwTtlSeconds; 147 DWORD dwTimeStamp; 148 DWORD dwReserved; 149 [subcontext(0),subcontext_size(wDataLength),switch_is(wType)] DNS_RPC_DATA data; 150 } 151 DNS_RPC_RECORD; 152 153 typedef struct { 154 [value(ndr_size_DNS_RPC_DATA(&rec.data,rec.wType,0))] uint3264 wContextLength; 155 DNS_RPC_RECORD rec; 156 } 157 DNS_RPC_RECORD_BUF; 158 159 160 /* */ 161 /* DNS Address Information data types */ 162 /* */ 163 164 typedef [v1_enum] enum { 165 DNS_IPVAL_DNS_SERVERS = 0x00, 166 DNS_IPVAL_DNS_ROOTHINTS = 0x01, 167 DNS_IPVAL_DNS_FORWARDERS = 0x02, 168 DNS_IPVAL_DNS_ZONE_MASTERS = 0x03, 169 DNS_IPVAL_DNS_DELEGATIONS = 0x04 170 } 171 DNS_IPVAL_CONTEXT; 172 173 typedef [v1_enum] enum { 174 ERROR_SUCCESS = 0x00, 175 DNS_IPVAL_INVALID_ADDR = 0x01, 176 DNS_IPVAL_UNREACHABLE = 0x02, 177 DNS_IPVAL_NO_RESPONSE = 0x03, 178 DNS_IPVAL_NOT_AUTH_FOR_ZONE = 0x04, 179 DNS_IPVAL_UNKNOWN_ERROR = 0xFF, 180 DNS_IPVAL_NO_TCP = 0x80000000 181 } 182 DNS_IP_VALIDATE_RETURN_FLAGS; 183 184 typedef struct { 185 DWORD AddrCount; 186 [size_is( AddrCount )] DWORD AddrArray[]; 187 } IP4_ARRAY; 188 #define PIP4_ARRAY IP4_ARRAY* 189 190 typedef struct { 191 CHAR MaxSa[32]; 192 DWORD DnsAddrUserDword[8]; 193 } DNS_ADDR; 194 195 typedef struct { 196 DWORD MaxCount; 197 DWORD AddrCount; 198 DWORD Tag; 199 WORD Family; 200 WORD WordReserved; 201 DWORD Flags; 202 DWORD MatchFlag; 203 DWORD Reserved1; 204 DWORD Reserved2; 205 [size_is( AddrCount )] DNS_ADDR AddrArray[]; 206 } DNS_ADDR_ARRAY; 207 #define PDNS_ADDR_ARRAY DNS_ADDR_ARRAY* 208 209 typedef struct { 210 DWORD dwRpcStructureVersion; 211 DWORD dwReserved0; 212 DWORD dwContext; 213 DWORD dwReserved1; 214 [string, charset(UTF8)] char * pszContextName; 215 PDNS_ADDR_ARRAY aipValidateAddrs; 216 } 217 DNS_RPC_IP_VALIDATE; 218 219 220 /* */ 221 /* DNS Server data types */ 222 /* */ 223 224 typedef [enum8bit] enum { 225 DNS_BOOT_METHOD_UNINITIALIZED = 0x00, 226 DNS_BOOT_METHOD_FILE = 0x01, 227 DNS_BOOT_METHOD_REGISTRY = 0x02, 228 DNS_BOOT_METHOD_DIRECTORY = 0x03 229 } 230 DNS_BOOT_METHOD; 231 232 typedef [v1_enum] enum { 233 DNS_ALLOW_RFC_NAMES_ONLY = 0x00, 234 DNS_ALLOW_NONRFC_NAMES = 0x01, 235 DNS_ALLOW_MULTIBYTE_NAMES = 0x02, 236 DNS_ALLOW_ALL_NAMES = 0x03 237 } 238 DNS_NAME_CHECK_FLAG; 239 240 typedef struct { 241 /* version */ 242 /* basic configuration flags */ 243 244 DWORD dwVersion; 245 DNS_BOOT_METHOD fBootMethod; 246 BOOLEAN fAdminConfigured; 247 BOOLEAN fAllowUpdate; 248 BOOLEAN fDsAvailable; 249 250 /* pointer section */ 251 252 [string, charset(UTF8)] char * pszServerName; 253 254 /* DS container */ 255 256 [string, charset(UTF16)] wchar_t * pszDsContainer; 257 258 /* IP interfaces */ 259 260 PIP4_ARRAY aipServerAddrs; 261 PIP4_ARRAY aipListenAddrs; 262 263 /* forwarders */ 264 265 PIP4_ARRAY aipForwarders; 266 267 /* future extensions */ 268 269 PDWORD pExtension1; 270 PDWORD pExtension2; 271 PDWORD pExtension3; 272 PDWORD pExtension4; 273 PDWORD pExtension5; 274 275 /* DWORD section */ 276 277 /* logging */ 278 279 DWORD dwLogLevel; 280 DWORD dwDebugLevel; 281 282 /* configuration DWORDs */ 283 284 DWORD dwForwardTimeout; 285 DWORD dwRpcProtocol; 286 DNS_NAME_CHECK_FLAG dwNameCheckFlag; 287 DWORD cAddressAnswerLimit; 288 DWORD dwRecursionRetry; 289 DWORD dwRecursionTimeout; 290 DWORD dwMaxCacheTtl; 291 DWORD dwDsPollingInterval; 292 293 /* aging / scavenging */ 294 295 DWORD dwScavengingInterval; 296 DWORD dwDefaultRefreshInterval; 297 DWORD dwDefaultNoRefreshInterval; 298 299 DWORD dwReserveArray[10]; 300 301 /* BYTE section */ 302 303 /* configuration flags */ 304 305 BOOLEAN fAutoReverseZones; 306 BOOLEAN fAutoCacheUpdate; 307 308 /* recursion control */ 309 310 BOOLEAN fRecurseAfterForwarding; 311 BOOLEAN fForwardDelegations; 312 BOOLEAN fNoRecursion; 313 BOOLEAN fSecureResponses; 314 315 /* lookup control */ 316 317 BOOLEAN fRoundRobin; 318 BOOLEAN fLocalNetPriority; 319 320 /* BIND compatibility and mimicking */ 321 322 BOOLEAN fBindSecondaries; 323 BOOLEAN fWriteAuthorityNs; 324 325 /* Bells and whistles */ 326 327 BOOLEAN fStrictFileParsing; 328 BOOLEAN fLooseWildcarding; 329 330 /* aging / scavenging */ 331 332 BOOLEAN fDefaultAgingState; 333 BOOLEAN fReserveArray[15]; 334 } 335 DNS_RPC_SERVER_INFO_W2K; 336 337 typedef struct { 338 [string, charset(UTF8)] uint8 *extension; 339 } DNS_EXTENSION; 340 341 typedef [public] struct { 342 DWORD dwRpcStructureVersion; 343 DWORD dwReserved0; 344 345 /* basic configuration flags */ 346 347 DWORD dwVersion; 348 DNS_BOOT_METHOD fBootMethod; 349 BOOLEAN fAdminConfigured; 350 BOOLEAN fAllowUpdate; 351 BOOLEAN fDsAvailable; 352 353 /* pointer section */ 354 355 [string, charset(UTF8)] char * pszServerName; 356 357 /* DS container */ 358 359 [string, charset(UTF16)] wchar_t * pszDsContainer; 360 361 /* IP interfaces */ 362 363 PIP4_ARRAY aipServerAddrs; 364 PIP4_ARRAY aipListenAddrs; 365 366 /* forwarders */ 367 368 PIP4_ARRAY aipForwarders; 369 370 /* logging */ 371 372 PIP4_ARRAY aipLogFilter; 373 [string, charset(UTF16)] wchar_t * pwszLogFilePath; 374 375 /* Server domain/forest */ 376 377 [string, charset(UTF8)] char * pszDomainName; /* UTF-8 FQDN */ 378 [string, charset(UTF8)] char * pszForestName; /* UTF-8 FQDN */ 379 380 /* Built-in directory partitions */ 381 382 [string, charset(UTF8)] char * pszDomainDirectoryPartition; /* UTF-8 FQDN */ 383 [string, charset(UTF8)] char * pszForestDirectoryPartition; /* UTF-8 FQDN */ 384 385 /* future extensions */ 386 DNS_EXTENSION pExtensions[6]; 387 388 /* DWORD section */ 389 390 /* logging */ 391 392 DWORD dwLogLevel; 393 DWORD dwDebugLevel; 394 395 /* configuration DWORDs */ 396 397 DWORD dwForwardTimeout; 398 DWORD dwRpcProtocol; 399 DNS_NAME_CHECK_FLAG dwNameCheckFlag; 400 DWORD cAddressAnswerLimit; 401 DWORD dwRecursionRetry; 402 DWORD dwRecursionTimeout; 403 DWORD dwMaxCacheTtl; 404 DWORD dwDsPollingInterval; 405 DWORD dwLocalNetPriorityNetMask; 406 407 /* aging and scavenging */ 408 409 DWORD dwScavengingInterval; 410 DWORD dwDefaultRefreshInterval; 411 DWORD dwDefaultNoRefreshInterval; 412 DWORD dwLastScavengeTime; 413 414 /* more logging */ 415 416 DWORD dwEventLogLevel; 417 DWORD dwLogFileMaxSize; 418 419 /* Active Directory information */ 420 421 DWORD dwDsForestVersion; 422 DWORD dwDsDomainVersion; 423 DWORD dwDsDsaVersion; 424 425 DWORD dwReserveArray[ 4 ]; 426 427 /* BYTE section */ 428 429 /* configuration flags */ 430 431 BOOLEAN fAutoReverseZones; 432 BOOLEAN fAutoCacheUpdate; 433 434 /* recursion control */ 435 436 BOOLEAN fRecurseAfterForwarding; 437 BOOLEAN fForwardDelegations; 438 BOOLEAN fNoRecursion; 439 BOOLEAN fSecureResponses; 440 441 /* lookup control */ 442 443 BOOLEAN fRoundRobin; 444 BOOLEAN fLocalNetPriority; 445 446 /* BIND compatibility and mimicking */ 447 448 BOOLEAN fBindSecondaries; 449 BOOLEAN fWriteAuthorityNs; 450 451 /* Bells and whistles */ 452 453 BOOLEAN fStrictFileParsing; 454 BOOLEAN fLooseWildcarding; 455 456 /* aging \ scavenging */ 457 458 BOOLEAN fDefaultAgingState; 459 460 BOOLEAN fReserveArray[ 15 ]; 461 } 462 DNS_RPC_SERVER_INFO_DOTNET; 463 464 typedef [public] struct { 465 DWORD dwRpcStructureVersion; 466 DWORD dwReserved0; 467 468 /* basic configuration flags */ 469 470 DWORD dwVersion; 471 DNS_BOOT_METHOD fBootMethod; 472 BOOLEAN fAdminConfigured; 473 BOOLEAN fAllowUpdate; 474 BOOLEAN fDsAvailable; 475 476 /* pointer section */ 477 478 [string, charset(UTF8)] char * pszServerName; 479 480 /* DS container */ 481 482 [string, charset(UTF16)] wchar_t * pszDsContainer; 483 484 /* IP interfaces */ 485 486 PDNS_ADDR_ARRAY aipServerAddrs; 487 PDNS_ADDR_ARRAY aipListenAddrs; 488 489 /* forwarders */ 490 491 PDNS_ADDR_ARRAY aipForwarders; 492 493 /* logging */ 494 495 PDNS_ADDR_ARRAY aipLogFilter; 496 [string, charset(UTF16)] wchar_t * pwszLogFilePath; 497 498 /* Server domain/forest */ 499 500 [string, charset(UTF8)] char * pszDomainName; /* UTF-8 FQDN */ 501 [string, charset(UTF8)] char * pszForestName; /* UTF-8 FQDN */ 502 503 /* Built-in directory partitions */ 504 505 [string, charset(UTF8)] char * pszDomainDirectoryPartition; /* UTF-8 FQDN */ 506 [string, charset(UTF8)] char * pszForestDirectoryPartition; /* UTF-8 FQDN */ 507 508 /* future extensions */ 509 DNS_EXTENSION pExtensions[6]; 510 511 /* DWORD section */ 512 513 /* logging */ 514 515 DWORD dwLogLevel; 516 DWORD dwDebugLevel; 517 518 /* configuration DWORDs */ 519 520 DWORD dwForwardTimeout; 521 DWORD dwRpcProtocol; 522 DNS_NAME_CHECK_FLAG dwNameCheckFlag; 523 DWORD cAddressAnswerLimit; 524 DWORD dwRecursionRetry; 525 DWORD dwRecursionTimeout; 526 DWORD dwMaxCacheTtl; 527 DWORD dwDsPollingInterval; 528 DWORD dwLocalNetPriorityNetMask; 529 530 /* aging and scavenging */ 531 532 DWORD dwScavengingInterval; 533 DWORD dwDefaultRefreshInterval; 534 DWORD dwDefaultNoRefreshInterval; 535 DWORD dwLastScavengeTime; 536 537 /* more logging */ 538 539 DWORD dwEventLogLevel; 540 DWORD dwLogFileMaxSize; 541 542 /* Active Directory information */ 543 544 DWORD dwDsForestVersion; 545 DWORD dwDsDomainVersion; 546 DWORD dwDsDsaVersion; 547 BOOLEAN fReadOnlyDC; 548 549 DWORD dwReserveArray[ 3 ]; 550 551 /* BYTE section */ 552 553 /* configuration flags */ 554 555 BOOLEAN fAutoReverseZones; 556 BOOLEAN fAutoCacheUpdate; 557 558 /* recursion control */ 559 560 BOOLEAN fRecurseAfterForwarding; 561 BOOLEAN fForwardDelegations; 562 BOOLEAN fNoRecursion; 563 BOOLEAN fSecureResponses; 564 565 /* lookup control */ 566 567 BOOLEAN fRoundRobin; 568 BOOLEAN fLocalNetPriority; 569 570 /* BIND compatibility and mimicking */ 571 572 BOOLEAN fBindSecondaries; 573 BOOLEAN fWriteAuthorityNs; 574 575 /* Bells and whistles */ 576 577 BOOLEAN fStrictFileParsing; 578 BOOLEAN fLooseWildcarding; 579 580 /* aging \ scavenging */ 581 582 BOOLEAN fDefaultAgingState; 583 584 BOOLEAN fReserveArray[ 15 ]; 585 } 586 DNS_RPC_SERVER_INFO_LONGHORN; 587 #define DNS_RPC_SERVER_INFO DNS_RPC_SERVER_INFO_LONGHORN 588 589 590 /* */ 591 /* DNS Application directory partition data types */ 592 /* */ 593 594 typedef [bitmap32bit] bitmap { 595 DNS_DP_AUTOCREATED = 0x00000001, 596 DNS_DP_LEGACY = 0x00000002, 597 DNS_DP_DOMAIN_DEFAULT = 0x00000004, 598 DNS_DP_FOREST_DEFAULT = 0x00000008, 599 DNS_DP_ENLISTED = 0x00000010, 600 DNS_DP_DELETED = 0x00000020 601 } 602 DNS_RPC_DP_FLAGS; 603 604 typedef struct { 605 [string, charset(UTF16)] wchar_t * pszReplicaDn; 606 } 607 DNS_RPC_DP_REPLICA; 608 #define PDNS_RPC_DP_REPLICA DNS_RPC_DP_REPLICA* 609 610 typedef [v1_enum] enum { 611 DNS_DP_OKAY = 0x00, 612 DNS_DP_STATE_REPL_INCOMING = 0x01, 613 DNS_DP_STATE_REPL_OUTGOING = 0x02, 614 DNS_DP_STATE_UNKNOWN = 0x03 615 } DNS_DP_STATE; 616 617 typedef struct { 618 DWORD dwRpcStructureVersion; 619 DWORD dwReserved0; 620 621 [string, charset(UTF8)] char * pszDpFqdn; 622 [string, charset(UTF16)] wchar_t * pszDpDn; 623 [string, charset(UTF16)] wchar_t * pszCrDn; 624 DWORD dwFlags; 625 DWORD dwZoneCount; 626 DNS_DP_STATE dwState; 627 628 DWORD dwReserved[ 3 ]; 629 DNS_EXTENSION pwszReserved[ 3 ]; 630 [range(0,10000)] DWORD dwReplicaCount; 631 [size_is(dwReplicaCount)] PDNS_RPC_DP_REPLICA ReplicaArray[]; 632 } 633 DNS_RPC_DP_INFO; 634 635 typedef struct { 636 DWORD dwRpcStructureVersion; 637 DWORD dwReserved0; 638 639 [string, charset(UTF8)] char * pszDpFqdn; 640 DWORD dwFlags; 641 DWORD dwZoneCount; 642 } 643 DNS_RPC_DP_ENUM; 644 #define PDNS_RPC_DP_ENUM DNS_RPC_DP_ENUM* 645 646 typedef struct { 647 DWORD dwRpcStructureVersion; 648 DWORD dwReserved0; 649 [range(0,5000)] DWORD dwDpCount; 650 [size_is(dwDpCount)] PDNS_RPC_DP_ENUM DpArray[]; 651 } 652 DNS_RPC_DP_LIST; 653 654 typedef struct { 655 DWORD dwRpcStructureVersion; 656 DWORD dwReserved0; 657 [string, charset(UTF8)] char * pszDpFqdn; /* UTF8 */ 658 DWORD dwOperation; 659 } 660 DNS_RPC_ENLIST_DP; 661 662 typedef struct { 663 DWORD dwRpcStructureVersion; 664 DWORD dwReserved0; 665 [string, charset(UTF8)] char * pszDestPartition; 666 } 667 DNS_RPC_ZONE_CHANGE_DP; 668 669 670 /* */ 671 /* DNS Zone data types */ 672 /* */ 673 674 /* DNS_ZONE_TYPE defined in dnsp as dns_zone_type */ 675 676 typedef [v1_enum] enum { 677 DNS_ZONE_SECSECURE_NO_SECURITY = 0x00, 678 DNS_ZONE_SECSECURE_NS_ONLY = 0x01, 679 DNS_ZONE_SECSECURE_LIST_ONLY = 0x02, 680 DNS_ZONE_SECSECURE_NO_XFER = 0x03 681 } 682 DNS_ZONE_SECONDARY_SECURITY; 683 684 typedef [v1_enum] enum { 685 DNS_ZONE_NOTIFY_OFF = 0x00, 686 DNS_ZONE_NOTIFY_ALL_SECONDARIES = 0x01, 687 DNS_ZONE_NOTIFY_LIST_ONLY = 0x02 688 } 689 DNS_ZONE_NOTIFY_LEVEL; 690 691 typedef [v1_enum] enum { 692 DNS_ZONE_REQUEST_PRIMARY = 0x00000001, 693 DNS_ZONE_REQUEST_SECONDARY = 0x00000002, 694 DNS_ZONE_REQUEST_CACHE = 0x00000004, 695 DNS_ZONE_REQUEST_AUTO = 0x00000008, 696 DNS_ZONE_REQUEST_FORWARD = 0x00000010, 697 DNS_ZONE_REQUEST_REVERSE = 0x00000020, 698 DNS_ZONE_REQUEST_FORWARDER = 0x00000040, 699 DNS_ZONE_REQUEST_STUB = 0x00000080, 700 DNS_ZONE_REQUEST_DS = 0x00000100, 701 DNS_ZONE_REQUEST_NON_DS = 0x00000200, 702 DNS_ZONE_REQUEST_DOMAIN_DP = 0x00000400, 703 DNS_ZONE_REQUEST_FOREST_DP = 0x00000800, 704 DNS_ZONE_REQUEST_CUSTOM_DP = 0x00001000, 705 DNS_ZONE_REQUEST_LEGACY_DP = 0x00002000 706 } 707 DNS_ZONE_REQUEST_FILTERS; 708 709 typedef [bitmap32bit] bitmap { 710 DNS_RPC_ZONE_PAUSED = 0x0001, 711 DNS_RPC_ZONE_SHUTDOWN = 0x0002, 712 DNS_RPC_ZONE_REVERSE = 0x0004, 713 DNS_RPC_ZONE_AUTOCREATED = 0x0008, 714 DNS_RPC_ZONE_DSINTEGRATED = 0x0010, 715 DNS_RPC_ZONE_AGING = 0x0020, 716 DNS_RPC_ZONE_UPDATE_UNSECURE = 0x0040, 717 DNS_RPC_ZONE_UPDATE_SECURE = 0x0080, 718 DNS_RPC_ZONE_READONLY = 0x0100 719 } DNS_RPC_ZONE_FLAGS; 720 721 typedef struct { 722 [string, charset(UTF16)] uint16 * pszZoneName; 723 DNS_RPC_ZONE_FLAGS Flags; 724 UCHAR ZoneType; 725 UCHAR Version; 726 } 727 DNS_RPC_ZONE_W2K; 728 #define PDNS_RPC_ZONE_W2K DNS_RPC_ZONE_W2K* 729 730 typedef struct { 731 DWORD dwRpcStructureVersion; 732 DWORD dwReserved0; 733 [string, charset(UTF16)] wchar_t * pszZoneName; 734 DNS_RPC_ZONE_FLAGS Flags; 735 UCHAR ZoneType; 736 UCHAR Version; 737 DNS_RPC_DP_FLAGS dwDpFlags; 738 [string, charset(UTF8)] char * pszDpFqdn; 739 } 740 DNS_RPC_ZONE_DOTNET; 741 #define DNS_RPC_ZONE DNS_RPC_ZONE_DOTNET 742 #define PDNS_RPC_ZONE_DOTNET DNS_RPC_ZONE_DOTNET* 743 744 /* Zone enumeration */ 745 typedef struct { 746 [range(0,500000)] DWORD dwZoneCount; 747 [size_is(dwZoneCount)] PDNS_RPC_ZONE_W2K ZoneArray[]; 748 } 749 DNS_RPC_ZONE_LIST_W2K; 750 751 typedef struct { 752 DWORD dwRpcStructureVersion; 753 DWORD dwReserved0; 754 [range(0,500000)] DWORD dwZoneCount; 755 [size_is(dwZoneCount)] PDNS_RPC_ZONE_DOTNET ZoneArray[]; 756 } 757 DNS_RPC_ZONE_LIST_DOTNET; 758 #define DNS_RPC_ZONE_LIST DNS_RPC_ZONE_LIST_DOTNET 759 760 /* Zone information */ 761 typedef struct { 762 [string, charset(UTF8)] char * pszZoneName; 763 DWORD dwZoneType; 764 BOOL fReverse; 765 dns_zone_update fAllowUpdate; 766 DWORD fPaused; 767 DWORD fShutdown; 768 DWORD fAutoCreated; 769 770 /* Database info */ 771 DWORD fUseDatabase; 772 [string, charset(UTF8)] char * pszDataFile; 773 774 /* Masters */ 775 PIP4_ARRAY aipMasters; 776 777 /* Secondaries */ 778 DNS_ZONE_SECONDARY_SECURITY fSecureSecondaries; 779 DNS_ZONE_NOTIFY_LEVEL fNotifyLevel; 780 PIP4_ARRAY aipSecondaries; 781 PIP4_ARRAY aipNotify; 782 783 /* WINS or NetBIOS lookup */ 784 BOOL fUseWins; 785 BOOL fUseNbstat; 786 787 /* Aging */ 788 BOOL fAging; 789 DWORD dwNoRefreshInterval; 790 DWORD dwRefreshInterval; 791 DWORD dwAvailForScavengeTime; 792 PIP4_ARRAY aipScavengeServers; 793 794 /* save some space, just in case */ 795 /* avoid versioning issues if possible */ 796 DWORD pvReserved1; 797 DWORD pvReserved2; 798 DWORD pvReserved3; 799 DWORD pvReserved4; 800 } 801 DNS_RPC_ZONE_INFO_W2K; 802 803 typedef struct { 804 DWORD dwRpcStructureVersion; 805 DWORD dwReserved0; 806 807 [string, charset(UTF8)] char * pszZoneName; 808 DWORD dwZoneType; 809 BOOL fReverse; 810 dns_zone_update fAllowUpdate; 811 DWORD fPaused; 812 DWORD fShutdown; 813 DWORD fAutoCreated; 814 815 /* Database info */ 816 DWORD fUseDatabase; 817 [string, charset(UTF8)] char * pszDataFile; 818 819 /* Masters */ 820 PIP4_ARRAY aipMasters; 821 822 /* Secondaries */ 823 DNS_ZONE_SECONDARY_SECURITY fSecureSecondaries; 824 DNS_ZONE_NOTIFY_LEVEL fNotifyLevel; 825 PIP4_ARRAY aipSecondaries; 826 PIP4_ARRAY aipNotify; 827 828 /* WINS or NetBIOS lookup */ 829 BOOL fUseWins; 830 BOOL fUseNbstat; 831 832 /* Aging */ 833 BOOL fAging; 834 DWORD dwNoRefreshInterval; 835 DWORD dwRefreshInterval; 836 DWORD dwAvailForScavengeTime; 837 PIP4_ARRAY aipScavengeServers; 838 839 /* Forwarder zones */ 840 DWORD dwForwarderTimeout; 841 DWORD fForwarderSlave; 842 843 /* Stub zones */ 844 PIP4_ARRAY aipLocalMasters; 845 846 /* Directory partition */ 847 DWORD dwDpFlags; 848 [string, charset(UTF8)] char * pszDpFqdn; 849 [string, charset(UTF16)] wchar_t * pwszZoneDn; 850 851 /* Xfr time information */ 852 DWORD dwLastSuccessfulSoaCheck; 853 DWORD dwLastSuccessfulXfr; 854 855 /* save some space, just in case */ 856 DWORD dwReserved1; 857 DWORD dwReserved2; 858 DWORD dwReserved3; 859 DWORD dwReserved4; 860 DWORD dwReserved5; 861 [string, charset(UTF8)] char * pReserved1; 862 [string, charset(UTF8)] char * pReserved2; 863 [string, charset(UTF8)] char * pReserved3; 864 [string, charset(UTF8)] char * pReserved4; 865 } 866 DNS_RPC_ZONE_INFO_DOTNET; 867 868 typedef struct { 869 DWORD dwRpcStructureVersion; 870 DWORD dwReserved0; 871 872 [string, charset(UTF8)] char * pszZoneName; 873 DWORD dwZoneType; 874 BOOL fReverse; 875 dns_zone_update fAllowUpdate; 876 DWORD fPaused; 877 DWORD fShutdown; 878 DWORD fAutoCreated; 879 880 /* Database info */ 881 DWORD fUseDatabase; 882 [string, charset(UTF8)] char * pszDataFile; 883 884 /* Masters */ 885 PDNS_ADDR_ARRAY aipMasters; 886 887 /* Secondaries */ 888 DNS_ZONE_SECONDARY_SECURITY fSecureSecondaries; 889 DNS_ZONE_NOTIFY_LEVEL fNotifyLevel; 890 PDNS_ADDR_ARRAY aipSecondaries; 891 PDNS_ADDR_ARRAY aipNotify; 892 893 /* WINS or NetBIOS lookup */ 894 BOOL fUseWins; 895 BOOL fUseNbstat; 896 897 /* Aging */ 898 BOOL fAging; 899 DWORD dwNoRefreshInterval; 900 DWORD dwRefreshInterval; 901 DWORD dwAvailForScavengeTime; 902 PDNS_ADDR_ARRAY aipScavengeServers; 903 904 /* Forwarder zones */ 905 DWORD dwForwarderTimeout; 906 DWORD fForwarderSlave; 907 908 /* Stub zones */ 909 PDNS_ADDR_ARRAY aipLocalMasters; 910 911 /* Directory partition */ 912 DWORD dwDpFlags; 913 [string, charset(UTF8)] char * pszDpFqdn; 914 [string, charset(UTF16)] wchar_t * pwszZoneDn; 915 /* Xfr time information */ 916 DWORD dwLastSuccessfulSoaCheck; 917 DWORD dwLastSuccessfulXfr; 918 919 DWORD fQueuedForBackgroundLoad; 920 DWORD fBackgroundLoadInProgress; 921 BOOL fReadOnlyZone; 922 923 /* Additional zone transfer information */ 924 DWORD dwLastXfrAttempt; 925 DWORD dwLastXfrResult; 926 } 927 DNS_RPC_ZONE_INFO_LONGHORN; 928 #define DNS_RPC_ZONE_INFO DNS_RPC_ZONE_INFO_LONGHORN 929 930 /* Zone property data */ 931 typedef struct { 932 DNS_ZONE_SECONDARY_SECURITY fSecureSecondaries; 933 DNS_ZONE_NOTIFY_LEVEL fNotifyLevel; 934 PIP4_ARRAY aipSecondaries; 935 PIP4_ARRAY aipNotify; 936 } 937 DNS_RPC_ZONE_SECONDARIES_W2K; 938 939 typedef struct { 940 DWORD dwRpcStructureVersion; 941 DWORD dwReserved0; 942 943 DNS_ZONE_SECONDARY_SECURITY fSecureSecondaries; 944 DNS_ZONE_NOTIFY_LEVEL fNotifyLevel; 945 PIP4_ARRAY aipSecondaries; 946 PIP4_ARRAY aipNotify; 947 } 948 DNS_RPC_ZONE_SECONDARIES_DOTNET; 949 950 typedef struct { 951 DWORD dwRpcStructureVersion; 952 DWORD dwReserved0; 953 954 DNS_ZONE_SECONDARY_SECURITY fSecureSecondaries; 955 DNS_ZONE_NOTIFY_LEVEL fNotifyLevel; 956 PDNS_ADDR_ARRAY aipSecondaries; 957 PDNS_ADDR_ARRAY aipNotify; 958 } 959 DNS_RPC_ZONE_SECONDARIES_LONGHORN; 960 #define DNS_RPC_ZONE_SECONDARIES DNS_RPC_ZONE_SECONDARIES_LONGHORN 961 962 /* Zone database */ 963 typedef struct { 964 DWORD fDsIntegrated; 965 [string, charset(UTF8)] char * pszFileName; 966 } 967 DNS_RPC_ZONE_DATABASE_W2K; 968 969 typedef struct { 970 DWORD dwRpcStructureVersion; 971 DWORD dwReserved0; 972 973 DWORD fDsIntegrated; 974 [string, charset(UTF8)] char * pszFileName; 975 } 976 DNS_RPC_ZONE_DATABASE_DOTNET; 977 #define DNS_RPC_ZONE_DATABASE DNS_RPC_ZONE_DATABASE_DOTNET 978 979 /* Zone create data */ 980 typedef struct { 981 [string, charset(UTF8)] char * pszZoneName; 982 DWORD dwZoneType; 983 dns_zone_update fAllowUpdate; 984 BOOL fAging; 985 DWORD dwFlags; 986 987 /* Database info */ 988 989 [string, charset(UTF8)] char * pszDataFile; 990 DWORD fDsIntegrated; 991 DWORD fLoadExisting; 992 993 /* Admin name (if auto-create SOA) */ 994 995 [string, charset(UTF8)] char * pszAdmin; 996 997 /* Masters (if secondary) */ 998 999 PIP4_ARRAY aipMasters; 1000 1001 /* Secondaries */ 1002 1003 PIP4_ARRAY aipSecondaries; 1004 DNS_ZONE_SECONDARY_SECURITY fSecureSecondaries; 1005 DNS_ZONE_NOTIFY_LEVEL fNotifyLevel; 1006 1007 /* Reserve some space to avoid versioning issues */ 1008 1009 [string, charset(UTF8)] char * pvReserved1; 1010 [string, charset(UTF8)] char * pvReserved2; 1011 [string, charset(UTF8)] char * pvReserved3; 1012 [string, charset(UTF8)] char * pvReserved4; 1013 [string, charset(UTF8)] char * pvReserved5; 1014 [string, charset(UTF8)] char * pvReserved6; 1015 [string, charset(UTF8)] char * pvReserved7; 1016 [string, charset(UTF8)] char * pvReserved8; 1017 DWORD dwReserved1; 1018 DWORD dwReserved2; 1019 DWORD dwReserved3; 1020 DWORD dwReserved4; 1021 DWORD dwReserved5; 1022 DWORD dwReserved6; 1023 DWORD dwReserved7; 1024 DWORD dwReserved8; 1025 } 1026 DNS_RPC_ZONE_CREATE_INFO_W2K; 1027 1028 typedef struct { 1029 DWORD dwRpcStructureVersion; 1030 DWORD dwReserved0; 1031 1032 [string, charset(UTF8)] char * pszZoneName; 1033 DWORD dwZoneType; 1034 dns_zone_update fAllowUpdate; 1035 BOOL fAging; 1036 DWORD dwFlags; 1037 1038 /* Database info */ 1039 1040 [string, charset(UTF8)] char * pszDataFile; 1041 DWORD fDsIntegrated; 1042 DWORD fLoadExisting; 1043 1044 /* Admin name (if auto-create SOA) */ 1045 1046 [string, charset(UTF8)] char * pszAdmin; 1047 1048 /* Masters (if secondary) */ 1049 1050 PIP4_ARRAY aipMasters; 1051 1052 /* Secondaries */ 1053 1054 PIP4_ARRAY aipSecondaries; 1055 DNS_ZONE_SECONDARY_SECURITY fSecureSecondaries; 1056 DNS_ZONE_NOTIFY_LEVEL fNotifyLevel; 1057 1058 /* Forwarder zones */ 1059 1060 DWORD dwTimeout; 1061 DWORD fRecurseAfterForwarding; 1062 1063 /* Directory partition */ 1064 1065 DWORD dwDpFlags; /* specify built-in DP or */ 1066 [string, charset(UTF8)] char * pszDpFqdn; /* UTF8 FQDN of partition */ 1067 1068 DWORD dwReserved[ 32 ]; 1069 } 1070 DNS_RPC_ZONE_CREATE_INFO_DOTNET; 1071 1072 typedef struct { 1073 DWORD dwRpcStructureVersion; 1074 DWORD dwReserved0; 1075 1076 [string, charset(UTF8)] char * pszZoneName; 1077 DWORD dwZoneType; 1078 dns_zone_update fAllowUpdate; 1079 BOOL fAging; 1080 DWORD dwFlags; 1081 1082 /* Database info */ 1083 1084 [string, charset(UTF8)] char * pszDataFile; 1085 DWORD fDsIntegrated; 1086 DWORD fLoadExisting; 1087 1088 /* Admin name (if auto-create SOA) */ 1089 1090 [string, charset(UTF8)] char * pszAdmin; 1091 1092 /* Masters (if secondary) */ 1093 1094 PDNS_ADDR_ARRAY aipMasters; 1095 1096 /* Secondaries */ 1097 1098 PDNS_ADDR_ARRAY aipSecondaries; 1099 DNS_ZONE_SECONDARY_SECURITY fSecureSecondaries; 1100 DNS_ZONE_NOTIFY_LEVEL fNotifyLevel; 1101 1102 /* Forwarder zones */ 1103 1104 DWORD dwTimeout; 1105 DWORD fRecurseAfterForwarding; 1106 1107 /* Directory partition */ 1108 1109 DWORD dwDpFlags; /* specify built-in DP or */ 1110 [string, charset(UTF8)] char * pszDpFqdn; /* UTF8 FQDN of partition */ 1111 1112 DWORD dwReserved[ 32 ]; 1113 } 1114 DNS_RPC_ZONE_CREATE_INFO_LONGHORN; 1115 #define DNS_RPC_ZONE_CREATE_INFO DNS_RPC_ZONE_CREATE_INFO_LONGHORN 1116 1117 /* Zone export */ 1118 typedef struct { 1119 DWORD dwRpcStructureVersion; 1120 DWORD dwReserved0; 1121 1122 [string, charset(UTF8)] char * pszZoneExportFile; 1123 } 1124 DNS_RPC_ZONE_EXPORT_INFO; 1125 1126 typedef struct { 1127 DWORD dwRpcStructureVersion; 1128 DWORD dwReserved0; 1129 1130 DWORD dwFilter; 1131 [string, charset(UTF8)] char * pszPartitionFqdn; 1132 [string, charset(UTF8)] char * pszQueryString; 1133 1134 DNS_EXTENSION pszReserved[ 6 ]; 1135 } 1136 DNS_RPC_ENUM_ZONES_FILTER; 1137 1138 /* Forwarders information */ 1139 typedef struct { 1140 DWORD fRecurseAfterForwarding; 1141 DWORD dwForwardTimeout; 1142 PIP4_ARRAY aipForwarders; 1143 } 1144 DNS_RPC_FORWARDERS_W2K; 1145 1146 typedef struct { 1147 DWORD dwRpcStructureVersion; 1148 DWORD dwReserved0; 1149 DWORD fRecurseAfterForwarding; 1150 DWORD dwForwardTimeout; 1151 PIP4_ARRAY aipForwarders; 1152 } 1153 DNS_RPC_FORWARDERS_DOTNET; 1154 1155 typedef struct { 1156 DWORD dwRpcStructureVersion; 1157 DWORD dwReserved0; 1158 DWORD fRecurseAfterForwarding; 1159 DWORD dwForwardTimeout; 1160 PDNS_ADDR_ARRAY aipForwarders; 1161 } 1162 DNS_RPC_FORWARDERS_LONGHORN; 1163 #define DNS_RPC_FORWARDERS DNS_RPC_FORWARDERS_LONGHORN 1164 1165 1166 /* */ 1167 /* DNS autoconfig data types */ 1168 /* */ 1169 1170 typedef [v1_enum] enum { 1171 DNS_RPC_AUTOCONFIG_INTERNAL_ROOTHINTS = 0x00000001, 1172 DNS_RPC_AUTOCONFIG_INTERNAL_FORWARDERS = 0x00000002, 1173 DNS_RPC_AUTOCONFIG_INTERNAL_ZONES = 0x00000004, 1174 DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT = 0x00000010, 1175 DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_PREPEND = 0x00000020, 1176 DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_APPEND = 0x00000040, 1177 DNS_RPC_AUTOCONFIG_INTERNAL_RETURN_ERROR = 0x00008000, 1178 DNS_RPC_AUTOCONFIG_ALL = 0xFFFFFFFF 1179 } 1180 DNS_RPC_AUTOCONFIG; 1181 1182 typedef struct { 1183 DWORD dwRpcStructureVersion; 1184 DWORD dwReserved0; 1185 DNS_RPC_AUTOCONFIG dwAutoConfigFlags; 1186 DWORD dwReserved1; 1187 [string, charset(UTF8)] char * pszNewDomainName; 1188 } 1189 DNS_RPC_AUTOCONFIGURE; 1190 1191 1192 /* */ 1193 /* DNS logging data types */ 1194 /* */ 1195 1196 typedef [bitmap32bit] bitmap { 1197 DNS_EVENT_LOG_SUCCESS = 0x00000000, 1198 DNS_EVENT_LOG_ERROR_TYPE = 0x00000001, 1199 DNS_EVENT_LOG_WARNING_TYPE = 0x00000002, 1200 DNS_EVENT_LOG_INFORMATION_TYPE = 0x00000004 1201 } 1202 DNS_EVENT_LOG_TYPES; 1203 1204 typedef [bitmap32bit] bitmap { 1205 DNS_RPC_VIEW_AUTHORITY_DATA = 0x00000001, 1206 DNS_RPC_VIEW_CACHE_DATA = 0x00000002, 1207 DNS_RPC_VIEW_GLUE_DATA = 0x00000004, 1208 DNS_RPC_VIEW_ROOT_HINT_DATA = 0x00000008, 1209 DNS_RPC_VIEW_ADDITIONAL_DATA = 0x00000010, 1210 DNS_RPC_VIEW_NO_CHILDREN = 0x00010000, 1211 DNS_RPC_VIEW_ONLY_CHILDREN = 0x00020000 1212 } 1213 DNS_SELECT_FLAGS; 1214 1215 1216 /* */ 1217 /* DNS statistics data types */ 1218 /* */ 1219 1220 typedef struct { 1221 DWORD StatId; 1222 WORD wLength; 1223 BOOLEAN fClear; 1224 UCHAR fReserved; 1225 } 1226 DNSSRV_STAT_HEADER; 1227 1228 typedef struct { 1229 DNSSRV_STAT_HEADER Header; 1230 BYTE Buffer[1]; 1231 } 1232 DNSSRV_STAT; 1233 1234 1235 /* */ 1236 /* DNS Typid and Union of all RPC data types */ 1237 /* */ 1238 1239 typedef [v1_enum] enum { 1240 DNSSRV_TYPEID_NULL = 0, 1241 DNSSRV_TYPEID_DWORD = 1, 1242 DNSSRV_TYPEID_LPSTR = 2, 1243 DNSSRV_TYPEID_LPWSTR = 3, 1244 DNSSRV_TYPEID_IPARRAY = 4, 1245 DNSSRV_TYPEID_BUFFER = 5, 1246 DNSSRV_TYPEID_SERVER_INFO_W2K = 6, 1247 DNSSRV_TYPEID_STATS = 7, 1248 DNSSRV_TYPEID_FORWARDERS_W2K = 8, 1249 DNSSRV_TYPEID_ZONE_W2K = 9, 1250 DNSSRV_TYPEID_ZONE_INFO_W2K = 10, 1251 DNSSRV_TYPEID_ZONE_SECONDARIES_W2K = 11, 1252 DNSSRV_TYPEID_ZONE_DATABASE_W2K = 12, 1253 DNSSRV_TYPEID_ZONE_TYPE_RESET_W2K = 13, 1254 DNSSRV_TYPEID_ZONE_CREATE_W2K = 14, 1255 DNSSRV_TYPEID_NAME_AND_PARAM = 15, 1256 DNSSRV_TYPEID_ZONE_LIST_W2K = 16, 1257 DNSSRV_TYPEID_ZONE_RENAME = 17, 1258 DNSSRV_TYPEID_ZONE_EXPORT = 18, 1259 DNSSRV_TYPEID_SERVER_INFO_DOTNET = 19, 1260 DNSSRV_TYPEID_FORWARDERS_DOTNET = 20, 1261 DNSSRV_TYPEID_ZONE = 21, 1262 DNSSRV_TYPEID_ZONE_INFO_DOTNET = 22, 1263 DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET = 23, 1264 DNSSRV_TYPEID_ZONE_DATABASE = 24, 1265 DNSSRV_TYPEID_ZONE_TYPE_RESET_DOTNET = 25, 1266 DNSSRV_TYPEID_ZONE_CREATE_DOTNET = 26, 1267 DNSSRV_TYPEID_ZONE_LIST = 27, 1268 DNSSRV_TYPEID_DP_ENUM = 28, 1269 DNSSRV_TYPEID_DP_INFO = 29, 1270 DNSSRV_TYPEID_DP_LIST = 30, 1271 DNSSRV_TYPEID_ENLIST_DP = 31, 1272 DNSSRV_TYPEID_ZONE_CHANGE_DP = 32, 1273 DNSSRV_TYPEID_ENUM_ZONES_FILTER = 33, 1274 DNSSRV_TYPEID_ADDRARRAY = 34, 1275 DNSSRV_TYPEID_SERVER_INFO = 35, 1276 DNSSRV_TYPEID_ZONE_INFO = 36, 1277 DNSSRV_TYPEID_FORWARDERS = 37, 1278 DNSSRV_TYPEID_ZONE_SECONDARIES = 38, 1279 DNSSRV_TYPEID_ZONE_TYPE_RESET = 39, 1280 DNSSRV_TYPEID_ZONE_CREATE = 40, 1281 DNSSRV_TYPEID_IP_VALIDATE = 41, 1282 DNSSRV_TYPEID_AUTOCONFIGURE = 42, 1283 DNSSRV_TYPEID_UTF8_STRING_LIST = 43, 1284 DNSSRV_TYPEID_UNICODE_STRING_LIST = 44 1285 } 1286 DNS_RPC_TYPEID; 1287 1288 typedef [switch_type(uint3264)] union { 1289 [case(DNSSRV_TYPEID_NULL)] PBYTE Null; 1290 1291 [case(DNSSRV_TYPEID_DWORD)] DWORD Dword; 1292 1293 [case(DNSSRV_TYPEID_LPSTR)] [string, charset(UTF8)] char * String; 1294 1295 [case(DNSSRV_TYPEID_LPWSTR)] [string, charset(UTF16)] wchar_t * WideString; 1296 1297 [case(DNSSRV_TYPEID_IPARRAY)] IP4_ARRAY *IpArray; 1298 1299 [case(DNSSRV_TYPEID_BUFFER)] 1300 DNS_RPC_BUFFER *Buffer; 1301 1302 [case(DNSSRV_TYPEID_SERVER_INFO_W2K)] 1303 DNS_RPC_SERVER_INFO_W2K *ServerInfoW2K; 1304 1305 [case(DNSSRV_TYPEID_STATS)] 1306 DNSSRV_STAT *Stats; 1307 1308 [case(DNSSRV_TYPEID_FORWARDERS_W2K)] 1309 DNS_RPC_FORWARDERS_W2K *ForwardersW2K; 1310 1311 [case(DNSSRV_TYPEID_ZONE_W2K)] 1312 DNS_RPC_ZONE_W2K *ZoneW2K; 1313 1314 [case(DNSSRV_TYPEID_ZONE_INFO_W2K)] 1315 DNS_RPC_ZONE_INFO_W2K *ZoneInfoW2K; 1316 1317 [case(DNSSRV_TYPEID_ZONE_SECONDARIES_W2K)] 1318 DNS_RPC_ZONE_SECONDARIES_W2K *SecondariesW2K; 1319 1320 [case(DNSSRV_TYPEID_ZONE_DATABASE_W2K)] 1321 DNS_RPC_ZONE_DATABASE_W2K *DatabaseW2K; 1322 1323 [case(DNSSRV_TYPEID_ZONE_CREATE_W2K)] 1324 DNS_RPC_ZONE_CREATE_INFO_W2K *ZoneCreateW2K; 1325 1326 [case(DNSSRV_TYPEID_NAME_AND_PARAM)] 1327 DNS_RPC_NAME_AND_PARAM *NameAndParam; 1328 1329 [case(DNSSRV_TYPEID_ZONE_LIST_W2K)] 1330 DNS_RPC_ZONE_LIST_W2K *ZoneListW2K; 1331 1332 [case(DNSSRV_TYPEID_SERVER_INFO_DOTNET)] 1333 DNS_RPC_SERVER_INFO_DOTNET *ServerInfoDotNet; 1334 1335 [case(DNSSRV_TYPEID_FORWARDERS_DOTNET)] 1336 DNS_RPC_FORWARDERS_DOTNET *ForwardersDotNet; 1337 1338 [case(DNSSRV_TYPEID_ZONE)] 1339 DNS_RPC_ZONE *Zone; 1340 1341 [case(DNSSRV_TYPEID_ZONE_INFO_DOTNET)] 1342 DNS_RPC_ZONE_INFO_DOTNET *ZoneInfoDotNet; 1343 1344 [case(DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET)] 1345 DNS_RPC_ZONE_SECONDARIES_DOTNET *SecondariesDotNet; 1346 1347 [case(DNSSRV_TYPEID_ZONE_DATABASE)] 1348 DNS_RPC_ZONE_DATABASE *Database; 1349 1350 [case(DNSSRV_TYPEID_ZONE_CREATE_DOTNET)] 1351 DNS_RPC_ZONE_CREATE_INFO_DOTNET *ZoneCreateDotNet; 1352 1353 [case(DNSSRV_TYPEID_ZONE_LIST)] 1354 DNS_RPC_ZONE_LIST *ZoneList; 1355 1356 [case(DNSSRV_TYPEID_ZONE_EXPORT)] 1357 DNS_RPC_ZONE_EXPORT_INFO *ZoneExport; 1358 1359 [case(DNSSRV_TYPEID_DP_INFO)] 1360 DNS_RPC_DP_INFO *DirectoryPartition; 1361 1362 [case(DNSSRV_TYPEID_DP_ENUM)] 1363 DNS_RPC_DP_ENUM *DirectoryPartitionEnum; 1364 1365 [case(DNSSRV_TYPEID_DP_LIST)] 1366 DNS_RPC_DP_LIST *DirectoryPartitionList; 1367 1368 [case(DNSSRV_TYPEID_ENLIST_DP)] 1369 DNS_RPC_ENLIST_DP *EnlistDirectoryPartition; 1370 1371 [case(DNSSRV_TYPEID_ZONE_CHANGE_DP)] 1372 DNS_RPC_ZONE_CHANGE_DP *ZoneChangeDirectoryPartition; 1373 1374 [case(DNSSRV_TYPEID_ENUM_ZONES_FILTER)] 1375 DNS_RPC_ENUM_ZONES_FILTER *EnumZonesFilter; 1376 1377 [case(DNSSRV_TYPEID_ADDRARRAY)] 1378 DNS_ADDR_ARRAY *AddrArray; 1379 1380 [case(DNSSRV_TYPEID_SERVER_INFO)] 1381 DNS_RPC_SERVER_INFO *ServerInfo; 1382 1383 [case(DNSSRV_TYPEID_ZONE_CREATE)] 1384 DNS_RPC_ZONE_CREATE_INFO *ZoneCreate; 1385 1386 [case(DNSSRV_TYPEID_FORWARDERS)] 1387 DNS_RPC_FORWARDERS *Forwarders; 1388 1389 [case(DNSSRV_TYPEID_ZONE_SECONDARIES)] 1390 DNS_RPC_ZONE_SECONDARIES *Secondaries; 1391 1392 [case(DNSSRV_TYPEID_IP_VALIDATE)] 1393 DNS_RPC_IP_VALIDATE *IpValidate; 1394 1395 [case(DNSSRV_TYPEID_ZONE_INFO)] 1396 DNS_RPC_ZONE_INFO *ZoneInfo; 1397 1398 [case(DNSSRV_TYPEID_AUTOCONFIGURE)] 1399 DNS_RPC_AUTOCONFIGURE *AutoConfigure; 1400 1401 [case(DNSSRV_TYPEID_UTF8_STRING_LIST)] 1402 DNS_RPC_UTF8_STRING_LIST *Utf8StringList; 1403 } DNSSRV_RPC_UNION; 1404 1405 1406 /* */ 1407 /* DNS RPC interface */ 1408 /* */ 1409 1410 typedef [public,gensize] struct { 1411 [value((12+ndr_size_DNS_RPC_NAME(&dnsNodeName,0)+3) & ~3)] uint16 wLength; 1412 uint16 wRecordCount; 1413 uint32 dwFlags; 1414 uint32 dwChildCount; 1415 DNS_RPC_NAME dnsNodeName; 1416 DNS_RPC_RECORD records[wRecordCount]; 1417 } DNS_RPC_RECORDS; 1418 1419 typedef [public,nopull,nopush,gensize] struct { 1420 uint32 count; 1421 DNS_RPC_RECORDS rec[count]; 1422 } DNS_RPC_RECORDS_ARRAY; 1423 1424 WERROR DnssrvOperation( 1425 [in,unique,string,charset(UTF16)] uint16 *pwszServerName, 1426 [in,unique,string,charset(UTF8)] uint8 *pszZone, 1427 [in] DWORD dwContext, 1428 [in,unique,string,charset(UTF8)] uint8 *pszOperation, 1429 [in] DNS_RPC_TYPEID dwTypeId, 1430 [in, switch_is(dwTypeId)] DNSSRV_RPC_UNION pData 1431 ); 1432 1433 WERROR DnssrvQuery( 1434 [in,unique,string,charset(UTF16)] uint16 *pwszServerName, 1435 [in,unique,string,charset(UTF8)] uint8 *pszZone, 1436 [in,unique,string,charset(UTF8)] uint8 *pszOperation, 1437 [out] DNS_RPC_TYPEID *pdwTypeId, 1438 [out, switch_is(*pdwTypeId)] DNSSRV_RPC_UNION *ppData 1439 ); 1440 1441 WERROR DnssrvComplexOperation( 1442 [in,unique,string,charset(UTF16)] uint16 *pwszServerName, 1443 [in,unique,string,charset(UTF8)] uint8 *pszZone, 1444 [in,unique,string,charset(UTF8)] uint8 *pszOperation, 1445 [in] DNS_RPC_TYPEID dwTypeIn, 1446 [in, switch_is(dwTypeIn)] DNSSRV_RPC_UNION pDataIn, 1447 [out] DNS_RPC_TYPEID *pdwTypeOut, 1448 [out, switch_is(*pdwTypeOut)] DNSSRV_RPC_UNION *ppDataOut 1449 ); 1450 1451 WERROR DnssrvEnumRecords( 1452 [in,unique,string,charset(UTF16)] uint16 *pwszServerName, 1453 [in,unique,string,charset(UTF8)] uint8 *pszZone, 1454 [in,unique,string,charset(UTF8)] uint8 *pszNodeName, 1455 [in,unique,string,charset(UTF8)] uint8 *pszStartChild, 1456 [in] dns_record_type wRecordType, 1457 [in] DNS_SELECT_FLAGS fSelectFlag, 1458 [in,unique,string,charset(UTF8)] uint8 *pszFilterStart, 1459 [in,unique,string,charset(UTF8)] uint8 *pszFilterStop, 1460 [out] DWORD *pdwBufferLength, 1461 [out,ref,subcontext(4),subcontext_size(*pdwBufferLength)] DNS_RPC_RECORDS_ARRAY **pBuffer 1462 ); 1463 1464 WERROR DnssrvUpdateRecord( 1465 [in,unique,string,charset(UTF16)] uint16 *pwszServerName, 1466 [in,unique,string,charset(UTF8)] uint8 *pszZone, 1467 [in,unique,string,charset(UTF8)] uint8 *pszNodeName, 1468 [in, unique] DNS_RPC_RECORD_BUF *pAddRecord, 1469 [in, unique] DNS_RPC_RECORD_BUF *pDeleteRecord 1470 ); 1471 1472 WERROR DnssrvOperation2( 1473 [in] DNS_RPC_CLIENT_VERSION dwClientVersion, 1474 [in] uint32 dwSettingFlags, 1475 [in,unique,string,charset(UTF16)] uint16 *pwszServerName, 1476 [in,unique,string,charset(UTF8)] uint8 *pszZone, 1477 [in] DWORD dwContext, 1478 [in,unique,string,charset(UTF8)] uint8 *pszOperation, 1479 [in] DNS_RPC_TYPEID dwTypeId, 1480 [in, switch_is(dwTypeId)] DNSSRV_RPC_UNION pData 1481 ); 1482 1483 WERROR DnssrvQuery2( 1484 [in] DNS_RPC_CLIENT_VERSION dwClientVersion, 1485 [in] uint32 dwSettingFlags, 1486 [in,unique,string,charset(UTF16)] uint16 *pwszServerName, 1487 [in,unique,string,charset(UTF8)] uint8 *pszZone, 1488 [in,unique,string,charset(UTF8)] uint8 *pszOperation, 1489 [out] DNS_RPC_TYPEID *pdwTypeId, 1490 [out, switch_is(*pdwTypeId)] DNSSRV_RPC_UNION *ppData 1491 ); 1492 1493 WERROR DnssrvComplexOperation2( 1494 [in] DNS_RPC_CLIENT_VERSION dwClientVersion, 1495 [in] uint32 dwSettingFlags, 1496 [in,unique,string,charset(UTF16)] uint16 *pwszServerName, 1497 [in,unique,string,charset(UTF8)] uint8 *pszZone, 1498 [in,unique,string,charset(UTF8)] uint8 *pszOperation, 1499 [in] DNS_RPC_TYPEID dwTypeIn, 1500 [in, switch_is(dwTypeIn)] DNSSRV_RPC_UNION pDataIn, 1501 [out] DNS_RPC_TYPEID *pdwTypeOut, 1502 [out, switch_is(*pdwTypeOut)] DNSSRV_RPC_UNION *ppDataOut 1503 ); 1504 1505 WERROR DnssrvEnumRecords2( 1506 [in] DNS_RPC_CLIENT_VERSION dwClientVersion, 1507 [in] DWORD dwSettingFlags, 1508 [in,unique,string,charset(UTF16)] uint16 *pwszServerName, 1509 [in,unique,string,charset(UTF8)] uint8 *pszZone, 1510 [in,unique,string,charset(UTF8)] uint8 *pszNodeName, 1511 [in,unique,string,charset(UTF8)] uint8 *pszStartChild, 1512 [in] dns_record_type wRecordType, 1513 [in] DNS_SELECT_FLAGS fSelectFlag, 1514 [in,unique,string,charset(UTF8)] uint8 *pszFilterStart, 1515 [in,unique,string,charset(UTF8)] uint8 *pszFilterStop, 1516 [out] uint32 *pdwBufferLength, 1517 [out,ref,subcontext(4),subcontext_size(*pdwBufferLength)] DNS_RPC_RECORDS_ARRAY **pBuffer 1518 ); 1519 1520 WERROR DnssrvUpdateRecord2( 1521 [in] DNS_RPC_CLIENT_VERSION dwClientVersion, 1522 [in] uint32 dwSettingFlags, 1523 [in,unique,string,charset(UTF16)] uint16 *pwszServerName, 1524 [in,unique,string,charset(UTF8)] uint8 *pszZone, 1525 [in,string,charset(UTF8)] uint8 *pszNodeName, 1526 [in, unique] DNS_RPC_RECORD_BUF *pAddRecord, 1527 [in, unique] DNS_RPC_RECORD_BUF *pDeleteRecord 1528 ); 12 1529 } -
vendor/current/librpc/idl/drsblobs.idl
r740 r988 19 19 * w2k3 uses version 1 20 20 */ 21 typedef struct {21 typedef [public] struct { 22 22 drsuapi_DsAttributeId attid; 23 23 uint32 version; … … 151 151 [in] repsFromToBlob blob 152 152 ); 153 154 /* Replication schedule structures as defined in MS-ADTS 7.1.4.5 155 * Appears as attribute of NTDSConnection object 156 */ 157 typedef [public] struct { 158 [value(0)] uint32 type; /* always 0 */ 159 uint32 offset; 160 } scheduleHeader; 161 162 typedef [public] struct { 163 uint8 slots[168]; 164 } scheduleSlots; 165 166 typedef [public] struct { 167 uint32 size; 168 [value(0)] uint32 bandwidth; /* ignored */ 169 [value(1)] uint32 numberOfSchedules; /* always 1 */ 170 scheduleHeader headerArray[numberOfSchedules]; 171 scheduleSlots dataArray[numberOfSchedules]; 172 } schedule; 153 173 154 174 /* … … 613 633 } ForestTrustData; 614 634 615 /* same as lsa_ForestTrustRecordType */635 /* same as lsa_ForestTrustRecordType, but only 8 bit */ 616 636 typedef [enum8bit] enum { 617 FOREST_TRUST_TOP_LEVEL_NAME = 0,618 FOREST_TRUST_TOP_LEVEL_NAME_EX = 1,619 FOREST_TRUST_DOMAIN_INFO = 2637 FOREST_TRUST_TOP_LEVEL_NAME = LSA_FOREST_TRUST_TOP_LEVEL_NAME, 638 FOREST_TRUST_TOP_LEVEL_NAME_EX = LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX, 639 FOREST_TRUST_DOMAIN_INFO = LSA_FOREST_TRUST_DOMAIN_INFO 620 640 } ForestTrustInfoRecordType; 621 641 … … 623 643 the same as in lsa.idl, see collision record types */ 624 644 typedef [public,gensize,flag(NDR_NOALIGN)] struct { 625 uint32flags;645 lsa_ForestTrustRecordFlags flags; 626 646 NTTIME timestamp; 627 647 ForestTrustInfoRecordType type; -
vendor/current/librpc/idl/drsuapi.idl
r740 r988 59 59 } drsuapi_DrsOptions; 60 60 61 /* see DRS_MSG_REPMOD_V1 */ 62 typedef [public,bitmap32bit] bitmap { 63 DRSUAPI_DRS_UPDATE_FLAGS = 0x00000001, 64 DRSUAPI_DRS_UPDATE_ADDRESS = 0x00000002, 65 DRSUAPI_DRS_UPDATE_SCHEDULE = 0x00000004 66 } drsuapi_DrsUpdate; 67 61 68 /*****************/ 62 69 /* Function 0x00 */ … … 109 116 110 117 /* this is used by w2k */ 111 typedef struct {118 typedef [public] struct { 112 119 drsuapi_SupportedExtensions supported_extensions; 113 120 GUID site_guid; … … 116 123 117 124 /* this is used by w2k3 */ 118 typedef struct {125 typedef [public] struct { 119 126 drsuapi_SupportedExtensions supported_extensions; 120 127 GUID site_guid; … … 123 130 } drsuapi_DsBindInfo28; 124 131 132 typedef [public] struct { 133 drsuapi_SupportedExtensions supported_extensions; 134 GUID site_guid; 135 uint32 pid; 136 uint32 repl_epoch; 137 drsuapi_SupportedExtensionsExt supported_extensions_ext; 138 } drsuapi_DsBindInfo32; 139 125 140 /* this is used by w2k8 */ 126 typedef struct {141 typedef [public] struct { 127 142 drsuapi_SupportedExtensions supported_extensions; 128 143 GUID site_guid; … … 133 148 } drsuapi_DsBindInfo48; 134 149 135 typedef struct { 150 /* this is used by w2k12 R2 [MS-DRSR] Section 5.39 */ 151 typedef [public] struct { 152 drsuapi_SupportedExtensions supported_extensions; 153 GUID site_guid; 154 uint32 pid; 155 uint32 repl_epoch; 156 drsuapi_SupportedExtensionsExt supported_extensions_ext; 157 GUID config_dn_guid; 158 drsuapi_SupportedExtensionsExt supported_capabilities_ext; 159 } drsuapi_DsBindInfo52; 160 161 typedef [public] struct { 136 162 [flag(NDR_REMAINING)] DATA_BLOB info; 137 163 } drsuapi_DsBindInfoFallBack; 164 165 typedef [nopull, nopush, noprint] [nodiscriminant] union { 166 [case(24)][subcontext(0), subcontext_size(24)] drsuapi_DsBindInfo24 info24; 167 [case(28)][subcontext(0), subcontext_size(28)] drsuapi_DsBindInfo28 info28; 168 [case(32)][subcontext(0), subcontext_size(32)] drsuapi_DsBindInfo32 info32; 169 [case(48)][subcontext(0), subcontext_size(48)] drsuapi_DsBindInfo48 info48; 170 [case(52)][subcontext(0), subcontext_size(52)] drsuapi_DsBindInfo52 info52; 171 /* 172 * The size for the defaut case is a bit arbitrary it in fact the value 173 * of the switch but we can't reference it. 174 * As we hand(un-)marshall this structure it has 0 impact and makes 175 * pidl happy for wireshark too 176 */ 177 [default][subcontext(0), subcontext_size(48)] drsuapi_DsBindInfoFallBack Fallback; 178 } drsuapi_DsBindInfo; 179 180 /* the drsuapi_DsBindInfoCtr was this before 181 * typedef [flag(NDR_PAHEX)] struct { 182 * [range(1,10000)] uint32 length; 183 * [size_is(length)] uint8 data[]; 184 * } drsuapi_DsBindInfo; 185 * 186 * but we don't want the caller to manually decode this blob, 187 * so we're doing it here 188 */ 189 190 /* 191 * MS-DRSR.pdf gives the following definition 192 typedef struct { 193 [range(1,10000)] DWORD cb; 194 [size_is(cb)] BYTE rgb[]; 195 } DRS_EXTENSIONS; 196 197 But we use a subcontext which has a slighly different signification on how 198 data are laid out. 199 With the MS-DRSR definition we will have 200 size_is_cb cv rgb_array 201 with size_is_cb being a uint3264 and cv being a uint32 202 203 We used to have 204 typedef struct { 205 [range(1,10000)] uint32 length; 206 [switch_is(length)] drsuapi_DsBindInfo info; 207 } drsuapi_DsBindInfoCtr; 138 208 139 209 typedef [nodiscriminant] union { … … 144 214 } drsuapi_DsBindInfo; 145 215 146 /* the drsuapi_DsBindInfoCtr was this before 147 * typedef [flag(NDR_PAHEX)] struct { 148 * [range(1,10000)] uint32 length; 149 * [size_is(length)] uint8 data[]; 150 * } drsuapi_DsBindInfo; 151 * 152 * but we don't want the caller to manually decode this blob, 153 * so we're doing it here 154 */ 155 156 typedef struct { 157 [range(1,10000)] uint32 length; 216 With this definition data is laid out this way: 217 length subcontext_size drsuapi_DsBindInfoxx 218 with length being a uint32 and subcontext_size being a uint3264 219 220 It has clearly an impact on the way things are aligned when using NDR64 221 */ 222 typedef [flag(NDR_NOALIGN)] struct { 223 [range(1,10000)] uint3264 length; 224 [value(length)] uint32 __ndr_length; 158 225 [switch_is(length)] drsuapi_DsBindInfo info; 159 226 } drsuapi_DsBindInfoCtr; … … 198 265 [ref] drsuapi_DsReplicaObjectIdentifier *naming_context; 199 266 GUID source_dsa_guid; 200 astring*source_dsa_dns; /* Source DSA dns_name in <guid>._msdcs.<domain_dns> form */267 [charset(DOS),string] char *source_dsa_dns; /* Source DSA dns_name in <guid>._msdcs.<domain_dns> form */ 201 268 drsuapi_DrsOptions options; 202 269 } drsuapi_DsReplicaSyncRequest1; … … 393 460 DRSUAPI_ATTID_displayName = 0x0002000d, 394 461 DRSUAPI_ATTID_hasMasterNCs = 0x0002000e, 462 DRSUAPI_ATTID_nCName = 0x00020010, 395 463 DRSUAPI_ATTID_subClassOf = 0x00020015, 396 464 DRSUAPI_ATTID_governsID = 0x00020016, … … 539 607 /* Generic DATA_BLOB values */ 540 608 typedef struct { 541 [range(0, 10485760),value(ndr_size_DATA_BLOB(0,blob,0))] uint32 __ndr_size;609 [range(0,26214400),value(ndr_size_DATA_BLOB(0,blob,0))] uint32 __ndr_size; 542 610 DATA_BLOB *blob; 543 611 } drsuapi_DsAttributeValue; … … 799 867 typedef struct { 800 868 [ref] drsuapi_DsReplicaObjectIdentifier *naming_context; 801 [charset(UTF 16),string] uint16*source_dsa_address;869 [charset(UTF8), string] uint8 *source_dsa_address; 802 870 drsuapi_DrsOptions options; 803 871 } drsuapi_DsReplicaDelRequest1; … … 1100 1168 /*****************/ 1101 1169 /* Function 0x10 */ 1170 typedef [v1_enum] enum { 1171 DRSUAPI_DC_INFO_CTR_1 = 1, 1172 DRSUAPI_DC_INFO_CTR_2 = 2, 1173 DRSUAPI_DC_INFO_CTR_3 = 3, 1174 DRSUAPI_DC_CONNECTION_CTR_01 = 0xFFFFFFFF 1175 } drsuapi_DsGetDCInfoCtrLevels; 1176 1102 1177 typedef struct { 1103 1178 [charset(UTF16),string] uint16 *domain_name; /* netbios or dns */ 1104 int32level; /* specifies the switch level for the request */1179 drsuapi_DsGetDCInfoCtrLevels level; /* specifies the switch level for the request */ 1105 1180 } drsuapi_DsGetDCInfoRequest1; 1106 1181 1107 typedef [switch_type( int32)] union {1182 typedef [switch_type(uint32)] union { 1108 1183 [case(1)] drsuapi_DsGetDCInfoRequest1 req1; 1109 1184 } drsuapi_DsGetDCInfoRequest; … … 1197 1272 } drsuapi_DsGetDCConnectionCtr01; 1198 1273 1199 typedef [v1_enum] enum { 1200 DRSUAPI_DC_INFO_CTR_1 = 1, 1201 DRSUAPI_DC_INFO_CTR_2 = 2, 1202 DRSUAPI_DC_INFO_CTR_3 = 3, 1203 DRSUAPI_DC_CONNECTION_CTR_01 = -1 1204 } drsuapi_DsGetDCInfoCtrLevels; 1205 1206 typedef [switch_type(int32)] union { 1274 typedef [switch_type(drsuapi_DsGetDCInfoCtrLevels)] union { 1207 1275 [case(DRSUAPI_DC_INFO_CTR_1)] drsuapi_DsGetDCInfoCtr1 ctr1; 1208 1276 [case(DRSUAPI_DC_INFO_CTR_2)] drsuapi_DsGetDCInfoCtr2 ctr2; … … 1213 1281 WERROR drsuapi_DsGetDomainControllerInfo( 1214 1282 [in] policy_handle *bind_handle, 1215 [in] int32 level,1283 [in] uint32 level, 1216 1284 [in,ref,switch_is(level)] drsuapi_DsGetDCInfoRequest *req, 1217 [out,ref] int32*level_out,1285 [out,ref] drsuapi_DsGetDCInfoCtrLevels *level_out, 1218 1286 [out,ref,switch_is(*level_out)] drsuapi_DsGetDCInfoCtr *ctr 1219 1287 ); -
vendor/current/librpc/idl/epmapper.idl
r740 r988 15 15 uuid("e1af8308-5d1f-11c9-91a4-08002b14a0fa"), 16 16 version(3.0), 17 endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]", 18 17 endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]", 18 "ncacn_http:[593]", "ncalrpc:[EPMAPPER]"), 19 19 helpstring("EndPoint Mapper"), 20 20 pointer_default(ptr) … … 215 215 } epm_tower; 216 216 217 typedef struct {217 typedef [public] struct { 218 218 [value(ndr_size_epm_tower(&tower, ndr->flags))] uint32 tower_length; 219 219 [subcontext(4)] epm_tower tower; -
vendor/current/librpc/idl/eventlog6.idl
r740 r988 65 65 typedef struct { 66 66 [range(0, MAX_RPC_STRING_ARRAY_COUNT)] uint32 count; 67 [size_is(count),charset(UTF16),string] uint16 * ptr;67 [size_is(count),charset(UTF16),string] uint16 **ptr; 68 68 } eventlog6_StringArray; 69 69 -
vendor/current/librpc/idl/frsrpc.idl
r740 r988 2 2 3 3 import "misc.idl"; 4 import "fscc.idl"; 5 import "bkupblobs.idl"; 4 6 5 7 [ … … 13 15 interface frsrpc 14 16 { 17 15 18 /*****************/ 16 19 /* Function 0x00 */ … … 34 37 FRSRPC_CO_FLAG_LOCALCO = 0x00000020, 35 38 FRSRPC_CO_FLAG_RETRY = 0x00000040, 39 FRSRPC_CO_FLAG_INST_INCOMPLETE = 0x00000080, 36 40 FRSRPC_CO_FLAG_OUT_OF_ORDER = 0x00000200, 37 41 FRSRPC_CO_FLAG_NEW_FILE = 0x00000400, … … 44 48 FRSRPC_CO_FLAG_JUST_OID_RESET = 0x00800000, 45 49 FRSRPC_CO_FLAG_COMPRESSED_STAGE = 0x01000000, 46 FRSRPC_CO_FLAG_COMPRESSED_STAGE = 0x01000000,47 50 FRSRPC_CO_FLAG_SKIP_VV_UPDATE = 0x02000000 48 51 } frsrpc_CommPktCoCmdFlags; 49 52 50 53 const uint32 FRSRPC_CO_IFLAG_NONE = 0x0000000; 54 55 const string FRSRPC_COMPRESSION_GUID = "64d2f7d2-2695-436d-8830-8d3c58701e15"; 56 51 57 52 58 typedef [bitmap32bit,flag(NDR_PAHEX)] bitmap { … … 117 123 } frsrpc_CommPktCoCmdLocationCmd; 118 124 119 typedef struct {125 [public] typedef struct { 120 126 uint32 sequence_number; 121 127 frsrpc_CommPktCoCmdFlags flags; … … 204 210 [value(0x0002)] uint16 offset_count; 205 211 [value(0x00000018)] uint32 offset0; 206 [value(0x00000030)] uint32 offset1; /*TODO: is this correct??? */212 [value(0x00000030)] uint32 offset1; 207 213 [value(0)] uint32 offset_last; 208 214 [value(0)] uint32 not_used; … … 222 228 FRSRPC_COMMAND_JOINED = 0x00000128, 223 229 FRSRPC_COMMAND_UNJOIN_REMOTE = 0x00000148, 224 FRSRPC_COMMAND_ WJOIN_DONE = 0x00000136,230 FRSRPC_COMMAND_VVJOIN_DONE = 0x00000136, 225 231 FRSRPC_COMMAND_SEND_STAGE = 0x00000228 226 232 } frsrpc_CommPktCommand; … … 283 289 GUID compression_guid; 284 290 [case(FRSRPC_COMM_PKT_CHUNK_BLOCK)] 285 [flag(NDR_REMAINING)]DATA_BLOB block;291 DATA_BLOB block; 286 292 [case(FRSRPC_COMM_PKT_CHUNK_BLOCK_SIZE)] 287 293 hyper block_size; … … 295 301 GUID co_guid; 296 302 [case(FRSRPC_COMM_PKT_CHUNK_CO_SEQUENCE_NUMBER)] 297 uint32 co_sequ nence_number;303 uint32 co_sequence_number; 298 304 [case(FRSRPC_COMM_PKT_CHUNK_REMOTE_CO)][subcontext(4)] 299 305 frsrpc_CommPktChangeOrderCommand remote_co; 300 306 [case(FRSRPC_COMM_PKT_CHUNK_CO_EXT_WIN2K)][subcontext(4)] 301 307 frsrpc_CommPktCoRecordExtensionWin2k co_ext_win2k; 302 [case(FRSRPC_COMM_PKT_CHUNK_CO_EXTENTION_2)] [subcontext(4)]308 [case(FRSRPC_COMM_PKT_CHUNK_CO_EXTENTION_2)] 303 309 frsrpc_CommPktChangeOrderRecordExtension co_extension2; 304 310 [case(FRSRPC_COMM_PKT_CHUNK_EOP)] 305 [value(0xFFFFFFFF)] uint32 bop ;311 [value(0xFFFFFFFF)] uint32 bopend; 306 312 } frsrpc_CommPktChunkData; 307 313 … … 333 339 } frsrpc_CommPktMinor; 334 340 335 typedef struct {341 [public] typedef struct { 336 342 frsrpc_CommPktMajor major; 337 343 frsrpc_CommPktMinor minor; … … 345 351 [subcontext(4),subcontext_size(pkt_len)] 346 352 frsrpc_CommPktChunkCtr *ctr; 347 [value(0)] uint32 data_name;348 [value(0)] uint32 data_handle;353 [value(0)] uint3264 data_name; 354 [value(0)] uint3264 data_handle; 349 355 } frsrpc_FrsSendCommPktReq; 350 356 … … 390 396 ); 391 397 398 typedef [public,flag(NDR_NOALIGN)] struct { 399 uint32 major; 400 uint32 minor; 401 uint32 dataHigh; 402 uint32 dataLow; 403 uint16 compression; 404 uint8 unused[6]; 405 fscc_FileNetworkOpenInformation attributes; 406 frsrpc_CommPktChangeOrderCommand command; 407 fscc_FileObjectIdBuffer_2 fileObjId; 408 frsrpc_CommPktCoRecordExtensionWin2k cocExt; 409 GUID compressionGuid; 410 uint32 encDataHigh; 411 uint32 encDataLow; 412 hyper dataSize; 413 uint32 reparseDataPresent; 414 uint32 reparseDataHigh; 415 uint32 reparseDataLow; 416 uint32 padding2; 417 } frsrpc_StageHeader; 418 392 419 /*****************/ 393 420 /* Function 0x03 */ 394 421 WERROR frsrpc_FrsNOP(); 395 422 423 /* 424 *For Op from 4 to 10 Microsoft use 425 *the notation OpnumxxNotUsedOnWire 426 *where xx is the number of the OP. 427 *They are only declared in the IDL of MS-FRS1.pdf. 428 *Not in the core of the document. 429 */ 430 396 431 /*****************/ 397 432 /* Function 0x04 */ 398 [todo] void FRSRPC_BACKUP_COMPLETE();433 /*[todo] void FRSRPC_BACKUP_COMPLETE();*/ 399 434 400 435 /*****************/ 401 436 /* Function 0x05 */ 402 [todo] void FRSRPC_BACKUP_COMPLETE_5();437 /*[todo] void FRSRPC_BACKUP_COMPLETE_5();*/ 403 438 404 439 /*****************/ 405 440 /* Function 0x06 */ 406 [todo] void FRSRPC_BACKUP_COMPLETE_6();441 /*[todo] void FRSRPC_BACKUP_COMPLETE_6();*/ 407 442 408 443 /*****************/ 409 444 /* Function 0x07 */ 410 [todo] void FRSRPC_BACKUP_COMPLETE_7();445 /*[todo] void FRSRPC_BACKUP_COMPLETE_7();*/ 411 446 412 447 /*****************/ 413 448 /* Function 0x08 */ 414 [todo] void FRSRPC_BACKUP_COMPLETE_8();449 /*[todo] void FRSRPC_BACKUP_COMPLETE_8();*/ 415 450 416 451 /*****************/ 417 452 /* Function 0x09 */ 418 [todo] void FRSRPC_BACKUP_COMPLETE_9();453 /*[todo] void FRSRPC_BACKUP_COMPLETE_9();*/ 419 454 420 455 /*****************/ 421 456 /* Function 0x0a */ 422 [todo] void FRSRPC_VERIFY_PROMOTION_PARENT_EX();457 /*[todo] void FRSRPC_VERIFY_PROMOTION_PARENT_EX();*/ 423 458 } -
vendor/current/librpc/idl/frstrans.idl
r740 r988 59 59 } frstrans_UpdateStatus; 60 60 61 typedef struct {61 typedef [public] struct { 62 62 GUID db_guid; 63 63 hyper low; … … 186 186 /*****************/ 187 187 /* Function 0x0c */ 188 [todo] void FRSTRANS_RDC_CLOSE(); 188 WERROR frstrans_RdcClose( 189 [in,out,ref] policy_handle *server_context 190 ); 189 191 190 192 /*****************/ … … 278 280 /*****************/ 279 281 /* Function 0x0f */ 280 typedef pipe uint8 frstrans_BytePipe;282 typedef [flag(NDR_PAHEX)] pipe uint8 frstrans_BytePipe; 281 283 282 284 WERROR frstrans_RawGetFileDataAsync( -
vendor/current/librpc/idl/idl_types.h
r919 r988 9 9 #define STR_CHARLEN LIBNDR_FLAG_STR_CHARLEN 10 10 #define STR_UTF8 LIBNDR_FLAG_STR_UTF8 11 #define STR_RAW8 LIBNDR_FLAG_STR_RAW8 11 12 12 13 /* … … 24 25 */ 25 26 #define utf8string [flag(STR_UTF8|STR_NULLTERM)] string 27 28 /* 29 a null terminated "raw" string (null terminated byte sequence) 30 */ 31 #define raw8string [flag(STR_RAW8|STR_NULLTERM)] string 26 32 27 33 /* -
vendor/current/librpc/idl/idmap.idl
r740 r988 20 20 } unixid; 21 21 22 typedef [public]enum {22 typedef [public] enum { 23 23 ID_UNKNOWN, 24 24 ID_MAPPED, -
vendor/current/librpc/idl/krb5pac.idl
r740 r988 5 5 #include "idl_types.h" 6 6 7 import "security.idl", " netlogon.idl", "samr.idl";7 import "security.idl", "lsa.idl", "netlogon.idl", "samr.idl"; 8 8 9 9 [ … … 33 33 34 34 typedef struct { 35 lsa_String proxy_target; 36 uint32 num_transited_services; 37 [size_is(num_transited_services)] lsa_String *transited_services; 38 } PAC_CONSTRAINED_DELEGATION; 39 40 typedef struct { 35 41 [value(2*strlen_m(upn_name))] uint16 upn_size; 36 42 uint16 upn_offset; … … 48 54 PAC_LOGON_INFO *info; 49 55 } PAC_LOGON_INFO_CTR; 56 57 typedef [public] struct { 58 PAC_CONSTRAINED_DELEGATION *info; 59 } PAC_CONSTRAINED_DELEGATION_CTR; 50 60 51 61 typedef [public,v1_enum] enum { … … 67 77 [case(PAC_TYPE_KDC_CHECKSUM)] PAC_SIGNATURE_DATA kdc_cksum; 68 78 [case(PAC_TYPE_LOGON_NAME)] PAC_LOGON_NAME logon_name; 79 [case(PAC_TYPE_CONSTRAINED_DELEGATION)][subcontext(0xFFFFFC01)] 80 PAC_CONSTRAINED_DELEGATION_CTR constrained_delegation; 69 81 /* when new PAC info types are added they are supposed to be done 70 82 in such a way that they are backwards compatible with existing … … 111 123 } PAC_Validate; 112 124 113 void decode_pac(125 [nopython] void decode_pac( 114 126 [in] PAC_DATA pac 115 127 ); 116 128 117 void decode_pac_raw(129 [nopython] void decode_pac_raw( 118 130 [in] PAC_DATA_RAW pac 119 131 ); 120 132 121 void decode_login_info(133 [nopython] void decode_login_info( 122 134 [in] PAC_LOGON_INFO logon_info 123 135 ); 124 136 125 void decode_login_info_ctr(137 [nopython] void decode_login_info_ctr( 126 138 [in] PAC_LOGON_INFO_CTR logon_info_ctr 127 139 ); 128 140 129 void decode_pac_validate(141 [nopython] void decode_pac_validate( 130 142 [in] PAC_Validate pac_validate 131 143 ); -
vendor/current/librpc/idl/lsa.idl
r740 r988 158 158 LSA_POLICY_AUDIT_LOG_ADMIN | 159 159 LSA_POLICY_SERVER_ADMIN | 160 LSA_POLICY_LOOKUP_NAMES); 160 LSA_POLICY_LOOKUP_NAMES | 161 LSA_POLICY_NOTIFICATION); 161 162 162 163 const int LSA_POLICY_READ = … … 692 693 } lsa_TrustDirection; 693 694 694 typedef [ v1_enum] enum {695 typedef [public,v1_enum] enum { 695 696 LSA_TRUST_TYPE_DOWNLEVEL = 0x00000001, 696 697 LSA_TRUST_TYPE_UPLEVEL = 0x00000002, 697 LSA_TRUST_TYPE_MIT = 0x00000003 698 LSA_TRUST_TYPE_MIT = 0x00000003, 699 LSA_TRUST_TYPE_DCE = 0x00000004 698 700 } lsa_TrustType; 699 701 … … 733 735 } lsa_TrustDomainInfoBasic; 734 736 735 typedef struct {737 typedef [public] struct { 736 738 lsa_StringLarge domain_name; 737 739 lsa_StringLarge netbios_name; … … 1053 1055 [in] policy_handle *policy_handle, 1054 1056 [in] lsa_TrustDomainInfoInfoEx *info, 1055 [in] lsa_TrustDomainInfoAuthInfo Internal*auth_info,1057 [in] lsa_TrustDomainInfoAuthInfo *auth_info, 1056 1058 [in] lsa_TrustedAccessMask access_mask, 1057 1059 [out] policy_handle *trustdom_handle … … 1187 1189 [in] policy_handle *policy_handle, 1188 1190 [in] lsa_TrustDomainInfoInfoEx *info, 1189 [in] lsa_TrustDomainInfoAuthInfoInternal *auth_info ,1191 [in] lsa_TrustDomainInfoAuthInfoInternal *auth_info_internal, 1190 1192 [in] lsa_TrustedAccessMask access_mask, 1191 1193 [out] policy_handle *trustdom_handle … … 1255 1257 1256 1258 /* Function 0x49 */ 1259 typedef [bitmap32bit,public] bitmap { 1260 /* these apply to LSA_FOREST_TRUST_TOP_LEVEL_NAME */ 1261 LSA_TLN_DISABLED_NEW = 0x00000001, 1262 LSA_TLN_DISABLED_ADMIN = 0x00000002, 1263 LSA_TLN_DISABLED_CONFLICT = 0x00000004, 1264 1265 /* these apply to LSA_FOREST_TRUST_DOMAIN_INFO */ 1266 LSA_SID_DISABLED_ADMIN = 0x00000001, 1267 LSA_SID_DISABLED_CONFLICT = 0x00000002, 1268 LSA_NB_DISABLED_ADMIN = 0x00000004, 1269 LSA_NB_DISABLED_CONFLICT = 0x00000008 1270 } lsa_ForestTrustRecordFlags; 1271 1272 const uint32 LSA_TLN_DISABLED_MASK = ( 1273 LSA_TLN_DISABLED_NEW | 1274 LSA_TLN_DISABLED_ADMIN | 1275 LSA_TLN_DISABLED_CONFLICT); 1276 const uint32 LSA_SID_DISABLED_MASK = ( 1277 LSA_SID_DISABLED_ADMIN | 1278 LSA_SID_DISABLED_CONFLICT); 1279 const uint32 LSA_NB_DISABLED_MASK = ( 1280 LSA_NB_DISABLED_ADMIN | 1281 LSA_NB_DISABLED_CONFLICT); 1282 1283 typedef enum { 1284 LSA_FOREST_TRUST_TOP_LEVEL_NAME = 0, 1285 LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX = 1, 1286 LSA_FOREST_TRUST_DOMAIN_INFO = 2, 1287 LSA_FOREST_TRUST_RECORD_TYPE_LAST = 3 1288 } lsa_ForestTrustRecordType; 1289 1257 1290 typedef struct { 1258 1291 [range(0,131072)] uint3264 length; … … 1266 1299 } lsa_ForestTrustDomainInfo; 1267 1300 1268 typedef [switch_type( uint32)] union {1301 typedef [switch_type(lsa_ForestTrustRecordType)] union { 1269 1302 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME)] lsa_StringLarge top_level_name; 1270 1303 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX)] lsa_StringLarge top_level_name_ex; … … 1273 1306 } lsa_ForestTrustData; 1274 1307 1275 typedef [v1_enum] enum { 1276 LSA_FOREST_TRUST_TOP_LEVEL_NAME = 0, 1277 LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX = 1, 1278 LSA_FOREST_TRUST_DOMAIN_INFO = 2, 1279 LSA_FOREST_TRUST_RECORD_TYPE_LAST = 3 1280 } lsa_ForestTrustRecordType; 1281 1282 typedef struct { 1283 uint32 flags; 1308 typedef struct { 1309 lsa_ForestTrustRecordFlags flags; 1284 1310 lsa_ForestTrustRecordType type; 1285 hyper time;1311 NTTIME_hyper time; 1286 1312 [switch_is(type)] lsa_ForestTrustData forest_trust_data; 1287 1313 } lsa_ForestTrustRecord; … … 1292 1318 } lsa_ForestTrustInformation; 1293 1319 1294 NTSTATUS lsa_lsaRQueryForestTrustInformation(1320 [public] NTSTATUS lsa_lsaRQueryForestTrustInformation( 1295 1321 [in] policy_handle *handle, 1296 1322 [in,ref] lsa_String *trusted_domain_name, 1297 [in] uint16 unknown, /* level ? */1323 [in] lsa_ForestTrustRecordType highest_record_type, 1298 1324 [out,ref] lsa_ForestTrustInformation **forest_trust_info 1299 1325 ); … … 1308 1334 } lsa_ForestTrustCollisionRecordType; 1309 1335 1310 /* if type is CollisionTdo, flags can be */ 1311 typedef [bitmap32bit] bitmap { 1312 LSA_TLN_DISABLED_NEW = 0x00000001, 1313 LSA_TLN_DISABLED_ADMIN = 0x00000002, 1314 LSA_TLN_DISABLED_CONFLICT = 0x00000004 1315 } lsa_ForestTrustCollisionTDOFlags; 1316 1317 /* if type is CollisionXref, flags can be */ 1318 typedef [bitmap32bit] bitmap { 1319 LSA_SID_DISABLED_ADMIN = 0x00000001, 1320 LSA_SID_DISABLED_CONFLICT = 0x00000002, 1321 LSA_NB_DISABLED_ADMIN = 0x00000004, 1322 LSA_NB_DISABLED_CONFLICT = 0x00000008 1323 } lsa_ForestTrustCollisionXrefFlags; 1324 1325 typedef [nodiscriminant] union { 1326 [case(LSA_FOREST_TRUST_COLLISION_TDO)] lsa_ForestTrustCollisionTDOFlags flags; 1327 [case(LSA_FOREST_TRUST_COLLISION_XREF)] lsa_ForestTrustCollisionXrefFlags flags; 1328 [default] uint32 flags; 1329 } lsa_ForestTrustCollisionFlags; 1330 1331 typedef struct { 1336 typedef [public] struct { 1332 1337 uint32 index; 1333 1338 lsa_ForestTrustCollisionRecordType type; 1334 [switch_is(type)] lsa_ForestTrustCollisionFlags flags;1339 lsa_ForestTrustRecordFlags flags; 1335 1340 lsa_String name; 1336 1341 } lsa_ForestTrustCollisionRecord; 1337 1342 1338 typedef struct {1343 typedef [public] struct { 1339 1344 uint32 count; 1340 1345 [size_is(count)] lsa_ForestTrustCollisionRecord **entries; … … 1344 1349 [in] policy_handle *handle, 1345 1350 [in,ref] lsa_StringLarge *trusted_domain_name, 1346 [in] uint16highest_record_type,1351 [in] lsa_ForestTrustRecordType highest_record_type, 1347 1352 [in,ref] lsa_ForestTrustInformation *forest_trust_info, 1348 [in] uint8 check_only,1353 [in] boolean8 check_only, 1349 1354 [out,ref] lsa_ForestTrustCollisionInfo **collision_info 1350 1355 ); -
vendor/current/librpc/idl/misc.idl
r740 r988 78 78 [default,flag(NDR_REMAINING)] DATA_BLOB data; 79 79 } winreg_Data; 80 81 /* SAM database types */ 82 typedef [public,v1_enum] enum { 83 SAM_DATABASE_DOMAIN = 0, /* Domain users and groups */ 84 SAM_DATABASE_BUILTIN = 1, /* BUILTIN users and groups */ 85 SAM_DATABASE_PRIVS = 2 /* Privileges */ 86 } netr_SamDatabaseID; 87 88 typedef [public,bitmap32bit] bitmap { 89 SV_TYPE_WORKSTATION = 0x00000001, 90 SV_TYPE_SERVER = 0x00000002, 91 SV_TYPE_SQLSERVER = 0x00000004, 92 SV_TYPE_DOMAIN_CTRL = 0x00000008, 93 SV_TYPE_DOMAIN_BAKCTRL = 0x00000010, 94 SV_TYPE_TIME_SOURCE = 0x00000020, 95 SV_TYPE_AFP = 0x00000040, 96 SV_TYPE_NOVELL = 0x00000080, 97 98 SV_TYPE_DOMAIN_MEMBER = 0x00000100, 99 SV_TYPE_PRINTQ_SERVER = 0x00000200, 100 SV_TYPE_DIALIN_SERVER = 0x00000400, 101 SV_TYPE_SERVER_UNIX = 0x00000800, 102 SV_TYPE_NT = 0x00001000, 103 SV_TYPE_WFW = 0x00002000, 104 SV_TYPE_SERVER_MFPN = 0x00004000, 105 SV_TYPE_SERVER_NT = 0x00008000, 106 SV_TYPE_POTENTIAL_BROWSER = 0x00010000, 107 SV_TYPE_BACKUP_BROWSER = 0x00020000, 108 SV_TYPE_MASTER_BROWSER = 0x00040000, 109 SV_TYPE_DOMAIN_MASTER = 0x00080000, 110 SV_TYPE_SERVER_OSF = 0x00100000, 111 SV_TYPE_SERVER_VMS = 0x00200000, 112 SV_TYPE_WIN95_PLUS = 0x00400000, 113 SV_TYPE_DFS_SERVER = 0x00800000, 114 SV_TYPE_ALTERNATE_XPORT = 0x20000000, 115 SV_TYPE_LOCAL_LIST_ONLY = 0x40000000, 116 SV_TYPE_DOMAIN_ENUM = 0x80000000 117 } svcctl_ServerType; 118 119 const uint32 SV_TYPE_ALL = 0xFFFFFFFF; 80 120 } -
vendor/current/librpc/idl/nbt.idl
r740 r988 9 9 */ 10 10 11 import "misc.idl", "security.idl" , "svcctl.idl", "samr.idl";11 import "misc.idl", "security.idl"; 12 12 [ 13 helper("../lib cli/netlogon/netlogon.h", "../libcli/nbt/libnbt.h"),13 helper("../librpc/ndr/ndr_nbt.h"), 14 14 helpstring("NBT messages"), 15 15 uuid("6def41b6-86e4-4c32-997c-ed33af7bcd8e") … … 361 361 NBT_SERVER_FULL_SECRET_DOMAIN_6 = 0x00001000, 362 362 NBT_SERVER_ADS_WEB_SERVICE = 0x00002000, 363 NBT_SERVER_DS_8 = 0x00004000, 363 364 NBT_SERVER_HAS_DNS_NAME = 0x20000000, 364 365 NBT_SERVER_IS_DEFAULT_NC = 0x40000000, … … 394 395 } netlogon_command; 395 396 396 typedef bitmap samr_AcctFlags samr_AcctFlags;397 398 397 /* query to dc hand marshaled, as it has 'optional' 399 398 * parts */ … … 403 402 nstring user_name; 404 403 astring mailslot_name; 405 samr_AcctFlags acct_control; 404 uint32 acct_control; 405 /* samr_AcctFlags acct_control; */ 406 406 [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size; 407 407 /* The manual alignment is required because this … … 512 512 } nbt_netlogon_response2; 513 513 514 typedef enum netr_SamDatabaseID netr_SamDatabaseID;515 516 514 /* used to announce SAM changes - MS-NRPC 2.2.1.5.1 */ 517 515 typedef struct { … … 546 544 } nbt_netlogon_request; 547 545 548 #if 0 546 #if 0 547 /* These responses are all handled manually, as they cannot be encoded in IDL fully 548 549 See push_nbt_netlogon_response() 550 */ 549 551 [case(NETLOGON_RESPONSE_FROM_PDC)] nbt_netlogon_response_from_pdc response; 550 552 [case(NETLOGON_RESPONSE_FROM_PDC_USER)] nbt_netlogon_response_from_pdc2 response2; -
vendor/current/librpc/idl/netlogon.idl
r740 r988 11 11 cpp_quote("#define netr_DeltaEnum8Bit netr_DeltaEnum") 12 12 cpp_quote("#define netr_SamDatabaseID8Bit netr_SamDatabaseID") 13 14 cpp_quote("#define ENC_CRC32 KERB_ENCTYPE_DES_CBC_CRC") 15 cpp_quote("#define ENC_RSA_MD5 KERB_ENCTYPE_DES_CBC_MD5") 16 cpp_quote("#define ENC_RC4_HMAC_MD5 KERB_ENCTYPE_RC4_HMAC_MD5") 17 cpp_quote("#define ENC_HMAC_SHA1_96_AES128 KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96") 18 cpp_quote("#define ENC_HMAC_SHA1_96_AES256 KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96") 13 19 14 20 [ … … 208 214 209 215 typedef struct { 210 NTTIME l ast_logon;211 NTTIME l ast_logoff;212 NTTIME acct_expiry;216 NTTIME logon_time; 217 NTTIME logoff_time; 218 NTTIME kickoff_time; 213 219 NTTIME last_password_change; 214 220 NTTIME allow_password_change; … … 228 234 netr_UserSessionKey key; 229 235 lsa_StringLarge logon_server; 230 lsa_StringLarge domain;236 lsa_StringLarge logon_domain; 231 237 dom_sid2 *domain_sid; 232 238 netr_LMSessionKey LMSessKey; 233 239 samr_AcctFlags acct_flags; 234 uint32 unknown[7]; 240 uint32 sub_auth_status; 241 NTTIME last_successful_logon; 242 NTTIME last_failed_logon; 243 uint32 failed_logon_count; 244 uint32 reserved; 235 245 } netr_SamBaseInfo; 236 246 … … 862 872 } netr_NETLOGON_INFO_4; 863 873 864 typedef union {874 typedef [public] union { 865 875 [case(1)] netr_NETLOGON_INFO_1 *info1; 866 876 [case(2)] netr_NETLOGON_INFO_2 *info2; … … 871 881 872 882 /* function_code values */ 873 typedef [v1_enum ] enum {883 typedef [v1_enum,public] enum { 874 884 NETLOGON_CONTROL_QUERY = 0x00000001, 875 885 NETLOGON_CONTROL_REPLICATE = 0x00000002, … … 911 921 /* Function 0x0E */ 912 922 913 typedef union {923 typedef [public,switch_type(netr_LogonControlCode)] union { 914 924 [case(NETLOGON_CONTROL_REDISCOVER)] [string,charset(UTF16)] uint16 *domain; 915 925 [case(NETLOGON_CONTROL_TC_QUERY)] [string,charset(UTF16)] uint16 *domain; … … 1146 1156 DS_SERVER_SELECT_SECRET_DOMAIN_6 = 0x00000800, 1147 1157 DS_SERVER_FULL_SECRET_DOMAIN_6 = 0x00001000, 1158 DS_SERVER_WEBSERV = 0x00002000, 1159 DS_SERVER_DS_8 = 0x00004000, 1148 1160 DS_DNS_CONTROLLER = 0x20000000, 1149 1161 DS_DNS_DOMAIN = 0x40000000, … … 1331 1343 lsa_String dummy_string4; 1332 1344 netr_WorkstationFlags workstation_flags; 1333 uint32 dummy_long2;1345 kerb_EncTypes supported_enc_types; 1334 1346 uint32 dummy_long3; 1335 1347 uint32 dummy_long4; … … 1376 1388 } netr_OneDomainInfo; 1377 1389 1378 typedef [public,bitmap32bit] bitmap {1379 ENC_CRC32 = 0x00000001,1380 ENC_RSA_MD5 = 0x00000002,1381 ENC_RC4_HMAC_MD5 = 0x00000004,1382 ENC_HMAC_SHA1_96_AES128 = 0x00000008,1383 ENC_HMAC_SHA1_96_AES256 = 0x000000101384 } netr_SupportedEncTypes;1385 1386 1390 typedef struct { 1387 1391 netr_OneDomainInfo primary_domain; … … 1394 1398 lsa_StringLarge dummy_string4; 1395 1399 netr_WorkstationFlags workstation_flags; 1396 netr_SupportedEncTypes supported_enc_types;1400 kerb_EncTypes supported_enc_types; 1397 1401 uint32 dummy_long3; 1398 1402 uint32 dummy_long4; … … 1445 1449 /****************/ 1446 1450 /* Function 0x1f */ 1447 WERRORnetr_ServerPasswordGet(1451 NTSTATUS netr_ServerPasswordGet( 1448 1452 [in,unique] [string,charset(UTF16)] uint16 *server_name, 1449 1453 [in] [string,charset(UTF16)] uint16 *account_name, … … 1498 1502 /* Function 0x24 */ 1499 1503 1500 typedef [v1_enum] enum {1501 NETR_TRUST_TYPE_DOWNLEVEL = 1,1502 NETR_TRUST_TYPE_UPLEVEL = 2,1503 NETR_TRUST_TYPE_MIT = 3,1504 NETR_TRUST_TYPE_DCE = 41505 } netr_TrustType;1506 1507 typedef [bitmap32bit] bitmap {1508 NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE = 0x00000001,1509 NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY = 0x00000002,1510 NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN = 0x00000004,1511 NETR_TRUST_ATTRIBUTE_FOREST_TRANSITIVE = 0x00000008,1512 NETR_TRUST_ATTRIBUTE_CROSS_ORGANIZATION = 0x00000010,1513 NETR_TRUST_ATTRIBUTE_WITHIN_FOREST = 0x00000020,1514 NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL = 0x000000401515 } netr_TrustAttributes;1516 1517 1504 typedef struct { 1518 1505 [string,charset(UTF16)] uint16 *netbios_name; … … 1520 1507 netr_TrustFlags trust_flags; 1521 1508 uint32 parent_index; 1522 netr_TrustType trust_type;1523 netr_TrustAttributes trust_attributes;1509 lsa_TrustType trust_type; 1510 lsa_TrustAttributes trust_attributes; 1524 1511 dom_sid2 *sid; 1525 1512 GUID guid; … … 1606 1593 [in,ref] netr_Authenticator *credential, 1607 1594 [out,ref] netr_Authenticator *return_authenticator, 1608 [out,ref] samr_Password * password,1609 [out,ref] samr_Password * password21595 [out,ref] samr_Password *new_owf_password, 1596 [out,ref] samr_Password *old_owf_password 1610 1597 ); 1611 1598 -
vendor/current/librpc/idl/ntlmssp.idl
r740 r988 1 1 #include "idl_types.h" 2 3 import "security.idl"; 2 4 3 5 /* … … 55 57 /* 56 58 NTLMSSP_WINDOWS_MAJOR_VERSION_5: Windows XP SP2 and Server 2003 57 NTLMSSP_WINDOWS_MAJOR_VERSION_6: Windows Vista, Server 2008, 7 and Server 2008 R2 59 NTLMSSP_WINDOWS_MAJOR_VERSION_6: Windows Vista, Server 2008, 7, Server 2008 R2, 8, Server 2012, 8.1, Server 2012 R2 60 NTLMSSP_WINDOWS_MAJOR_VERSION_10: Windows 10, Windows Server 2016 Technical Preview 58 61 */ 59 62 60 63 typedef [enum8bit] enum { 61 64 NTLMSSP_WINDOWS_MAJOR_VERSION_5 = 0x05, 62 NTLMSSP_WINDOWS_MAJOR_VERSION_6 = 0x06 65 NTLMSSP_WINDOWS_MAJOR_VERSION_6 = 0x06, 66 NTLMSSP_WINDOWS_MAJOR_VERSION_10 = 0x0A 63 67 } ntlmssp_WindowsMajorVersion; 64 68 65 69 /* 66 NTLMSSP_WINDOWS_MINOR_VERSION_0: Windows Vista, Server 2008, 7, Server 2008 R2 67 NTLMSSP_WINDOWS_MINOR_VERSION_1: Windows XP SP2 68 NTLMSSP_WINDOWS_MINOR_VERSION_2: Windows Server 2003 70 NTLMSSP_WINDOWS_MINOR_VERSION_0: Windows Vista, 10, Server 2016 Technical Preview 71 NTLMSSP_WINDOWS_MINOR_VERSION_1: Windows XP SP2, 7, Server 2008 R2 72 NTLMSSP_WINDOWS_MINOR_VERSION_2: Windows Server 2003, 8, Server 2012 73 NTLMSSP_WINDOWS_MINOR_VERSION_3: Windows 8.1, Server 2012 R2 69 74 */ 70 75 … … 72 77 NTLMSSP_WINDOWS_MINOR_VERSION_0 = 0x00, 73 78 NTLMSSP_WINDOWS_MINOR_VERSION_1 = 0x01, 74 NTLMSSP_WINDOWS_MINOR_VERSION_2 = 0x02 79 NTLMSSP_WINDOWS_MINOR_VERSION_2 = 0x02, 80 NTLMSSP_WINDOWS_MINOR_VERSION_3 = 0x03 75 81 } ntlmssp_WindowsMinorVersion; 76 82 … … 124 130 MsvAvFlags = 6, 125 131 MsvAvTimestamp = 7, 126 Ms AvRestrictions= 8,132 MsvAvSingleHost = 8, 127 133 MsvAvTargetName = 9, 128 134 MsvChannelBindings = 10 129 135 } ntlmssp_AvId; 130 136 131 /* [MS-NLMP] 2.2.2.2 Restriction_Encoding*/132 133 typedef struct {134 uint32 Size;137 /* [MS-NLMP] 2.2.2.2 SingleHostData */ 138 139 typedef [flag(NDR_PAHEX)] struct { 140 [value(8+ndr_size_LSAP_TOKEN_INFO_INTEGRITY(&r->token_info, 0)+r->remaining.length)] uint32 Size; 135 141 [value(0)] uint32 Z4; 136 boolean32 IntegrityLevel; 137 uint32 SubjectIntegrityLevel; 138 uint8 MachineId[32]; 139 } Restriction_Encoding; 142 LSAP_TOKEN_INFO_INTEGRITY token_info; 143 [flag(NDR_REMAINING)] DATA_BLOB remaining; 144 } ntlmssp_SingleHostData; 140 145 141 146 typedef [bitmap32bit] bitmap { 142 147 NTLMSSP_AVFLAG_CONSTRAINTED_ACCOUNT = 0x00000001, 143 NTLMSSP_AVFLAG_MIC_IN_AUTHENTICATE_MESSAGE = 0x00000002 148 NTLMSSP_AVFLAG_MIC_IN_AUTHENTICATE_MESSAGE = 0x00000002, 149 NTLMSSP_AVFLAG_TARGET_SPN_FROM_UNTRUSTED_SOURCE = 0x00000004 144 150 } ntlmssp_AvFlags; 145 151 … … 153 159 [case(MsvAvFlags)] ntlmssp_AvFlags AvFlags; 154 160 [case(MsvAvTimestamp)] NTTIME AvTimestamp; 155 [case(Ms AvRestrictions)] Restriction_Encoding AvRestrictions;161 [case(MsvAvSingleHost)] ntlmssp_SingleHostData AvSingleHost; 156 162 [case(MsvAvTargetName)] [flag(ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE))] string AvTargetName; 157 163 [case(MsvChannelBindings)] uint8 ChannelBindings[16]; … … 167 173 } AV_PAIR; 168 174 169 typedef [ gensize,nopush,nopull,flag(NDR_NOALIGN)] struct {175 typedef [public,gensize,nopush,nopull,flag(NDR_NOALIGN)] struct { 170 176 uint32 count; 171 177 AV_PAIR pair[count]; … … 184 190 uint8 Reserved[8]; 185 191 [value(ndr_size_AV_PAIR_LIST(TargetInfo, ndr->flags))] uint16 TargetInfoLen; 186 [value(TargetInfoLen)] uint16 Target NameInfoMaxLen;192 [value(TargetInfoLen)] uint16 TargetInfoMaxLen; 187 193 [relative] [subcontext(0),subcontext_size(TargetInfoLen)] AV_PAIR_LIST *TargetInfo; 188 194 [switch_is(NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)] ntlmssp_Version Version; … … 239 245 } ntlmssp_NTLM_RESPONSE; 240 246 247 const int NTLMSSP_MIC_OFFSET = 72; 248 const int NTLMSSP_MIC_SIZE = 16; 249 241 250 typedef [flag(NDR_PAHEX)] struct { 242 uint8 MIC[ 16];243 } MIC;251 uint8 MIC[NTLMSSP_MIC_SIZE]; 252 } ntlmssp_MIC; 244 253 245 254 /* [MS-NLMP] 2.2.1.3 AUTHENTICATE_MESSAGE */ … … 270 279 /* MIC (Message Integrity) is only included when the client has 271 280 * sent a timestap Av struct in the CHALLENGE_MESSAGE AvPair */ 272 /* [flag(NDR_REMAINING)] MIC mic; */281 /* [flag(NDR_REMAINING)] ntlmssp_MIC mic; */ 273 282 } AUTHENTICATE_MESSAGE; 274 283 -
vendor/current/librpc/idl/orpc.idl
r414 r988 42 42 43 43 44 typedef [public] struct 44 typedef [public] struct 45 45 { 46 46 uint16 MajorVersion; /* Major version number */ … … 59 59 60 60 /* Extension to implicit parameters. */ 61 typedef [public] struct 62 { 61 typedef [public] struct 62 { 63 63 GUID id; /* Extension identifier. */ 64 64 uint32 size; /* Extension size. */ … … 68 68 69 69 /* Array of extensions. */ 70 typedef struct 70 typedef struct 71 71 { 72 72 uint32 size; /* Num extents. */ … … 78 78 /* implicit 'this' pointer which is the first [in] parameter on */ 79 79 /* every ORPC call. */ 80 typedef [public] struct 80 typedef [public] struct 81 81 { 82 82 COMVERSION version; /* COM version number */ … … 91 91 /* implicit 'that' pointer which is the first [out] parameter on */ 92 92 /* every ORPC call. */ 93 typedef [public] struct 93 typedef [public] struct 94 94 { 95 95 uint32 flags; /* ORPCF flags for presence of other data */ … … 101 101 /* DUALSTRINGARRAYS are the return type for arrays of network addresses, */ 102 102 /* arrays of endpoints and arrays of both used in many ORPC interfaces */ 103 typedef [public,flag(NDR_NOALIGN)] struct 103 typedef [public,flag(NDR_NOALIGN)] struct 104 104 { 105 105 uint16 wTowerId; /* Cannot be zero. */ 106 nstring NetworkAddr; 106 nstring NetworkAddr; 107 107 } STRINGBINDING; 108 108 109 typedef [public,nopush,nopull,noprint] struct 109 typedef [public,nopush,nopull,noprint] struct 110 110 { 111 111 STRINGBINDING **stringbindings; 112 112 } STRINGARRAY; 113 113 114 typedef [public,nopush,nopull,noprint] struct 114 typedef [public,nopush,nopull,noprint] struct 115 115 { 116 116 STRINGBINDING **stringbindings; … … 119 119 120 120 const uint16 COM_C_AUTHZ_NONE = 0xffff; 121 typedef [public,flag(NDR_NOALIGN)] struct 121 typedef [public,flag(NDR_NOALIGN)] struct 122 122 { 123 123 uint16 wAuthnSvc; /* Cannot be zero. */ 124 124 uint16 wAuthzSvc; 125 nstring PrincName; 125 nstring PrincName; 126 126 } SECURITYBINDING; 127 127 128 128 /* signature value for OBJREF (object reference, actually the */ 129 /* marshaled form of a COM interface). 129 /* marshaled form of a COM interface). 130 130 * MEOW apparently stands for "Microsoft Extended Object Wireformat" 131 131 */ … … 157 157 158 158 /* standard object reference */ 159 typedef [public] struct 159 typedef [public] struct 160 160 { 161 161 uint32 flags; /* STDOBJREF flags (see above) */ … … 191 191 } u_null; 192 192 193 typedef [nodiscriminant] union 193 typedef [nodiscriminant] union 194 194 { 195 195 [case(OBJREF_NULL)] u_null u_null; … … 200 200 201 201 /* OBJREF is the format of a marshaled interface pointer. */ 202 typedef [public,flag(NDR_LITTLE_ENDIAN)] struct 202 typedef [public,flag(NDR_LITTLE_ENDIAN)] struct 203 203 { 204 204 uint32 signature; … … 209 209 210 210 /* wire representation of a marshalled interface pointer */ 211 typedef [public] struct 211 typedef [public] struct 212 212 { 213 213 uint32 size; … … 215 215 } MInterfacePointer; 216 216 217 typedef [v1_enum,public] enum 217 typedef [v1_enum,public] enum 218 218 { 219 219 COM_OK = 0x00000000, -
vendor/current/librpc/idl/oxidresolver.idl
r414 r988 4 4 */ 5 5 6 /* 7 The OXID Resolver can turn a OXID (Object Exporter ID) into a 6 /* 7 The OXID Resolver can turn a OXID (Object Exporter ID) into a 8 8 RPC binding string that can be used to contact an object 9 9 … … 13 13 import "misc.idl", "orpc.idl"; 14 14 15 [ 15 [ 16 16 uuid("99fcfec4-5260-101b-bbcb-00aa0021347a"), 17 17 helpstring("Object Exporter ID Resolver"), … … 30 30 31 31 [idempotent] WERROR ResolveOxid ( 32 33 34 35 36 37 38 32 [in] OXID pOxid, 33 [in] uint16 cRequestedProtseqs, 34 [in, size_is(cRequestedProtseqs)] uint16 arRequestedProtseqs[], 35 [out] DUALSTRINGARRAY **ppdsaOxidBindings, 36 [out,ref] IPID *pipidRemUnknown, 37 [out,ref] uint32 *pAuthnHint 38 ); 39 39 40 40 /* Simple ping is used to ping a Set. Client machines use this */ … … 46 46 [in] SETID *SetId /* Must not be zero */ 47 47 ); 48 48 49 49 /* Complex ping is used to create sets of OIDs to ping. The */ 50 50 /* whole set can subsequently be pinged using SimplePing, */ … … 60 60 [in, size_is(cDelFromSet)] OID DelFromSet[], 61 61 [out,ref] uint16 *PingBackoffFactor/* 2^factor = multipler */ 62 62 ); 63 63 64 64 /* In some cases the client maybe unsure that a particular */ … … 72 72 /* RemoteUnknown IPID and COM version for an object server */ 73 73 /* given its OXID. Supported by DCOM */ 74 /* version 5.2 and above. Looks like that means 74 /* version 5.2 and above. Looks like that means 75 75 * Windows 2003/XP and above */ 76 76 [idempotent] WERROR ResolveOxid2 ( 77 [in] OXID pOxid, 78 [in] uint16 cRequestedProtseqs, 79 [in, size_is(cRequestedProtseqs)] uint16 arRequestedProtseqs[], 80 [out] DUALSTRINGARRAY **pdsaOxidBindings, 81 [out,ref] IPID *ipidRemUnknown, 82 [out,ref] uint32 *AuthnHint, 83 [out,ref] COMVERSION *ComVersion 84 ); 77 [in] OXID pOxid, 78 [in] uint16 cRequestedProtseqs, 79 [in, size_is(cRequestedProtseqs)] uint16 arRequestedProtseqs[], 80 [out] DUALSTRINGARRAY **pdsaOxidBindings, 81 [out,ref] IPID *ipidRemUnknown, 82 [out,ref] uint32 *AuthnHint, 83 [out,ref] COMVERSION *ComVersion 84 ); 85 85 86 typedef struct { 86 87 COMVERSION version; … … 89 90 90 91 [idempotent] WERROR ServerAlive2 ( 91 [out,ref] COMINFO *info, 92 [out,ref] DUALSTRINGARRAY *dualstring, 93 [out,ref] uint8 *unknown2, 94 [out,ref] uint8 *unknown3, 95 [out,ref] uint8 *unknown4); 92 [out,ref] COMINFO *info, 93 [out,ref] DUALSTRINGARRAY **dualstring, 94 [out,ref] uint8 *pReserved 95 ); 96 96 } -
vendor/current/librpc/idl/preg.idl
r740 r988 18 18 interface preg 19 19 { 20 typedef [public ] struct {20 typedef [public,flag(NDR_PAHEX)] struct { 21 21 [charset(DOS),value("["),noprint] uint8 _opening_bracket[2]; 22 22 nstring keyname; -
vendor/current/librpc/idl/remact.idl
r414 r988 13 13 interface IRemoteActivation 14 14 { 15 typedef enum 16 { 15 typedef [v1_enum] enum { 17 16 RPC_C_IMP_LEVEL_DEFAULT = 0, 18 17 RPC_C_IMP_LEVEL_ANONYMOUS = 1, … … 23 22 24 23 const uint32 MODE_GET_CLASS_OBJECT = 0xffffffff; 24 25 25 WERROR RemoteActivation ( 26 27 28 29 [in] [string,charset(UTF16)] uint16 *pwszObjectName,30 [in] MInterfacePointer *pObjectStorage,31 [in] uint32ClientImpLevel,32 33 34 [in,size_is(Interfaces)] GUID *pIIDs,35 36 37 38 [out,ref] DUALSTRINGARRAY*pdsaOxidBindings,39 40 41 42 [out,ref] WERROR*hr,43 [out,size_is(Interfaces)] MInterfacePointer *ifaces[],44 [out,size_is(Interfaces)] WERRORresults[]45 26 [in] ORPCTHIS this_object, 27 [out,ref] ORPCTHAT *that, 28 [in] GUID Clsid, 29 [in] [unique,string,charset(UTF16)] uint16 *pwszObjectName, 30 [in] [unique] MInterfacePointer *pObjectStorage, 31 [in] imp_levels ClientImpLevel, 32 [in] uint32 Mode, 33 [in,range(1,32768)] uint32 Interfaces, 34 [in,unique,size_is(Interfaces)] GUID *pIIDs, 35 [in] uint16 num_protseqs, 36 [in, size_is(num_protseqs)] uint16 protseq[*], 37 [out,ref] hyper *pOxid, 38 [out,ref] DUALSTRINGARRAY **pdsaOxidBindings, 39 [out,ref] GUID *ipidRemUnknown, 40 [out,ref] uint32 *AuthnHint, 41 [out,ref] COMVERSION *ServerVersion, 42 [out,ref] HRESULT *hr, 43 [out,size_is(Interfaces)] MInterfacePointer **ifaces, 44 [out,size_is(Interfaces)] HRESULT results[] 45 ); 46 46 } -
vendor/current/librpc/idl/rot.idl
r414 r988 4 4 uuid("b9e79e60-3d52-11ce-aaa1-00006901293f"), 5 5 version(0.2), 6 7 endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]", 8 6 pointer_default(unique), 7 endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]", 8 "ncalrpc:[EPMAPPER]") 9 9 ] interface rot 10 10 { 11 11 WERROR rot_add ( 12 [in] uint32 flags,13 [in] MInterfacePointer *unk,14 [in] MInterfacePointer *moniker,15 16 17 12 [in] uint32 flags, 13 [in] MInterfacePointer *unk, 14 [in] MInterfacePointer *moniker, 15 [out] uint32 *rotid 16 ); 17 18 18 WERROR rot_remove ( 19 20 21 19 [in] uint32 rotid 20 ); 21 22 22 WERROR rot_is_listed ( 23 24 25 23 [in] MInterfacePointer *moniker 24 ); 25 26 26 WERROR rot_get_interface_pointer ( 27 [in] MInterfacePointer *moniker,28 29 30 27 [in] MInterfacePointer *moniker, 28 [out] MInterfacePointer *ip 29 ); 30 31 31 WERROR rot_set_modification_time ( 32 [in] uint32 rotid,33 34 35 32 [in] uint32 rotid, 33 [in] NTTIME *t 34 ); 35 36 36 WERROR rot_get_modification_time ( 37 38 39 40 37 [in] MInterfacePointer *moniker, 38 [out] NTTIME *t 39 ); 40 41 41 WERROR rot_enum ( 42 43 42 [out] MInterfacePointer *EnumMoniker 43 ); 44 44 } -
vendor/current/librpc/idl/samr.idl
r746 r988 17 17 { 18 18 typedef bitmap security_secinfo security_secinfo; 19 20 /* SAM database types */21 typedef [public,v1_enum] enum {22 SAM_DATABASE_DOMAIN = 0, /* Domain users and groups */23 SAM_DATABASE_BUILTIN = 1, /* BUILTIN users and groups */24 SAM_DATABASE_PRIVS = 2 /* Privileges */25 } netr_SamDatabaseID;26 19 27 20 /* account control (acct_flags) bits */ -
vendor/current/librpc/idl/schannel.idl
r740 r988 5 5 */ 6 6 7 import "netlogon.idl", "nbt.idl" ;7 import "netlogon.idl", "nbt.idl", "misc.idl", "security.idl"; 8 8 9 9 [ 10 10 pointer_default(unique), 11 helper("../librpc/ndr/ndr_schannel.h" )11 helper("../librpc/ndr/ndr_schannel.h", "../librpc/ndr/ndr_nbt.h") 12 12 ] 13 13 interface schannel -
vendor/current/librpc/idl/security.idl
r860 r988 27 27 28 28 [ 29 /* 30 * cbf7d408-2d6c-11e2-ae5b-0b5692790e18 just to make ndrdump happy 31 */ 32 uuid("cbf7d408-2d6c-11e2-ae5b-0b5692790e18"), 33 version(0.0), 29 34 pyhelper("librpc/ndr/py_security.c"), 30 35 pointer_default(unique) … … 148 153 149 154 /* rights granted by some specific privileges */ 150 const int SEC_RIGHTS_PRIV_BACKUP = SEC_STD_READ_CONTROL | 155 const int SEC_RIGHTS_PRIV_BACKUP = SEC_STD_READ_CONTROL | 151 156 SEC_FLAG_SYSTEM_SECURITY | 152 SEC_GENERIC_READ; 153 const int SEC_RIGHTS_DIR_PRIV_BACKUP = SEC_RIGHTS_PRIV_BACKUP 154 | SEC_DIR_TRAVERSE; 155 156 const int SEC_RIGHTS_PRIV_RESTORE = SEC_STD_WRITE_DAC | 157 SEC_RIGHTS_FILE_READ | 158 SEC_DIR_TRAVERSE; 159 160 const int SEC_RIGHTS_PRIV_RESTORE = SEC_STD_WRITE_DAC | 157 161 SEC_STD_WRITE_OWNER | 158 162 SEC_FLAG_SYSTEM_SECURITY | 163 SEC_RIGHTS_FILE_WRITE | 164 SEC_DIR_ADD_FILE | 165 SEC_DIR_ADD_SUBDIR | 159 166 SEC_STD_DELETE; 160 const int SEC_RIGHTS_DIR_PRIV_RESTORE = SEC_RIGHTS_PRIV_RESTORE |161 SEC_DIR_ADD_FILE |162 SEC_DIR_ADD_SUBDIR;163 167 164 168 /* combinations of standard masks. */ … … 270 274 const string SID_BUILTIN_AUTH_ACCESS = "S-1-5-32-560"; 271 275 const string SID_BUILTIN_TS_LICENSE_SERVERS = "S-1-5-32-561"; 276 const string SID_BUILTIN_DISTRIBUTED_COM_USERS = "S-1-5-32-562"; 277 const string SID_BUILTIN_CRYPTO_OPERATORS = "S-1-5-32-569"; 278 const string SID_BUILTIN_EVENT_LOG_READERS = "S-1-5-32-573"; 279 const string SID_BUILTIN_CERT_SERV_DCOM_ACCESS = "S-1-5-32-574"; 272 280 273 281 /* SECURITY_NT_SERVICE */ … … 277 285 const string SID_NT_TRUSTED_INSTALLER = 278 286 "S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464"; 287 288 const string SID_AUTHENTICATION_AUTHORITY_ASSERTED_IDENTITY = "S-1-18-1"; 289 const string SID_SERVICE_ASSERTED_IDENTITY = "S-1-18-2"; 279 290 280 291 /* well-known domain RIDs */ … … 317 328 const int BUILTIN_RID_AUTH_ACCESS = 560; 318 329 const int BUILTIN_RID_TS_LICENSE_SERVERS = 561; 330 const int BUILTIN_RID_DISTRIBUTED_COM_USERS = 562; 331 const int BUILTIN_RID_CRYPTO_OPERATORS = 569; 332 const int BUILTIN_RID_EVENT_LOG_READERS = 573; 333 const int BUILTIN_RID_CERT_SERV_DCOM_ACCESS = 574; 319 334 320 335 /******************************************************************** … … 525 540 security_acl_revision revision; 526 541 [value(ndr_size_security_acl(r,ndr->flags))] uint16 size; 527 [range(0, 1000)] uint32 num_aces;542 [range(0,2000)] uint32 num_aces; 528 543 security_ace aces[num_aces]; 529 544 } security_acl; … … 565 580 } security_descriptor; 566 581 582 [nopython] void decode_security_descriptor ( 583 [in] security_descriptor sd 584 ); 585 567 586 typedef [public] struct { 568 587 [range(0,0x40000),value(ndr_size_security_descriptor(sd,ndr->flags))] uint32 sd_size; … … 570 589 } sec_desc_buf; 571 590 591 [nopython] void decode_sec_desc_buf ( 592 [in] sec_desc_buf sd_buf 593 ); 594 572 595 /* This is not yet sent over the network, but is simply defined in IDL */ 573 typedef [public ,gensize] struct {596 typedef [public] struct { 574 597 uint32 num_sids; 575 598 [size_is(num_sids)] dom_sid sids[*]; … … 578 601 } security_token; 579 602 603 [nopython] void decode_security_token ( 604 [in] security_token token 605 ); 606 580 607 /* This is not yet sent over the network, but is simply defined in IDL */ 581 typedef [public ,gensize] struct {608 typedef [public] struct { 582 609 uid_t uid; 583 uid_t gid;610 gid_t gid; 584 611 uint32 ngroups; 585 612 [size_is(ngroups)] gid_t groups[*]; 586 613 } security_unix_token; 614 615 [nopython] void decode_security_unix_token ( 616 [in] security_unix_token unix_token 617 ); 587 618 588 619 /* bits that determine which parts of a security descriptor … … 603 634 } security_secinfo; 604 635 636 /* 637 * a SMB server should only support the following flags 638 * and ignore all others. 639 * 640 * See AdditionalInformation in [MS-SMB2] 2.2.37 SMB2 QUERY_INFO Request 641 * and 2.2.39 SMB2 SET_INFO Request. 642 */ 643 const int SMB_SUPPORTED_SECINFO_FLAGS = ( 644 SECINFO_OWNER | 645 SECINFO_GROUP | 646 SECINFO_DACL | 647 SECINFO_SACL | 648 SECINFO_LABEL | 649 SECINFO_ATTRIBUTE | 650 SECINFO_SCOPE | 651 SECINFO_BACKUP | 652 0); 653 654 /* 655 * See [MS-KILE] 2.2.5 LSAP_TOKEN_INFO_INTEGRITY 656 */ 657 typedef [public,gensize,flag(NDR_PAHEX)] struct { 658 uint32 Flags; 659 uint32 TokenIL; 660 uint8 MachineId[32]; 661 } LSAP_TOKEN_INFO_INTEGRITY; 662 663 /* 664 * See [MS-KILE] 2.2.6 Supported Encryption Types Bit Flags 665 */ 605 666 typedef [public,bitmap32bit] bitmap { 606 667 KERB_ENCTYPE_DES_CBC_CRC = 0x00000001, … … 608 669 KERB_ENCTYPE_RC4_HMAC_MD5 = 0x00000004, 609 670 KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96 = 0x00000008, 610 KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96 = 0x00000010 671 KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96 = 0x00000010, 672 KERB_ENCTYPE_FAST_SUPPORTED = 0x00010000, 673 KERB_ENCTYPE_COMPOUND_IDENTITY_SUPPORTED = 0x00020000, 674 KERB_ENCTYPE_CLAIMS_SUPPORTED = 0x00040000, 675 KERB_ENCTYPE_RESOURCE_SID_COMPRESSION_DISABLED = 0x00080000 611 676 } kerb_EncTypes; 612 677 … … 629 694 const string GUID_DRS_CHANGE_SCHEMA_MASTER = "e12b56b6-0a95-11d1-adbb-00c04fd8d5cd"; 630 695 const string GUID_DRS_GET_CHANGES = "1131f6aa-9c07-11d1-f79f-00c04fc2dcd2"; 696 const string GUID_DRS_REPL_SYNCRONIZE = "1131f6ab-9c07-11d1-f79f-00c04fc2dcd2"; 697 const string GUID_DRS_MANAGE_TOPOLOGY = "1131f6ac-9c07-11d1-f79f-00c04fc2dcd2"; 631 698 const string GUID_DRS_GET_ALL_CHANGES = "1131f6ad-9c07-11d1-f79f-00c04fc2dcd2"; 699 const string GUID_DRS_RO_REPL_SECRET_SYNC = "1131f6ae-9c07-11d1-f79f-00c04fc2dcd2"; 632 700 const string GUID_DRS_GET_FILTERED_ATTRIBUTES = "89e95b76-444d-4c62-991a-0facbeda640c"; 633 const string GUID_DRS_MANAGE_TOPOLOGY = "1131f6ac-9c07-11d1-f79f-00c04fc2dcd2";634 701 const string GUID_DRS_MONITOR_TOPOLOGY = "f98340fb-7c5b-4cdb-a00b-2ebdfa115a96"; 635 const string GUID_DRS_REPL_SYNCRONIZE = "1131f6ab-9c07-11d1-f79f-00c04fc2dcd2";636 const string GUID_DRS_RO_REPL_SECRET_SYNC = "1131f6ae-9c07-11d1-f79f-00c04fc2dcd2";637 702 const string GUID_DRS_USER_CHANGE_PASSWORD = "ab721a53-1e2f-11d0-9819-00aa0040529b"; 638 703 const string GUID_DRS_FORCE_CHANGE_PASSWORD = "00299570-246d-11d0-a768-00aa006e0529"; 704 const string GUID_DRS_UPDATE_PASSWORD_NOT_REQUIRED_BIT 705 = "280f369c-67c7-438e-ae98-1d46f3c6f541"; 706 const string GUID_DRS_UNEXPIRE_PASSWORD = "ccc2dc7d-a6ad-4a7a-8846-c04e3cc53501"; 707 const string GUID_DRS_ENABLE_PER_USER_REVERSIBLY_ENCRYPTED_PASSWORD 708 = "05c74c5e-4deb-43b4-bd9f-86664c2a7fd5"; 709 const string GUID_DRS_DS_INSTALL_REPLICA = "9923a32a-3607-11d2-b9be-0000f87a36b2"; 710 const string GUID_DRS_REANIMATE_TOMBSTONE = "45ec5156-db7e-47bb-b53f-dbeb2d03c40f"; 711 639 712 640 713 /***************************************************************/ -
vendor/current/librpc/idl/spoolss.idl
r860 r988 29 29 } spoolss_Time; 30 30 31 typedef struct {31 typedef [public] struct { 32 32 [value(ndr_size_spoolss_Time(time, ndr->flags))] uint32 size; 33 33 [unique] spoolss_Time *time; … … 36 36 typedef enum { 37 37 PROCESSOR_ARCHITECTURE_INTEL = 0x0000, 38 PROCESSOR_ARCHITECTURE_ARM = 0x0005, 38 39 PROCESSOR_ARCHITECTURE_IA64 = 0x0006, 39 40 PROCESSOR_ARCHITECTURE_AMD64 = 0x0009 … … 41 42 42 43 typedef [v1_enum] enum { 44 PROCESSOR_ARM = 0x00000000, 43 45 PROCESSOR_INTEL_386 = 0x00000182, 44 46 PROCESSOR_INTEL_486 = 0x000001E6, … … 426 428 [value(SPOOLSS_DM_SIGNATURE_JTEXP)] spoolss_DM_Signature dwSignature; 427 429 [value(0)] uint32 dwVersion; 428 [value(16)] uint 32wJTHdrSize;429 uint 32 wCoreMFOSize;430 [string,charset(UTF16)] uint16 *ModelName;431 nstring_array FeatureOptionPairs;430 [value(16)] uint16 wJTHdrSize; 431 uint16 wCoreMFOSize; /* must be sizeof the two following elements, must be dwSize - 16*/ 432 nstring ModelName; 433 [flag(STR_UTF8|STR_NULLTERM|NDR_REMAINING)] string_array FeatureOptionPairs; 432 434 } spoolss_JTEXP; 433 435 … … 884 886 /******************/ 885 887 /* Function: 0x01 */ 886 typedef struct {888 typedef [public] struct { 887 889 [value(_ndr_size_spoolss_DeviceMode(devmode, ndr->flags))] uint32 _ndr_size; 888 890 [subcontext(4),subcontext_size(_ndr_size)] spoolss_DeviceMode *devmode; … … 1010 1012 [string,charset(UTF16)] uint16 *parameters; 1011 1013 [string,charset(UTF16)] uint16 *driver_name; 1012 uint32 _devmode_ptr; /* pointer to truncated devicemode */1014 uint32 *_devmode_ptr; /* pointer to truncated devicemode */ 1013 1015 [string,charset(UTF16)] uint16 *text_status; 1014 uint32 _secdesc_ptr;1016 uint32 *_secdesc_ptr; 1015 1017 spoolss_JobStatus status; 1016 1018 [range(0,99)] uint32 priority; … … 1036 1038 [string,charset(UTF16)] uint16 *parameters; 1037 1039 [string,charset(UTF16)] uint16 *driver_name; 1038 uint32 _devmode_ptr; /* pointer to truncated devicemode */1040 uint32 *_devmode_ptr; /* pointer to truncated devicemode */ 1039 1041 [string,charset(UTF16)] uint16 *text_status; 1040 uint32 _secdesc_ptr;1042 uint32 *_secdesc_ptr; 1041 1043 spoolss_JobStatus status; 1042 1044 [range(0,99)] uint32 priority; … … 1052 1054 } spoolss_SetJobInfo4; 1053 1055 1054 typedef [ public] union {1056 typedef [ms_union,public] union { 1055 1057 [case(1)] spoolss_SetJobInfo1 *info1; 1056 1058 [case(2)] spoolss_SetJobInfo2 *info2; … … 1060 1062 } spoolss_SetJobInfo; 1061 1063 1062 typedef struct {1064 typedef [public] struct { 1063 1065 uint32 level; 1064 1066 [switch_is(level)] spoolss_SetJobInfo info; … … 1066 1068 1067 1069 typedef [v1_enum] enum { 1070 SPOOLSS_JOB_CONTROL_NOOP = 0, 1068 1071 SPOOLSS_JOB_CONTROL_PAUSE = 1, 1069 1072 SPOOLSS_JOB_CONTROL_RESUME = 2, … … 1199 1202 [string,charset(UTF16)] uint16 *comment; 1200 1203 [string,charset(UTF16)] uint16 *location; 1201 uint32 devmode_ptr;1204 uint32 *devmode_ptr; 1202 1205 [string,charset(UTF16)] uint16 *sepfile; 1203 1206 [string,charset(UTF16)] uint16 *printprocessor; 1204 1207 [string,charset(UTF16)] uint16 *datatype; 1205 1208 [string,charset(UTF16)] uint16 *parameters; 1206 uint32 secdesc_ptr;1209 uint32 *secdesc_ptr; 1207 1210 spoolss_PrinterAttributes attributes; 1208 1211 [range(0,99)] uint32 priority; … … 1216 1219 1217 1220 typedef struct { 1218 uint32 sec_desc_ptr;1221 uint32 *sec_desc_ptr; 1219 1222 } spoolss_SetPrinterInfo3; 1220 1223 … … 1243 1246 1244 1247 typedef struct { 1245 uint32 devmode_ptr;1248 uint32 *devmode_ptr; 1246 1249 } spoolss_SetPrinterInfo8; 1247 1250 1248 1251 typedef struct { 1249 uint32 devmode_ptr;1252 uint32 *devmode_ptr; 1250 1253 } spoolss_SetPrinterInfo9; 1251 1254 1252 typedef [ switch_type(uint32)] union {1255 typedef [ms_union,switch_type(uint32)] union { 1253 1256 [case(0)] spoolss_SetPrinterInfo0 *info0; 1254 1257 [case(1)] spoolss_SetPrinterInfo1 *info1; … … 1264 1267 } spoolss_SetPrinterInfo; 1265 1268 1266 typedef struct {1269 typedef [public] struct { 1267 1270 uint32 level; 1268 1271 [switch_is(level)] spoolss_SetPrinterInfo info; 1269 1272 } spoolss_SetPrinterInfoCtr; 1270 1273 1271 WERROR spoolss_SetPrinter(1274 [public] WERROR spoolss_SetPrinter( 1272 1275 [in,ref] policy_handle *handle, 1273 1276 [in,ref] spoolss_SetPrinterInfoCtr *info_ctr, … … 1348 1351 1349 1352 typedef [bitmap32bit] bitmap { 1350 PRINTER_DRIVER_PACKAGE_AWARE = 0x00000002 1353 PRINTER_DRIVER_PACKAGE_AWARE = 0x00000001, 1354 PRINTER_DRIVER_XPS = 0x00000002, 1355 PRINTER_DRIVER_SANDBOX_ENABLED = 0x00000004, 1356 PRINTER_DRIVER_CLASS = 0x00000008, 1357 PRINTER_DRIVER_DERIVED = 0x00000010, 1358 PRINTER_DRIVER_NOT_SHAREABLE = 0x00000020, 1359 PRINTER_DRIVER_CATEGORY_FAX = 0x00000040, 1360 PRINTER_DRIVER_CATEGORY_FILE = 0x00000080, 1361 PRINTER_DRIVER_CATEGORY_VIRTUAL = 0x00000100, 1362 PRINTER_DRIVER_CATEGORY_SERVICE = 0x00000200, 1363 PRINTER_DRIVER_SOFT_RESET_REQUIRED = 0x00000400 1351 1364 } spoolss_DriverAttributes; 1352 1365 … … 1410 1423 spoolss_StringArray *color_profiles; 1411 1424 [string,charset(UTF16)] uint16 *inf_path; 1412 uint32printer_driver_attributes;1425 spoolss_DriverAttributes printer_driver_attributes; 1413 1426 [value(((ndr_size_spoolss_StringArray(core_driver_dependencies, ndr->flags)-4)/2))] uint32 _ndr_size_core_driver_dependencies; 1414 1427 spoolss_StringArray *core_driver_dependencies; … … 1417 1430 } spoolss_AddDriverInfo8; 1418 1431 1419 typedef [ switch_type(uint32)] union {1432 typedef [ms_union,switch_type(uint32)] union { 1420 1433 [case(1)] spoolss_AddDriverInfo1 *info1; 1421 1434 [case(2)] spoolss_AddDriverInfo2 *info2; … … 1426 1439 } spoolss_AddDriverInfo; 1427 1440 1428 typedef struct {1441 typedef [public] struct { 1429 1442 uint32 level; 1430 1443 [switch_is(level)] spoolss_AddDriverInfo info; … … 1538 1551 [relative] nstring_array *color_profiles; 1539 1552 [relative] nstring *inf_path; 1540 uint32printer_driver_attributes;1553 spoolss_DriverAttributes printer_driver_attributes; 1541 1554 [relative] nstring_array *core_driver_dependencies; 1542 1555 NTTIME min_inbox_driver_ver_date; … … 1735 1748 } spoolss_DocumentInfo1; 1736 1749 1737 typedef [ switch_type(uint32)] union {1750 typedef [ms_union,switch_type(uint32)] union { 1738 1751 [case(1)] spoolss_DocumentInfo1 *info1; 1739 1752 [case(2)]; /* TODO */ … … 1742 1755 } spoolss_DocumentInfo; 1743 1756 1757 typedef [public] struct { 1758 uint32 level; 1759 [switch_is(level)] spoolss_DocumentInfo info; 1760 } spoolss_DocumentInfoCtr; 1761 1744 1762 WERROR spoolss_StartDocPrinter( 1745 1763 [in,ref] policy_handle *handle, 1746 [in] uint32 level, 1747 [in,switch_is(level)] spoolss_DocumentInfo info, 1764 [in,ref] spoolss_DocumentInfoCtr *info_ctr, 1748 1765 [out,ref] uint32 *job_id 1749 1766 ); … … 1818 1835 const string SPL_ARCH_IA64 = "IA64"; 1819 1836 const string SPL_ARCH_X64 = "x64"; 1837 const string SPL_ARCH_ARM = "ARM"; 1820 1838 1821 1839 const string SPOOLSS_ARCHITECTURE_ALL = "All"; … … 1825 1843 const string SPOOLSS_ARCHITECTURE_x64 = "Windows x64"; 1826 1844 const string SPOOLSS_ARCHITECTURE_4_0 = "Windows 4.0"; 1845 const string SPOOLSS_ARCHITECTURE_ARM = "Windows ARM"; 1827 1846 const string SPOOLSS_DEFAULT_SERVER_PATH = "C:\\WINDOWS\\system32\\spool"; 1828 1847 … … 2030 2049 } spoolss_AddFormInfo2; 2031 2050 2032 typedef [ switch_type(uint32)] union {2051 typedef [ms_union,switch_type(uint32)] union { 2033 2052 [case(1)] spoolss_AddFormInfo1 *info1; 2034 2053 [case(2)] spoolss_AddFormInfo2 *info2; 2035 2054 } spoolss_AddFormInfo; 2036 2055 2056 typedef [public] struct { 2057 uint32 level; 2058 [switch_is(level)] spoolss_AddFormInfo info; 2059 } spoolss_AddFormInfoCtr; 2060 2037 2061 WERROR spoolss_AddForm( 2038 2062 [in,ref] policy_handle *handle, 2039 [in] uint32 level, 2040 [in,switch_is(level)] spoolss_AddFormInfo info 2063 [in,ref] spoolss_AddFormInfoCtr *info_ctr 2041 2064 ); 2042 2065 … … 2065 2088 [in,ref] policy_handle *handle, 2066 2089 [in] [string,charset(UTF16)] uint16 form_name[], 2067 [in] uint32 level, 2068 [in,switch_is(level)] spoolss_AddFormInfo info 2090 [in,ref] spoolss_AddFormInfoCtr *info_ctr 2069 2091 ); 2070 2092 … … 2259 2281 } spoolss_SetPortInfoFF; 2260 2282 2261 typedef [ switch_type(uint32)] union {2283 typedef [ms_union,switch_type(uint32)] union { 2262 2284 [case(1)] spoolss_SetPortInfo1 *info1; 2263 2285 [case(2)] spoolss_SetPortInfo2 *info2; … … 2266 2288 } spoolss_SetPortInfo; 2267 2289 2268 typedef struct {2290 typedef [public] struct { 2269 2291 uint32 level; 2270 2292 [switch_is(level)] spoolss_SetPrinterInfo info; … … 2300 2322 /******************/ 2301 2323 /* Function: 0x29 */ 2302 [todo] WERROR spoolss_PlayGDIScriptOnPrinterIC( 2324 2325 typedef struct { 2326 uint32 Checksum; 2327 uint32 Index; 2328 } UNIVERSAL_FONT_ID; 2329 2330 typedef [public] struct { 2331 uint32 count; 2332 UNIVERSAL_FONT_ID fonts[count]; 2333 } UNIVERSAL_FONT_ID_ctr; 2334 2335 WERROR spoolss_PlayGDIScriptOnPrinterIC( 2336 [in,ref] policy_handle *gdi_handle, 2337 [in,ref] [size_is(cIn)] uint8 *pIn, 2338 [in] uint32 cIn, 2339 [out,ref] [size_is(cOut)] uint8 *pOut, 2340 [in] uint32 cOut, 2341 [in] uint32 ul 2303 2342 ); 2304 2343 … … 2328 2367 /******************/ 2329 2368 /* Function: 0x2e */ 2369 2370 typedef struct { 2371 [string,charset(URF16)] uint16 *monitor_name; 2372 } spoolss_AddMonitorInfo1; 2373 2374 typedef struct { 2375 [string,charset(URF16)] uint16 *monitor_name; 2376 [string,charset(URF16)] uint16 *environment; 2377 [string,charset(URF16)] uint16 *dll_name; 2378 } spoolss_AddMonitorInfo2; 2379 2380 typedef [ms_union,switch_type(uint32)] union { 2381 [case(1)] spoolss_AddMonitorInfo1 *info1; 2382 [case(2)] spoolss_AddMonitorInfo2 *info2; 2383 } spoolss_AddMonitorInfo; 2384 2385 typedef [public] struct { 2386 uint32 level; 2387 [switch_is(level)] spoolss_MonitorInfo info; 2388 } spoolss_MonitorContainer; 2389 2330 2390 [todo] WERROR spoolss_AddMonitor( 2331 2391 ); … … 2338 2398 /******************/ 2339 2399 /* Function: 0x30 */ 2340 [todo] WERROR spoolss_DeletePrintProcessor( 2400 WERROR spoolss_DeletePrintProcessor( 2401 [in,unique] [string,charset(UTF16)] uint16 *server, 2402 [in,unique] [string,charset(UTF16)] uint16 *architecture, 2403 [in] [string,charset(UTF16)] uint16 print_processor_name[] 2341 2404 ); 2342 2405 … … 2512 2575 /* Function: 0x3d */ 2513 2576 2514 typedef struct {2577 typedef [public] struct { 2515 2578 uint32 monitor_data_size; 2516 2579 [size_is(monitor_data_size),unique] uint8 *monitor_data; … … 2623 2686 } spoolssNotifyOptionFlags; 2624 2687 2625 typedef struct {2688 typedef [public] struct { 2626 2689 [value(2)] uint32 version; 2627 2690 spoolssNotifyOptionFlags flags; … … 2655 2718 } spoolss_NotifyTable; 2656 2719 2657 typedef [ switch_type(uint32)] union {2720 typedef [ms_union, switch_type(uint32)] union { 2658 2721 [case(1)] uint32 integer[2]; 2659 2722 [case(2)] spoolss_NotifyString string; … … 2671 2734 } spoolss_Notify; 2672 2735 2673 typedef struct {2736 typedef [public] struct { 2674 2737 [value(2)] uint32 version; 2675 2738 uint32 flags; … … 2678 2741 } spoolss_NotifyInfo; 2679 2742 2680 typedef [ switch_type(uint32)] union {2743 typedef [ms_union,switch_type(uint32)] union { 2681 2744 [case(0)] spoolss_NotifyInfo *info0; 2682 2745 } spoolss_ReplyPrinterInfo; … … 2738 2801 } spoolss_UserLevel3; 2739 2802 2740 typedef [ switch_type(uint32)] union {2803 typedef [ms_union,switch_type(uint32)] union { 2741 2804 [case(1)] spoolss_UserLevel1 *level1; 2742 2805 [case(2)] spoolss_UserLevel2 *level2; … … 2744 2807 } spoolss_UserLevel; 2745 2808 2746 typedef struct {2809 typedef [public] struct { 2747 2810 uint32 level; 2748 2811 [switch_is(level)] spoolss_UserLevel user_info; … … 2818 2881 [in] spoolss_DevmodeContainer devmode_ctr, 2819 2882 [in] spoolss_AccessRights access_mask, 2820 [in] uint32 level, 2821 [in,switch_is(level)] spoolss_UserLevel userlevel, 2883 [in] spoolss_UserLevelCtr userlevel_ctr, 2822 2884 [out,ref] policy_handle *handle 2823 2885 ); … … 3015 3077 } spoolss_PortProtocol; 3016 3078 3017 typedef [public ] struct {3079 typedef [public,gensize] struct { 3018 3080 [charset(UTF16)] uint16 portname[64]; 3019 3081 [value(0x00000001)] uint32 version; 3020 3082 spoolss_PortProtocol protocol; 3021 [value( sizeof(r))] uint32 size;3083 [value(ndr_size_spoolss_PortData1(r, ndr->flags))] uint32 size; 3022 3084 uint32 reserved; 3023 3085 [charset(UTF16)] uint16 hostaddress[49]; … … 3033 3095 } spoolss_PortData1; 3034 3096 3035 typedef [public ] struct {3097 typedef [public,gensize] struct { 3036 3098 [charset(UTF16)] uint16 portname[64]; 3037 3099 [value(0x00000002)] uint32 version; 3038 3100 spoolss_PortProtocol protocol; 3039 [value( sizeof(r))] uint32 size;3101 [value(ndr_size_spoolss_PortData2(r, ndr->flags))] uint32 size; 3040 3102 uint32 reserved; 3041 3103 [charset(UTF16)] uint16 hostaddress[128]; … … 3122 3184 /******************/ 3123 3185 /* Function: 0x61 */ 3124 [todo] WERROR spoolss_61( 3186 3187 const string BIDI_ACTION_ENUM_SCHEMA = "EnumSchema"; 3188 const string BIDI_ACTION_GET = "Get"; 3189 const string BIDI_ACTION_SET = "Set"; 3190 const string BIDI_ACTION_GET_ALL = "GetAll"; 3191 3192 typedef enum { 3193 BIDI_NULL = 0x00000000, 3194 BIDI_INT = 0x00000001, 3195 BIDI_FLOAT = 0x00000002, 3196 BIDI_BOOL = 0x00000003, 3197 BIDI_STRING = 0x00000004, 3198 BIDI_TEXT = 0x00000005, 3199 BIDI_ENUM = 0x00000006, 3200 BIDI_BLOB = 0x00000007 3201 } BIDI_TYPE; 3202 3203 typedef struct { 3204 uint32 cbBuf; 3205 [size_is(cbBuf), unique] uint8 *pszString; 3206 } RPC_BINARY_CONTAINER; 3207 3208 typedef [ms_union,switch_type(uint32)] union { 3209 [case(BIDI_NULL)] uint32 bData; 3210 [case(BIDI_BOOL)] uint32 bData; 3211 [case(BIDI_INT)] uint32 iData; 3212 [case(BIDI_STRING)] [unique] [string,charset(UTF16)] uint16 *sData; 3213 [case(BIDI_TEXT)] [unique] [string,charset(UTF16)] uint16 *sData; 3214 [case(BIDI_ENUM)] [unique] [string,charset(UTF16)] uint16 *sData; 3215 /*[case(BIDI_FLOAT)] float fData;*/ 3216 [case(BIDI_BLOB)] RPC_BINARY_CONTAINER biData; 3217 } RPC_BIDI_DATA_u; 3218 3219 typedef struct { 3220 uint32 dwBidiType; 3221 [switch_is(dwBidiType)] RPC_BIDI_DATA_u u; 3222 } RPC_BIDI_DATA; 3223 3224 typedef struct { 3225 uint32 dwReqNumber; 3226 [unique] [string,charset(UTF16)] uint16 *pSchema; 3227 RPC_BIDI_DATA data; 3228 } RPC_BIDI_REQUEST_DATA; 3229 3230 typedef [public] struct { 3231 [value(1)] uint32 Version; 3232 uint32 Flags; 3233 uint32 Count; 3234 [size_is(Count), unique] RPC_BIDI_REQUEST_DATA *aData[]; 3235 } RPC_BIDI_REQUEST_CONTAINER; 3236 3237 typedef struct { 3238 uint32 dwResult; 3239 uint32 dwReqNumber; 3240 [unique] [string,charset(UTF16)] uint16 *pSchema; 3241 RPC_BIDI_DATA data; 3242 } RPC_BIDI_RESPONSE_DATA; 3243 3244 typedef [public] struct { 3245 [value(1)] uint32 Version; 3246 uint32 Flags; 3247 uint32 Count; 3248 [size_is(Count), unique] RPC_BIDI_RESPONSE_DATA *aData[]; 3249 } RPC_BIDI_RESPONSE_CONTAINER; 3250 3251 WERROR spoolss_RpcSendRecvBidiData( 3252 [in] policy_handle hPrinter, 3253 [in,unique] [string,charset(UTF16)] uint16 *pAction, 3254 [in] RPC_BIDI_REQUEST_CONTAINER *pReqData, 3255 [out] RPC_BIDI_RESPONSE_CONTAINER **ppRespData 3125 3256 ); 3126 3257 … … 3147 3278 /******************/ 3148 3279 /* Function: 0x66 */ 3149 typedef struct {3280 typedef [public] struct { 3150 3281 GUID core_driver_guid; 3151 3282 NTTIME driver_date; … … 3154 3285 } spoolss_CorePrinterDriver; 3155 3286 3156 WERROR spoolss_GetCorePrinterDrivers(3287 [public] WERROR spoolss_GetCorePrinterDrivers( 3157 3288 [in,unique] [string,charset(UTF16)] uint16 *servername, 3158 3289 [in,ref] [string,charset(UTF16)] uint16 *architecture, … … 3204 3335 [todo] WERROR spoolss_6d( 3205 3336 ); 3337 3338 /******************/ 3339 /* Function: 0x6e */ 3340 3341 const string SPLFILE_CONTENT_TYPE_PROP_NAME = "Spool File Contents"; 3342 const string SPLFILE_CONTENT_TYPE_XPS_MS = "TYPE_XPS_MS"; 3343 const string SPLFILE_CONTENT_TYPE_XPS_OPEN = "TYPE_XPS_OPEN"; 3344 const string SPLFILE_CONTENT_TYPE_PDL_POSTSCRIPT = "TYPE_PDL_POSTSCRIPT"; 3345 const string SPLFILE_CONTENT_TYPE_PDL_UNKNOWN = "TYPE_PDL_UNKNOWN"; 3346 3347 typedef enum { 3348 kRpcPropertyTypeString = 1, 3349 kRpcPropertyTypeInt32 = 2, 3350 kRpcPropertyTypeInt64 = 3, 3351 kRpcPropertyTypeByte = 4, 3352 kRpcPropertyTypeBuffer = 5 3353 } RPC_EPrintPropertyType; 3354 3355 typedef struct { 3356 uint32 cbBuf; 3357 [size_is(cbBuf)] uint8 *pBuf; 3358 } propertyBlob; 3359 3360 typedef [ms_union,switch_type(RPC_EPrintPropertyType)] union { 3361 [case(kRpcPropertyTypeString)] [string,charset(UTF16)] uint16 *propertyString; 3362 [case(kRpcPropertyTypeInt32)] uint32 propertyInt32; 3363 [case(kRpcPropertyTypeInt64)] hyper propertyInt64; 3364 [case(kRpcPropertyTypeByte)] uint8 propertyByte; 3365 [case(kRpcPropertyTypeBuffer)] propertyBlob propertyBlob; 3366 } RPC_PrintPropertyValueUnion; 3367 3368 typedef [public] struct { 3369 RPC_EPrintPropertyType ePropertyType; 3370 [switch_is(ePropertyType)] RPC_PrintPropertyValueUnion value; 3371 } RPC_PrintPropertyValue; 3372 3373 typedef [public] struct { 3374 [string,charset(UTF16)] uint16 *propertyName; 3375 RPC_PrintPropertyValue propertyValue; 3376 } RPC_PrintNamedProperty; 3377 3378 WERROR spoolss_RpcGetJobNamedPropertyValue( 3379 [in,ref] policy_handle *hPrinter, 3380 [in] uint32 JobId, 3381 [in] [string,charset(UTF16)] uint16 *pszName, 3382 [out,ref] RPC_PrintPropertyValue *pValue 3383 ); 3384 3385 /******************/ 3386 /* Function: 0x6f */ 3387 [public] WERROR spoolss_RpcSetJobNamedProperty( 3388 [in,ref] policy_handle *hPrinter, 3389 [in] uint32 JobId, 3390 [in,ref] RPC_PrintNamedProperty *pProperty 3391 ); 3392 3393 /******************/ 3394 /* Function: 0x70 */ 3395 WERROR spoolss_RpcDeleteJobNamedProperty( 3396 [in,ref] policy_handle *hPrinter, 3397 [in] uint32 JobId, 3398 [in] [string,charset(UTF16)] uint16 *pszName 3399 ); 3400 3401 /******************/ 3402 /* Function: 0x71 */ 3403 WERROR spoolss_RpcEnumJobNamedProperties( 3404 [in,ref] policy_handle *hPrinter, 3405 [in] uint32 JobId, 3406 [out,ref] uint32 *pcProperties, 3407 [out,ref,size_is(,*pcProperties)] RPC_PrintNamedProperty **ppProperties 3408 ); 3206 3409 } -
vendor/current/librpc/idl/srvsvc.idl
r740 r988 415 415 STYPE_IPC = 3, /* Interprocess communication (IPC) */ 416 416 STYPE_IPC_TEMPORARY = STYPE_IPC|STYPE_TEMPORARY, 417 STYPE_IPC_HIDDEN = STYPE_IPC|STYPE_HIDDEN 417 STYPE_IPC_HIDDEN = STYPE_IPC|STYPE_HIDDEN, 418 STYPE_CLUSTER_FS = 0x02000000, /* A cluster share */ 419 STYPE_CLUSTER_FS_TEMPORARY = STYPE_CLUSTER_FS|STYPE_TEMPORARY, 420 STYPE_CLUSTER_FS_HIDDEN = STYPE_CLUSTER_FS|STYPE_HIDDEN, 421 STYPE_CLUSTER_SOFS = 0x04000000, /* A Scale-Out cluster share */ 422 STYPE_CLUSTER_SOFS_TEMPORARY = STYPE_CLUSTER_SOFS|STYPE_TEMPORARY, 423 STYPE_CLUSTER_SOFS_HIDDEN = STYPE_CLUSTER_SOFS|STYPE_HIDDEN, 424 STYPE_CLUSTER_DFS = 0x08000000, /* A DFS share in a cluster */ 425 STYPE_CLUSTER_DFS_TEMPORARY = STYPE_CLUSTER_DFS|STYPE_TEMPORARY, 426 STYPE_CLUSTER_DFS_HIDDEN = STYPE_CLUSTER_DFS|STYPE_HIDDEN 418 427 } srvsvc_ShareType; 419 428 … … 492 501 } srvsvc_NetShareCtr1004; 493 502 503 const uint32 SHARE_1005_CSC_CACHE_MANUAL_REINT = 0x00000000; 504 494 505 typedef bitmap { 495 SHARE_1005_IN_DFS = 0x00000001, 496 SHARE_1005_DFS_ROOT = 0x00000002 506 SHARE_1005_IN_DFS = 0x00000001, 507 SHARE_1005_DFS_ROOT = 0x00000002, 508 SHARE_1005_CSC_CACHE_AUTO_REINT = 0x00000010, 509 SHARE_1005_CSC_CACHE_VDO = 0x00000020, 510 SHARE_1005_CSC_CACHE_NONE = 0x00000030, 511 SHARE_1005_RESTRICT_EXCLUSIVE_OPENS = 0x00000100, 512 SHARE_1005_FORCE_SHARED_DELETE = 0x00000200, 513 SHARE_1005_ALLOW_NAMESPACE_CACHING = 0x00000400, 514 SHARE_1005_ACCESS_BASED_DIRECTORY_ENUM = 0x00000800, 515 SHARE_1005_FORCE_LEVELII_OPLOCK = 0x00001000, 516 SHARE_1005_ENABLE_HASH = 0x00002000, 517 SHARE_1005_ENABLE_CA = 0x00004000, 518 SHARE_1005_ENCRYPT_DATA = 0x00008000 497 519 } NetShareInfo1005Flags; 498 520 -
vendor/current/librpc/idl/svcctl.idl
r414 r988 81 81 const int SERVICE_TYPE_INTERACTIVE_PROCESS = 0x100; 82 82 83 typedef [public,bitmap32bit] bitmap {84 SV_TYPE_WORKSTATION = 0x00000001,85 SV_TYPE_SERVER = 0x00000002,86 SV_TYPE_SQLSERVER = 0x00000004,87 SV_TYPE_DOMAIN_CTRL = 0x00000008,88 SV_TYPE_DOMAIN_BAKCTRL = 0x00000010,89 SV_TYPE_TIME_SOURCE = 0x00000020,90 SV_TYPE_AFP = 0x00000040,91 SV_TYPE_NOVELL = 0x00000080,92 93 SV_TYPE_DOMAIN_MEMBER = 0x00000100,94 SV_TYPE_PRINTQ_SERVER = 0x00000200,95 SV_TYPE_DIALIN_SERVER = 0x00000400,96 SV_TYPE_SERVER_UNIX = 0x00000800,97 SV_TYPE_NT = 0x00001000,98 SV_TYPE_WFW = 0x00002000,99 SV_TYPE_SERVER_MFPN = 0x00004000,100 SV_TYPE_SERVER_NT = 0x00008000,101 SV_TYPE_POTENTIAL_BROWSER = 0x00010000,102 SV_TYPE_BACKUP_BROWSER = 0x00020000,103 SV_TYPE_MASTER_BROWSER = 0x00040000,104 SV_TYPE_DOMAIN_MASTER = 0x00080000,105 SV_TYPE_SERVER_OSF = 0x00100000,106 SV_TYPE_SERVER_VMS = 0x00200000,107 SV_TYPE_WIN95_PLUS = 0x00400000,108 SV_TYPE_DFS_SERVER = 0x00800000,109 SV_TYPE_ALTERNATE_XPORT = 0x20000000,110 SV_TYPE_LOCAL_LIST_ONLY = 0x40000000,111 SV_TYPE_DOMAIN_ENUM = 0x80000000112 } svcctl_ServerType;113 114 const uint32 SV_TYPE_ALL = 0xFFFFFFFF;115 116 83 /*****************/ 117 84 /* Function 0x00 */ … … 518 485 [in,ref] policy_handle *scmanager_handle, 519 486 [in,unique] [string,charset(UTF16)] uint16 *ServiceName, 520 [in] uint32 access_mask 487 [in] uint32 access_mask, 488 [out,ref] policy_handle *handle 521 489 ); 522 490 -
vendor/current/librpc/idl/winreg.idl
r740 r988 19 19 */ 20 20 21 typedef [ bitmap32bit] bitmap {21 typedef [public,bitmap32bit] bitmap { 22 22 KEY_QUERY_VALUE = 0x00001, 23 23 KEY_SET_VALUE = 0x00002, -
vendor/current/librpc/idl/wmi.idl
r740 r988 36 36 37 37 [ 38 uuid( 9A653086-174F-11d2-B5F9-00104B703EFD)38 uuid("9A653086-174F-11d2-B5F9-00104B703EFD") 39 39 ] 40 40 coclass WbemClassObject … … 487 487 [ 488 488 object, 489 uuid( 027947e1-d731-11ce-a357-000000000001),489 uuid("027947e1-d731-11ce-a357-000000000001"), 490 490 pointer_default(unique) 491 491 ] interface IEnumWbemClassObject : IUnknown … … 670 670 object, 671 671 /* restricted, */ 672 uuid( 44aca675-e8fc-11d0-a07c-00c04fb68820)672 uuid("44aca675-e8fc-11d0-a07c-00c04fb68820") 673 673 ] interface IWbemCallResult : IUnknown 674 674 { … … 698 698 object, 699 699 restricted, 700 uuid( 7c857801-7381-11cf-884d-00aa004b2e24)700 uuid("7c857801-7381-11cf-884d-00aa004b2e24") 701 701 ] 702 702 interface IWbemObjectSink : IUnknown -
vendor/current/librpc/idl/wscript_build
r740 r988 3 3 bld.SAMBA_PIDL_LIST('PIDL', 4 4 '''atsvc.idl auth.idl drsuapi.idl epmapper.idl initshutdown.idl 5 misc.idl ntlmssp.idl schannel.idl trkwks.idl5 misc.idl ntlmssp.idl negoex.idl schannel.idl trkwks.idl 6 6 audiosrv.idl dfsblobs.idl dsbackup.idl eventlog.idl file_id.idl keysvc.idl 7 msgsvc.idl ntsvcs.idl remact.idl security.idl unixinfo.idl wzcsvc.idl7 msgsvc.idl ntsvcs.idl remact.idl security.idl smb_acl.idl unixinfo.idl wzcsvc.idl 8 8 browser.idl dfs.idl dssetup.idl frsapi.idl krb5pac.idl 9 9 named_pipe_auth.idl orpc.idl rot.idl spoolss.idl w32time.idl xattr.idl 10 10 dbgidl.idl dnsserver.idl echo.idl frsrpc.idl lsa.idl nbt.idl dns.idl 11 oxidresolver.idl samr.idl s rvsvc.idl winreg.idl dcerpc.idl11 oxidresolver.idl samr.idl server_id.idl srvsvc.idl winreg.idl dcerpc.idl 12 12 drsblobs.idl efs.idl frstrans.idl mgmt.idl netlogon.idl 13 notify.idl 14 smb2_lease_struct.idl 13 15 policyagent.idl scerpc.idl svcctl.idl wkssvc.idl eventlog6.idl backupkey.idl 14 printcap.idl''', 16 fsrvp.idl bkupblobs.idl fscc.idl frsblobs.idl witness.idl clusapi.idl 17 mdssvc.idl''', 15 18 options='--header --ndr-parser --samba3-ndr-server --server --client --python', 16 19 output_dir='../gen_ndr') … … 18 21 bld.SAMBA_PIDL_LIST('PIDL', 19 22 'wmi.idl dcom.idl', 20 options='--header --ndr-parser --server --client -- python --dcom-proxy --com-header',23 options='--header --ndr-parser --server --client --dcom-proxy --com-header', 21 24 output_dir='../gen_ndr') 22 25 … … 27 30 28 31 bld.SAMBA_PIDL_LIST('PIDL', 29 ' rap.idl ntprinting.idl preg.idl',32 'messaging.idl', 30 33 options='--header --ndr-parser', 31 34 output_dir='../gen_ndr') 32 35 33 36 bld.SAMBA_PIDL_LIST('PIDL', 34 'dnsp.idl', 37 '''rap.idl ntprinting.idl preg.idl ioctl.idl printcap.idl 38 fsrvp_state.idl''', 39 options='--header --ndr-parser', 40 output_dir='../gen_ndr') 41 42 bld.SAMBA_PIDL_LIST('PIDL', 43 'dnsp.idl nfs4acl.idl', 35 44 options='--header --ndr-parser --client --python', 36 45 output_dir='../gen_ndr') 46 47 bld.SAMBA_PIDL_LIST('PIDL', 48 'winbind.idl', 49 options='--header --ndr-parser --samba3-ndr-server --client --python', 50 output_dir='../gen_ndr') -
vendor/current/librpc/idl/xattr.idl
r740 r988 21 21 { 22 22 const char *XATTR_DOSATTRIB_NAME = "user.DosAttrib"; 23 const char *XATTR_DOSATTRIB_NAME_S3 = "user.DOSATTRIB"; 23 24 const int XATTR_DOSATTRIB_ESTIMATED_SIZE = 64; 24 25 … … 185 186 } security_descriptor_hash_v3; 186 187 188 typedef [public] struct { 189 security_descriptor *sd; 190 uint16 hash_type; 191 uint8 hash[64]; /* 64 bytes hash. */ 192 utf8string description; /* description of what created 193 * this hash (to allow 194 * foresnics later, if we have 195 * a bug in one codepath */ 196 NTTIME time; 197 uint8 sys_acl_hash[64]; /* 64 bytes hash. */ 198 } security_descriptor_hash_v4; 199 187 200 typedef [switch_type(uint16)] union { 188 201 [case(1)] security_descriptor *sd; 189 202 [case(2)] security_descriptor_hash_v2 *sd_hs2; 190 203 [case(3)] security_descriptor_hash_v3 *sd_hs3; 204 [case(4)] security_descriptor_hash_v4 *sd_hs4; 191 205 } xattr_NTACL_Info; 192 206 … … 195 209 [switch_is(version)] xattr_NTACL_Info info; 196 210 } xattr_NTACL; 211 212 /* 213 * A wrapper of the common information required to be in the 214 * hash of the ACL, for the acl_xattr and acl_tdb modules. 215 */ 216 [public] typedef struct { 217 DATA_BLOB acl_as_blob; 218 uid_t owner; 219 gid_t group; 220 mode_t mode; 221 } xattr_sys_acl_hash_wrapper; 222 197 223 } -
vendor/current/librpc/ndr.pc.in
r740 r988 6 6 Name: ndr 7 7 Description: Network Data Representation Core Library 8 Requires: samba- hostconfigtalloc9 Version: 0.0.18 Requires: samba-util talloc 9 Version: @PACKAGE_VERSION@ 10 10 Libs: @LIB_RPATH@ -L${libdir} -lndr 11 11 Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1 -D_GNU_SOURCE=1 -
vendor/current/librpc/ndr/libndr.h
r919 r988 27 27 28 28 #include <talloc.h> 29 #include <sys/time.h> 30 #if _SAMBA_BUILD_ == 4 31 #include "../lib/util/util.h" /* for discard_const */ 29 #include "../lib/util/memory.h" /* for discard_const */ 30 #include "../lib/util/byteorder.h" 31 #include "../lib/util/data_blob.h" 32 #include "../lib/util/time.h" 32 33 #include "../lib/util/charset/charset.h" 33 #endif34 34 35 35 /* … … 123 123 #define LIBNDR_FLAG_STR_CHARLEN (1<<11) 124 124 #define LIBNDR_FLAG_STR_UTF8 (1<<12) 125 #define LIBNDR_FLAG_STR_RAW8 (1<<13) 125 126 #define LIBNDR_STRING_FLAGS (0x7FFC) 126 127 … … 386 387 #include "librpc/gen_ndr/misc.h" 387 388 388 extern const struct ndr_syntax_id ndr_transfer_syntax ;389 extern const struct ndr_syntax_id ndr 64_transfer_syntax;390 extern const struct ndr_syntax_id n ull_ndr_syntax_id;389 extern const struct ndr_syntax_id ndr_transfer_syntax_ndr; 390 extern const struct ndr_syntax_id ndr_transfer_syntax_ndr64; 391 extern const struct ndr_syntax_id ndr_syntax_id_null; 391 392 392 393 struct ndr_interface_call_pipe { … … 434 435 }; 435 436 437 struct sockaddr_storage; 438 436 439 /********************************************************************* 437 440 Map an NT error code from a NDR error code. 438 441 *********************************************************************/ 439 442 NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err); 443 int ndr_map_error2errno(enum ndr_err_code ndr_err); 440 444 const char *ndr_map_error2string(enum ndr_err_code ndr_err); 441 445 #define ndr_errstr ndr_map_error2string … … 455 459 size_t ndr_size_dom_sid0(const struct dom_sid *sid, int flags); 456 460 void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *guid); 461 void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss); 457 462 bool ndr_syntax_id_equal(const struct ndr_syntax_id *i1, const struct ndr_syntax_id *i2); 458 463 char *ndr_syntax_id_to_string(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *id); … … 554 559 void ndr_print_ ## name(struct ndr_print *ndr, const char *var_name, type v); 555 560 561 #define NDR_SCALAR_PTR_PROTO(name, type) \ 562 enum ndr_err_code ndr_push_ ## name(struct ndr_push *ndr, int ndr_flags, const type *v); \ 563 enum ndr_err_code ndr_pull_ ## name(struct ndr_pull *ndr, int ndr_flags, type **v); \ 564 void ndr_print_ ## name(struct ndr_print *ndr, const char *var_name, const type *v); 565 556 566 #define NDR_BUFFER_PROTO(name, type) \ 557 567 enum ndr_err_code ndr_push_ ## name(struct ndr_push *ndr, int ndr_flags, const type *v); \ … … 578 588 NDR_SCALAR_PROTO(NTSTATUS, NTSTATUS) 579 589 NDR_SCALAR_PROTO(WERROR, WERROR) 590 NDR_SCALAR_PROTO(HRESULT, HRESULT) 580 591 NDR_SCALAR_PROTO(NTTIME, NTTIME) 581 592 NDR_SCALAR_PROTO(NTTIME_1sec, NTTIME) … … 590 601 enum ndr_err_code ndr_push_policy_handle(struct ndr_push *ndr, int ndr_flags, const struct policy_handle *r); 591 602 void ndr_print_policy_handle(struct ndr_print *ndr, const char *name, const struct policy_handle *r); 592 bool policy_handle_empty(const struct policy_handle *h);593 bool is_valid_policy_hnd(const struct policy_handle *hnd); 594 bool policy_handle_equal(const struct policy_handle *hnd1,603 bool ndr_policy_handle_empty(const struct policy_handle *h); 604 #define is_valid_policy_hnd(hnd) (!ndr_policy_handle_empty(hnd)) 605 bool ndr_policy_handle_equal(const struct policy_handle *hnd1, 595 606 const struct policy_handle *hnd2); 596 607 … … 643 654 NTSTATUS GUID_from_data_blob(const DATA_BLOB *s, struct GUID *guid); 644 655 NTSTATUS GUID_from_string(const char *s, struct GUID *guid); 645 NTSTATUS NS_GUID_from_string(const char *s, struct GUID *guid);646 656 struct GUID GUID_zero(void); 647 657 bool GUID_all_zero(const struct GUID *u); … … 650 660 char *GUID_string2(TALLOC_CTX *mem_ctx, const struct GUID *guid); 651 661 char *GUID_hexstring(TALLOC_CTX *mem_ctx, const struct GUID *guid); 652 char *NS_GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid);653 662 struct GUID GUID_random(void); 663 664 /* Format is "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x" */ 665 /* 32 chars + 4 ' ' + \0 + 2 for adding {} */ 666 struct GUID_txt_buf { char buf[39]; }; 667 _PUBLIC_ char* GUID_buf_string(const struct GUID *guid, 668 struct GUID_txt_buf *dst); 654 669 655 670 _PUBLIC_ enum ndr_err_code ndr_pull_enum_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *v); … … 664 679 _PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool b); 665 680 681 _PUBLIC_ enum ndr_err_code ndr_push_timespec(struct ndr_push *ndr, 682 int ndr_flags, 683 const struct timespec *t); 684 _PUBLIC_ enum ndr_err_code ndr_pull_timespec(struct ndr_pull *ndr, 685 int ndr_flags, 686 struct timespec *t); 687 _PUBLIC_ void ndr_print_timespec(struct ndr_print *ndr, const char *name, 688 const struct timespec *t); 689 690 _PUBLIC_ enum ndr_err_code ndr_push_timeval(struct ndr_push *ndr, 691 int ndr_flags, 692 const struct timeval *t); 693 _PUBLIC_ enum ndr_err_code ndr_pull_timeval(struct ndr_pull *ndr, 694 int ndr_flags, 695 struct timeval *t); 696 _PUBLIC_ void ndr_print_timeval(struct ndr_print *ndr, const char *name, 697 const struct timeval *t); 698 699 700 666 701 #endif /* __LIBNDR_H__ */ -
vendor/current/librpc/ndr/ndr.c
r919 r988 1 /* 1 /* 2 2 Unix SMB/CIFS implementation. 3 3 … … 5 5 6 6 Copyright (C) Andrew Tridgell 2003 7 7 Copyright (C) Jelmer Vernooij 2005-2008 8 8 9 This program is free software; you can redistribute it and/or modify 9 10 it under the terms of the GNU General Public License as published by 10 11 the Free Software Foundation; either version 3 of the License, or 11 12 (at your option) any later version. 12 13 13 14 This program is distributed in the hope that it will be useful, 14 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 17 GNU General Public License for more details. 17 18 18 19 You should have received a copy of the GNU General Public License 19 20 along with this program. If not, see <http://www.gnu.org/licenses/>. … … 30 31 #include "librpc/ndr/libndr.h" 31 32 #include "../lib/util/dlinklist.h" 32 #if _SAMBA_BUILD_ == 433 #include "param/param.h"34 #endif35 33 36 34 #define NDR_BASE_MARSHALL_SIZE 1024 37 35 38 36 /* this guid indicates NDR encoding in a protocol tower */ 39 const struct ndr_syntax_id ndr_transfer_syntax = {37 const struct ndr_syntax_id ndr_transfer_syntax_ndr = { 40 38 { 0x8a885d04, 0x1ceb, 0x11c9, {0x9f, 0xe8}, {0x08,0x00,0x2b,0x10,0x48,0x60} }, 41 39 2 42 40 }; 43 41 44 const struct ndr_syntax_id ndr 64_transfer_syntax= {42 const struct ndr_syntax_id ndr_transfer_syntax_ndr64 = { 45 43 { 0x71710533, 0xbeba, 0x4937, {0x83, 0x19}, {0xb5,0xdb,0xef,0x9c,0xcc,0x36} }, 46 44 1 47 45 }; 48 46 49 const struct ndr_syntax_id n ull_ndr_syntax_id= {47 const struct ndr_syntax_id ndr_syntax_id_null = { 50 48 { 0, 0, 0, { 0, 0 }, { 0, 0, 0, 0, 0, 0 } }, 51 49 0 … … 225 223 ndr->data = talloc_array(ndr, uint8_t, ndr->alloc_size); 226 224 if (!ndr->data) { 225 talloc_free(ndr); 227 226 return NULL; 228 227 } … … 638 637 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &content_size)); 639 638 if (size_is >= 0 && size_is != content_size) { 640 return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) size_is(%d) mismatch content_size %d", 641 (int)size_is, (int)content_size); 639 return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) size_is(%d) (0x%04x) mismatch content_size %d (0x%04x)", 640 (int)size_is, (int)size_is, 641 (int)content_size, 642 (int)content_size); 642 643 } 643 644 r_content_size = content_size; … … 649 650 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &content_size)); 650 651 if (size_is >= 0 && size_is != content_size) { 651 return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) size_is(%d) mismatch content_size %d", 652 (int)size_is, (int)content_size); 652 return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) size_is(%d) (0x%08x) mismatch content_size %d (0x%08x)", 653 (int)size_is, (int)size_is, 654 (int)content_size, 655 (int)content_size); 653 656 } 654 657 r_content_size = content_size; -
vendor/current/librpc/ndr/ndr_backupkey.c
r740 r988 72 72 73 73 level = backupkeyguid_to_uint(r->in.guidActionAgent); 74 ndr_err = ndr_print_set_switch_value(ndr, &inblob, level); 75 if (unlikely(!NDR_ERR_CODE_IS_SUCCESS(ndr_err))) { \ 76 DEBUG(0,("ERROR: ndr_print_bkrp_BackupKey ndr_print_set_switch_value failed: %d\n", ndr_err)); 77 return; 78 } 74 79 blob.data = r->in.data_in; 75 80 blob.length = r->in.data_in_len; -
vendor/current/librpc/ndr/ndr_basic.c
r919 r988 1 /* 1 /* 2 2 Unix SMB/CIFS implementation. 3 3 … … 5 5 6 6 Copyright (C) Andrew Tridgell 2003 7 7 8 8 This program is free software; you can redistribute it and/or modify 9 9 it under the terms of the GNU General Public License as published by 10 10 the Free Software Foundation; either version 3 of the License, or 11 11 (at your option) any later version. 12 12 13 13 This program is distributed in the hope that it will be useful, 14 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 16 GNU General Public License for more details. 17 17 18 18 You should have received a copy of the GNU General Public License 19 19 along with this program. If not, see <http://www.gnu.org/licenses/>. 20 20 */ 21 21 22 #include " includes.h"22 #include "replace.h" 23 23 #include "system/network.h" 24 24 #include "librpc/ndr/libndr.h" 25 25 #include "lib/util/util_net.h" 26 #include "lib/util/debug.h" 27 #include "lib/util/util.h" 26 28 27 29 #define NDR_SVAL(ndr, ofs) (NDR_BE(ndr)?RSVAL(ndr->data,ofs):SVAL(ndr->data,ofs)) … … 32 34 #define NDR_SIVALS(ndr, ofs, v) do { if (NDR_BE(ndr)) { RSIVALS(ndr->data,ofs,v); } else SIVALS(ndr->data,ofs,v); } while (0) 33 35 36 37 static void ndr_dump_data(struct ndr_print *ndr, const uint8_t *buf, int len); 34 38 35 39 /* … … 168 172 DEBUG(0,(__location__ ": non-zero upper 32 bits 0x%016llx\n", 169 173 (unsigned long long)v64)); 170 return NDR_ERR_NDR64; 174 return ndr_pull_error(ndr, NDR_ERR_NDR64, __location__ ": non-zero upper 32 bits 0x%016llx\n", 175 (unsigned long long)v64); 171 176 } 172 177 return err; … … 322 327 } 323 328 329 /* 330 pull a HRESULT 331 */ 332 _PUBLIC_ enum ndr_err_code ndr_pull_HRESULT(struct ndr_pull *ndr, int ndr_flags, HRESULT *status) 333 { 334 uint32_t v; 335 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); 336 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); 337 *status = HRES_ERROR(v); 338 return NDR_ERR_SUCCESS; 339 } 324 340 325 341 /* … … 412 428 ndr->print(ndr, "%-25s: %s", name, win_errstr(r)); 413 429 } 430 431 /* 432 push a HRESULT 433 */ 434 _PUBLIC_ enum ndr_err_code ndr_push_HRESULT(struct ndr_push *ndr, int ndr_flags, HRESULT status) 435 { 436 return ndr_push_uint32(ndr, NDR_SCALARS, HRES_ERROR_V(status)); 437 } 438 439 _PUBLIC_ void ndr_print_HRESULT(struct ndr_print *ndr, const char *name, HRESULT r) 440 { 441 ndr->print(ndr, "%-25s: %s", name, hresult_errstr(r)); 442 } 443 414 444 415 445 /* … … 1003 1033 } 1004 1034 1005 _PUBLIC_ void ndr_print_enum(struct ndr_print *ndr, const char *name, const char *type, 1035 _PUBLIC_ void ndr_print_enum(struct ndr_print *ndr, const char *name, const char *type, 1006 1036 const char *val, uint32_t value) 1007 1037 { … … 1015 1045 _PUBLIC_ void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size, const char *flag_name, uint32_t flag, uint32_t value) 1016 1046 { 1047 if (flag == 0) { 1048 return; 1049 } 1050 1017 1051 /* this is an attempt to support multi-bit bitmap masks */ 1018 1052 value &= flag; … … 1021 1055 flag >>= 1; 1022 1056 value >>= 1; 1023 } 1057 } 1024 1058 if (flag == 1) { 1025 1059 ndr->print(ndr, " %d: %-25s", value, flag_name); … … 1159 1193 } 1160 1194 1161 _PUBLIC_ void ndr_print_array_uint8(struct ndr_print *ndr, const char *name, 1195 _PUBLIC_ void ndr_print_array_uint8(struct ndr_print *ndr, const char *name, 1162 1196 const uint8_t *data, uint32_t count) 1163 1197 { 1164 1198 int i; 1199 #define _ONELINE_LIMIT 32 1165 1200 1166 1201 if (data == NULL) { … … 1169 1204 } 1170 1205 1171 if (count <= 600&& (ndr->flags & LIBNDR_PRINT_ARRAY_HEX)) {1172 char s[ 1202];1206 if (count <= _ONELINE_LIMIT && (ndr->flags & LIBNDR_PRINT_ARRAY_HEX)) { 1207 char s[(_ONELINE_LIMIT + 1) * 2]; 1173 1208 for (i=0;i<count;i++) { 1174 1209 snprintf(&s[i*2], 3, "%02x", data[i]); … … 1180 1215 1181 1216 ndr->print(ndr, "%s: ARRAY(%d)", name, count); 1217 if (count > _ONELINE_LIMIT && (ndr->flags & LIBNDR_PRINT_ARRAY_HEX)) { 1218 ndr_dump_data(ndr, data, count); 1219 return; 1220 } 1221 1182 1222 ndr->depth++; 1183 1223 for (i=0;i<count;i++) { … … 1188 1228 } 1189 1229 } 1190 ndr->depth--; 1191 } 1192 1193 static void ndr_print_asc(struct ndr_print *ndr, const uint8_t *buf, int len) 1194 { 1195 int i; 1196 for (i=0;i<len;i++) 1197 ndr->print(ndr, "%c", isprint(buf[i])?buf[i]:'.'); 1230 ndr->depth--; 1231 #undef _ONELINE_LIMIT 1232 } 1233 1234 static void ndr_print_dump_data_cb(const char *buf, void *private_data) 1235 { 1236 struct ndr_print *ndr = (struct ndr_print *)private_data; 1237 1238 ndr->print(ndr, "%s", buf); 1198 1239 } 1199 1240 … … 1203 1244 static void ndr_dump_data(struct ndr_print *ndr, const uint8_t *buf, int len) 1204 1245 { 1205 int i=0;1206 1207 1246 ndr->no_newline = true; 1208 1209 for (i=0;i<len;) { 1210 if (i%16 == 0 && i<len) { 1211 ndr->print(ndr, "[%04X] ",i); 1212 } 1213 1214 ndr->print(ndr, "%02X ",(int)buf[i]); 1215 i++; 1216 if (i%8 == 0) ndr->print(ndr," "); 1217 if (i%16 == 0) { 1218 ndr_print_asc(ndr,&buf[i-16],8); ndr->print(ndr," "); 1219 ndr_print_asc(ndr,&buf[i-8],8); ndr->print(ndr, "\n"); 1220 } 1221 } 1222 1223 if (i%16) { 1224 int n; 1225 n = 16 - (i%16); 1226 ndr->print(ndr, " "); 1227 if (n>8) ndr->print(ndr," "); 1228 while (n--) ndr->print(ndr," "); 1229 n = MIN(8,i%16); 1230 ndr_print_asc(ndr,&buf[i-(i%16)],n); ndr->print(ndr, " "); 1231 n = (i%16) - n; 1232 if (n>0) ndr_print_asc(ndr,&buf[i-n],n); 1233 ndr->print(ndr,"\n"); 1234 } 1235 1247 dump_data_cb(buf, len, true, ndr_print_dump_data_cb, ndr); 1236 1248 ndr->no_newline = false; 1237 1249 } … … 1254 1266 * 2) When called with the LIBNDR_FLAG_REMAINING flag, push the byte array to 1255 1267 * the ndr buffer. 1256 * 3) Otherwise, push a uint32 length _and_ a corresponding byte array to the1268 * 3) Otherwise, push a uint3264 length _and_ a corresponding byte array to the 1257 1269 * ndr buffer. 1258 1270 */ … … 1272 1284 data_blob_clear(&blob); 1273 1285 } else { 1274 NDR_CHECK(ndr_push_uint32 (ndr, NDR_SCALARS, blob.length));1286 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, blob.length)); 1275 1287 } 1276 1288 NDR_CHECK(ndr_push_bytes(ndr, blob.data, blob.length)); … … 1285 1297 * 2) When called with the LIBNDR_FLAG_REMAINING flag, pull all remaining bytes 1286 1298 * from the ndr buffer. 1287 * 3) Otherwise, pull a uint32 length _and_ a corresponding byte array from the1299 * 3) Otherwise, pull a uint3264 length _and_ a corresponding byte array from the 1288 1300 * ndr buffer. 1289 1301 */ … … 1306 1318 } 1307 1319 } else { 1308 NDR_CHECK(ndr_pull_uint32 (ndr, NDR_SCALARS, &length));1320 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &length)); 1309 1321 } 1310 1322 NDR_PULL_NEED_BYTES(ndr, length); … … 1349 1361 return NT_STATUS_INVALID_PARAMETER; 1350 1362 } 1363 1364 _PUBLIC_ int ndr_map_error2errno(enum ndr_err_code ndr_err) 1365 { 1366 switch (ndr_err) { 1367 case NDR_ERR_SUCCESS: 1368 return 0; 1369 case NDR_ERR_BUFSIZE: 1370 return ENOSPC; 1371 case NDR_ERR_TOKEN: 1372 return EINVAL; 1373 case NDR_ERR_ALLOC: 1374 return ENOMEM; 1375 case NDR_ERR_ARRAY_SIZE: 1376 return EMSGSIZE; 1377 case NDR_ERR_INVALID_POINTER: 1378 return EINVAL; 1379 case NDR_ERR_UNREAD_BYTES: 1380 return EOVERFLOW; 1381 default: 1382 break; 1383 } 1384 1385 /* we should map all error codes to different status codes */ 1386 return EINVAL; 1387 } 1388 1389 _PUBLIC_ enum ndr_err_code ndr_push_timespec(struct ndr_push *ndr, 1390 int ndr_flags, 1391 const struct timespec *t) 1392 { 1393 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags); 1394 NDR_CHECK(ndr_push_hyper(ndr, ndr_flags, t->tv_sec)); 1395 NDR_CHECK(ndr_push_uint32(ndr, ndr_flags, t->tv_nsec)); 1396 return NDR_ERR_SUCCESS; 1397 } 1398 1399 _PUBLIC_ enum ndr_err_code ndr_pull_timespec(struct ndr_pull *ndr, 1400 int ndr_flags, 1401 struct timespec *t) 1402 { 1403 uint64_t secs; 1404 uint32_t nsecs; 1405 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); 1406 NDR_CHECK(ndr_pull_hyper(ndr, ndr_flags, &secs)); 1407 NDR_CHECK(ndr_pull_uint32(ndr, ndr_flags, &nsecs)); 1408 t->tv_sec = secs; 1409 t->tv_nsec = nsecs; 1410 return NDR_ERR_SUCCESS; 1411 } 1412 1413 _PUBLIC_ void ndr_print_timespec(struct ndr_print *ndr, const char *name, 1414 const struct timespec *t) 1415 { 1416 ndr->print(ndr, "%-25s: %s.%ld", name, timestring(ndr, t->tv_sec), 1417 (long)t->tv_nsec); 1418 } 1419 1420 _PUBLIC_ enum ndr_err_code ndr_push_timeval(struct ndr_push *ndr, 1421 int ndr_flags, 1422 const struct timeval *t) 1423 { 1424 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags); 1425 NDR_CHECK(ndr_push_hyper(ndr, ndr_flags, t->tv_sec)); 1426 NDR_CHECK(ndr_push_uint32(ndr, ndr_flags, t->tv_usec)); 1427 return NDR_ERR_SUCCESS; 1428 } 1429 1430 _PUBLIC_ enum ndr_err_code ndr_pull_timeval(struct ndr_pull *ndr, 1431 int ndr_flags, 1432 struct timeval *t) 1433 { 1434 uint64_t secs; 1435 uint32_t usecs; 1436 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); 1437 NDR_CHECK(ndr_pull_hyper(ndr, ndr_flags, &secs)); 1438 NDR_CHECK(ndr_pull_uint32(ndr, ndr_flags, &usecs)); 1439 t->tv_sec = secs; 1440 t->tv_usec = usecs; 1441 return NDR_ERR_SUCCESS; 1442 } 1443 1444 _PUBLIC_ void ndr_print_timeval(struct ndr_print *ndr, const char *name, 1445 const struct timeval *t) 1446 { 1447 ndr->print(ndr, "%-25s: %s.%ld", name, timestring(ndr, t->tv_sec), 1448 (long)t->tv_usec); 1449 } -
vendor/current/librpc/ndr/ndr_dcerpc.c
r919 r988 23 23 #include "includes.h" 24 24 #include "librpc/gen_ndr/ndr_dcerpc.h" 25 26 25 #include "librpc/gen_ndr/ndr_misc.h" 27 #include "lib/util/bitmap.h" 26 27 /* 28 * This function was generated by pidl and 29 * has been extended by the (_available == 0) check. 30 * 31 * That's why we ignore the 80 char per line limit. 32 */ 33 enum ndr_err_code ndr_pull_dcerpc_bind_nak(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_bind_nak *r) 34 { 35 uint32_t size_versions_0 = 0; 36 uint32_t cntr_versions_0; 37 TALLOC_CTX *_mem_save_versions_0 = NULL; 38 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); 39 if (ndr_flags & NDR_SCALARS) { 40 uint32_t _available; 41 NDR_CHECK(ndr_pull_align(ndr, 4)); 42 NDR_CHECK(ndr_pull_dcerpc_bind_nak_reason(ndr, NDR_SCALARS, &r->reject_reason)); 43 _available = ndr->data_size - ndr->offset; 44 if (_available == 0) { 45 /* 46 * This works around a bug in older 47 * Samba (<= 4.1) releases. 48 * 49 * See bug #11327. 50 */ 51 r->num_versions = 0; 52 } else { 53 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->num_versions)); 54 } 55 size_versions_0 = r->num_versions; 56 NDR_PULL_ALLOC_N(ndr, r->versions, size_versions_0); 57 _mem_save_versions_0 = NDR_PULL_GET_MEM_CTX(ndr); 58 NDR_PULL_SET_MEM_CTX(ndr, r->versions, 0); 59 for (cntr_versions_0 = 0; cntr_versions_0 < (size_versions_0); cntr_versions_0++) { 60 NDR_CHECK(ndr_pull_dcerpc_bind_nak_version(ndr, NDR_SCALARS, &r->versions[cntr_versions_0])); 61 } 62 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_versions_0, 0); 63 { 64 uint32_t _flags_save_DATA_BLOB = ndr->flags; 65 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); 66 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad)); 67 ndr->flags = _flags_save_DATA_BLOB; 68 } 69 NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); 70 } 71 if (ndr_flags & NDR_BUFFERS) { 72 } 73 return NDR_ERR_SUCCESS; 74 } 28 75 29 76 const uint8_t DCERPC_SEC_VT_MAGIC[] = {0x8a,0xe3,0x13,0x71,0x02,0xf4,0x36,0x71}; -
vendor/current/librpc/ndr/ndr_dcerpc.h
r919 r988 24 24 struct ndr_pull *ndr, TALLOC_CTX *mem_ctx, 25 25 struct dcerpc_sec_verification_trailer **_r); 26 27 #ifndef NDR_DCERPC_REQUEST_OBJECT_PRESENT 28 #define NDR_DCERPC_REQUEST_OBJECT_PRESENT (ndr->flags & LIBNDR_FLAG_OBJECT_PRESENT) 29 #endif /* NDR_DCERPC_REQUEST_OBJECT_PRESENT */ -
vendor/current/librpc/ndr/ndr_dns.c
r740 r988 31 31 #include "librpc/gen_ndr/ndr_dns.h" 32 32 #include "librpc/gen_ndr/ndr_misc.h" 33 #include "librpc/gen_ndr/ndr_dnsp.h" 33 34 #include "system/locale.h" 34 35 #include "lib/util/util_net.h" … … 86 87 return ndr_pull_error(ndr, NDR_ERR_STRING, 87 88 "BAD DNS NAME component, " \ 88 "reserved leng htfield: 0x%02x",89 "reserved length field: 0x%02x", 89 90 (len &0xC)); 90 91 } 91 if (*offset + len + 2> ndr->data_size) {92 if (*offset + len + 1 > ndr->data_size) { 92 93 return ndr_pull_error(ndr, NDR_ERR_STRING, 93 94 "BAD DNS NAME component, "\ … … 169 170 uint32_t offset; 170 171 171 /* see if we have pushed the remain g string allready,172 /* see if we have pushed the remaining string already, 172 173 * if so we use a label pointer to this string 173 174 */ … … 229 230 */ 230 231 return ndr_push_bytes(ndr, (const uint8_t *)"", 1); 232 } 233 234 _PUBLIC_ enum ndr_err_code ndr_pull_dns_txt_record(struct ndr_pull *ndr, int ndr_flags, struct dns_txt_record *r) 235 { 236 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); 237 if (ndr_flags & NDR_SCALARS) { 238 enum ndr_err_code ndr_err; 239 uint32_t data_size = ndr->data_size; 240 uint32_t record_size = 0; 241 ndr_err = ndr_token_retrieve(&ndr->array_size_list, r, 242 &record_size); 243 if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { 244 NDR_PULL_NEED_BYTES(ndr, record_size); 245 ndr->data_size = ndr->offset + record_size; 246 } 247 NDR_CHECK(ndr_pull_align(ndr, 1)); 248 NDR_CHECK(ndr_pull_dnsp_string_list(ndr, NDR_SCALARS, &r->txt)); 249 NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); 250 ndr->data_size = data_size; 251 } 252 if (ndr_flags & NDR_BUFFERS) { 253 } 254 return NDR_ERR_SUCCESS; 231 255 } 232 256 … … 257 281 NDR_ERR_LENGTH, 258 282 "Invalid...Unexpected " \ 259 "blob leng htis too " \283 "blob length is too " \ 260 284 "large"); 261 285 } … … 263 287 if (r->unexpected.length > UINT16_MAX) { 264 288 return ndr_push_error(ndr, NDR_ERR_LENGTH, 265 "Unexpected blob leng ht"\289 "Unexpected blob length "\ 266 290 "is too large"); 267 291 } … … 303 327 _saved_offset1 = ndr->offset; 304 328 if (r->length > 0) { 329 NDR_CHECK(ndr_token_store(ndr, &ndr->array_size_list, 330 &r->rdata, 331 r->length)); 305 332 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->rdata, 306 333 r->rr_type)); -
vendor/current/librpc/ndr/ndr_dnsp.c
r740 r988 49 49 ret = talloc_strdup(ndr->current_mem_ctx, ""); 50 50 if (!ret) { 51 return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp ");51 return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp_name"); 52 52 } 53 53 total_len = 1; … … 62 62 ret = talloc_realloc(ndr->current_mem_ctx, ret, char, newlen); 63 63 if (!ret) { 64 return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp ");64 return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp_name"); 65 65 } 66 66 NDR_CHECK(ndr_pull_bytes(ndr, (uint8_t *)&ret[total_len-1], sublen)); … … 73 73 NDR_CHECK(ndr_pull_uint8(ndr, ndr_flags, &termination)); 74 74 if (termination != 0) { 75 return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp - not NUL terminated");75 return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp_name - not NUL terminated"); 76 76 } 77 77 if (ndr->offset > raw_offset + len) { 78 return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp - overrun by %u bytes",78 return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp_name - overrun by %u bytes", 79 79 ndr->offset - (raw_offset + len)); 80 80 } … … 136 136 { 137 137 uint8_t len; 138 uint32_t total_len;139 138 char *ret; 140 139 … … 143 142 ret = talloc_strdup(ndr->current_mem_ctx, ""); 144 143 if (!ret) { 145 return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp"); 146 } 147 total_len = 1; 148 ret = talloc_zero_array(ndr->current_mem_ctx, char, len+1); 144 return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp_string"); 145 } 146 ret = talloc_zero_array(ndr->current_mem_ctx, char, len + 1); 149 147 if (!ret) { 150 return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp"); 151 } 152 NDR_CHECK(ndr_pull_bytes(ndr, (uint8_t *)&ret[total_len-1], len)); 153 total_len = len; 148 return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp_string"); 149 } 150 NDR_CHECK(ndr_pull_bytes(ndr, (uint8_t *)ret, len)); 154 151 155 152 (*string) = ret; … … 161 158 { 162 159 int total_len; 163 total_len = strlen(string) + 1;160 total_len = strlen(string); 164 161 if (total_len > 255) { 165 162 return ndr_push_error(ndr, NDR_ERR_BUFSIZE, … … 167 164 } 168 165 NDR_CHECK(ndr_push_uint8(ndr, ndr_flags, (uint8_t)total_len)); 169 NDR_CHECK(ndr_push_bytes(ndr, (const uint8_t *)string, total_len - 1)); 170 NDR_PUSH_ALIGN(ndr, 1); 171 172 return NDR_ERR_SUCCESS; 173 } 166 NDR_CHECK(ndr_push_bytes(ndr, (const uint8_t *)string, total_len)); 167 168 return NDR_ERR_SUCCESS; 169 } 170 171 /* 172 * print a dnsp_string_list 173 */ 174 _PUBLIC_ void ndr_print_dnsp_string_list(struct ndr_print *ndr, const char *name, 175 const struct dnsp_string_list *list) 176 { 177 uint32_t i; 178 179 ndr->no_newline = true; 180 for (i=0; i<ndr->depth; i++) { 181 ndr->print(ndr, " "); 182 } 183 ndr->print(ndr, "%-25s:", name); 184 for (i=0; i<list->count; i++) { 185 ndr->print(ndr, " \"%s\"", list->str[i]); 186 } 187 ndr->print(ndr, "\n"); 188 ndr->no_newline = false; 189 } 190 191 /* 192 * pull a dnsp_string_list 193 */ 194 _PUBLIC_ enum ndr_err_code ndr_pull_dnsp_string_list(struct ndr_pull *ndr, int ndr_flags, struct dnsp_string_list *list) 195 { 196 list->count = 0; 197 list->str = talloc_array(ndr->current_mem_ctx, const char *, 198 list->count); 199 if (! list->str) { 200 return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp_string_list"); 201 } 202 203 while (ndr->offset < ndr->data_size) { 204 list->str = talloc_realloc(ndr->current_mem_ctx, list->str, 205 const char *, list->count+1); 206 if (! list->str) { 207 return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp_string_list"); 208 } 209 NDR_CHECK(ndr_pull_dnsp_string(ndr, ndr_flags, &list->str[list->count])); 210 list->count++; 211 } 212 213 return NDR_ERR_SUCCESS; 214 } 215 216 enum ndr_err_code ndr_push_dnsp_string_list(struct ndr_push *ndr, int ndr_flags, const struct dnsp_string_list *list) 217 { 218 uint8_t i; 219 220 for (i=0; i<list->count; i++) { 221 NDR_CHECK(ndr_push_dnsp_string(ndr, ndr_flags, list->str[i])); 222 } 223 return NDR_ERR_SUCCESS; 224 } 225 226 enum ndr_err_code ndr_dnsp_string_list_copy(TALLOC_CTX *mem_ctx, 227 const struct dnsp_string_list *src, 228 struct dnsp_string_list *dst) 229 { 230 size_t i; 231 232 dst->count = 0; 233 dst->str = talloc_zero_array(mem_ctx, const char *, src->count); 234 if (dst->str == NULL) { 235 return NDR_ERR_ALLOC; 236 } 237 238 for (i = 0; i < src->count; i++) { 239 dst->str[i] = talloc_strdup(dst->str, src->str[i]); 240 if (dst->str[i] == NULL) { 241 TALLOC_FREE(dst->str); 242 return NDR_ERR_ALLOC; 243 } 244 } 245 246 dst->count = src->count; 247 return NDR_ERR_SUCCESS; 248 } -
vendor/current/librpc/ndr/ndr_dnsp.h
r740 r988 28 28 enum ndr_err_code ndr_pull_dnsp_string(struct ndr_pull *ndr, int ndr_flags, const char **string); 29 29 enum ndr_err_code ndr_push_dnsp_string(struct ndr_push *ndr, int ndr_flags, const char *string); 30 31 enum ndr_err_code ndr_dnsp_string_list_copy(TALLOC_CTX *mem_ctx, 32 const struct dnsp_string_list *src, 33 struct dnsp_string_list *dst); -
vendor/current/librpc/ndr/ndr_drsblobs.c
r740 r988 33 33 NDR_CHECK(ndr_push_AuthenticationInformation(ndr, NDR_SCALARS, &r->array[cntr_array_0])); 34 34 } 35 NDR_CHECK(ndr_push_ trailer_align(ndr, 4));35 NDR_CHECK(ndr_push_align(ndr, 4)); 36 36 } 37 37 if (ndr_flags & NDR_BUFFERS) { … … 52 52 r->count++; 53 53 } 54 NDR_CHECK(ndr_pull_ trailer_align(ndr, 4));54 NDR_CHECK(ndr_pull_align(ndr, 4)); 55 55 } 56 56 if (ndr_flags & NDR_BUFFERS) { … … 65 65 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); 66 66 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (r->count > 0)?12:0)); 67 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (r->count > 0)?12 + ndr_size_AuthenticationInformationArray(&r->current, ndr_flags):0));67 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (r->count > 0)?12 + ndr_size_AuthenticationInformationArray(&r->current, 0):0)); 68 68 { 69 69 struct ndr_push *_ndr_current; 70 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_current, 0, ((r->count > 0)?12 + ndr_size_AuthenticationInformationArray(&r->current, ndr_flags):0) - ((r->count > 0)?12:0)));70 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_current, 0, ((r->count > 0)?12 + ndr_size_AuthenticationInformationArray(&r->current, 0):0) - ((r->count > 0)?12:0))); 71 71 NDR_CHECK(ndr_push_AuthenticationInformationArray(_ndr_current, NDR_SCALARS, &r->current)); 72 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_current, 0, ((r->count > 0)?12 + ndr_size_AuthenticationInformationArray(&r->current, ndr_flags):0) - ((r->count > 0)?12:0)));72 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_current, 0, ((r->count > 0)?12 + ndr_size_AuthenticationInformationArray(&r->current, 0):0) - ((r->count > 0)?12:0))); 73 73 } 74 74 { -
vendor/current/librpc/ndr/ndr_drsuapi.c
r740 r988 5 5 6 6 Copyright (C) Stefan (metze) Metzmacher 2005 7 Copyright (C) Matthieu Patou 2013 7 8 8 9 This program is free software; you can redistribute it and/or modify … … 102 103 const struct drsuapi_DsAttributeValue *r) 103 104 { 104 char *str; 105 void *p; 106 size_t converted_size = 0; 105 107 106 108 ndr_print_struct(ndr, name, "drsuapi_DsAttributeValue"); … … 110 112 r->blob->data, 111 113 r->blob->length, 112 (void **)&str, NULL, false)) {114 &p, &converted_size)) { 113 115 ndr_print_string(ndr, "string", "INVALID CONVERSION"); 114 116 } else { 117 char *str = (char *)p; 115 118 ndr_print_string(ndr, "string", str); 116 119 talloc_free(str); … … 405 408 } 406 409 } 410 411 enum ndr_err_code ndr_push_drsuapi_DsBindInfo(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsBindInfo *r) 412 { 413 uint32_t _flags_save = ndr->flags; 414 ndr->flags = ndr->flags & ~LIBNDR_FLAG_NDR64; 415 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags); 416 if (ndr_flags & NDR_SCALARS) { 417 uint32_t level = ndr_push_get_switch_value(ndr, r); 418 NDR_CHECK(ndr_push_union_align(ndr, 4)); 419 switch (level) { 420 case 24: { 421 { 422 struct ndr_push *_ndr_info24; 423 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info24, 0, 24)); 424 NDR_CHECK(ndr_push_drsuapi_DsBindInfo24(_ndr_info24, NDR_SCALARS, &r->info24)); 425 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info24, 0, 24)); 426 } 427 break; } 428 429 case 28: { 430 { 431 struct ndr_push *_ndr_info28; 432 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info28, 0, 28)); 433 NDR_CHECK(ndr_push_drsuapi_DsBindInfo28(_ndr_info28, NDR_SCALARS, &r->info28)); 434 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info28, 0, 28)); 435 } 436 break; } 437 438 case 48: { 439 { 440 struct ndr_push *_ndr_info48; 441 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info48, 0, 48)); 442 NDR_CHECK(ndr_push_drsuapi_DsBindInfo48(_ndr_info48, NDR_SCALARS, &r->info48)); 443 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info48, 0, 48)); 444 } 445 break; } 446 447 case 52: { 448 { 449 struct ndr_push *_ndr_info52; 450 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info52, 0, 52)); 451 NDR_CHECK(ndr_push_drsuapi_DsBindInfo52(_ndr_info52, NDR_SCALARS, &r->info52)); 452 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info52, 0, 52)); 453 } 454 break; } 455 456 default: { 457 { 458 struct ndr_push *_ndr_Fallback; 459 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_Fallback, 0, level)); 460 NDR_CHECK(ndr_push_drsuapi_DsBindInfoFallBack(_ndr_Fallback, NDR_SCALARS, &r->Fallback)); 461 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_Fallback, 0, level)); 462 } 463 break; } 464 465 } 466 } 467 if (ndr_flags & NDR_BUFFERS) { 468 uint32_t level = ndr_push_get_switch_value(ndr, r); 469 switch (level) { 470 case 24: 471 break; 472 473 case 28: 474 break; 475 476 case 48: 477 break; 478 479 case 52: 480 break; 481 482 default: 483 break; 484 485 } 486 } 487 ndr->flags = _flags_save; 488 return NDR_ERR_SUCCESS; 489 } 490 491 enum ndr_err_code ndr_pull_drsuapi_DsBindInfo(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsBindInfo *r) 492 { 493 uint32_t level; 494 uint32_t _flags_save = ndr->flags; 495 ndr->flags = ndr->flags & ~LIBNDR_FLAG_NDR64; 496 level = ndr_pull_get_switch_value(ndr, r); 497 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); 498 if (ndr_flags & NDR_SCALARS) { 499 NDR_CHECK(ndr_pull_union_align(ndr, 4)); 500 switch (level) { 501 case 24: { 502 { 503 struct ndr_pull *_ndr_info24; 504 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info24, 0, 24)); 505 NDR_CHECK(ndr_pull_drsuapi_DsBindInfo24(_ndr_info24, NDR_SCALARS, &r->info24)); 506 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info24, 0, 24)); 507 } 508 break; } 509 510 case 28: { 511 { 512 struct ndr_pull *_ndr_info28; 513 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info28, 0, 28)); 514 NDR_CHECK(ndr_pull_drsuapi_DsBindInfo28(_ndr_info28, NDR_SCALARS, &r->info28)); 515 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info28, 0, 28)); 516 } 517 break; } 518 519 case 48: { 520 { 521 struct ndr_pull *_ndr_info48; 522 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info48, 0, 48)); 523 NDR_CHECK(ndr_pull_drsuapi_DsBindInfo48(_ndr_info48, NDR_SCALARS, &r->info48)); 524 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info48, 0, 48)); 525 } 526 break; } 527 528 case 52: { 529 { 530 struct ndr_pull *_ndr_info52; 531 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info52, 0, 52)); 532 NDR_CHECK(ndr_pull_drsuapi_DsBindInfo52(_ndr_info52, NDR_SCALARS, &r->info52)); 533 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info52, 0, 52)); 534 } 535 break; } 536 537 default: { 538 { 539 struct ndr_pull *_ndr_Fallback; 540 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_Fallback, 0, level)); 541 NDR_CHECK(ndr_pull_drsuapi_DsBindInfoFallBack(_ndr_Fallback, NDR_SCALARS, &r->Fallback)); 542 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_Fallback, 0, level)); 543 } 544 break; } 545 546 } 547 } 548 if (ndr_flags & NDR_BUFFERS) { 549 switch (level) { 550 case 24: 551 break; 552 553 case 28: 554 break; 555 556 case 48: 557 break; 558 559 case 52: 560 break; 561 562 default: 563 break; 564 565 } 566 } 567 ndr->flags = _flags_save; 568 return NDR_ERR_SUCCESS; 569 } 570 571 _PUBLIC_ void ndr_print_drsuapi_DsBindInfo(struct ndr_print *ndr, const char *name, const union drsuapi_DsBindInfo *r) 572 { 573 uint32_t level; 574 level = ndr_print_get_switch_value(ndr, r); 575 ndr_print_union(ndr, name, level, "drsuapi_DsBindInfo"); 576 switch (level) { 577 case 24: 578 ndr_print_drsuapi_DsBindInfo24(ndr, "info24", &r->info24); 579 break; 580 581 case 28: 582 ndr_print_drsuapi_DsBindInfo28(ndr, "info28", &r->info28); 583 break; 584 585 case 48: 586 ndr_print_drsuapi_DsBindInfo48(ndr, "info48", &r->info48); 587 break; 588 589 case 52: 590 ndr_print_drsuapi_DsBindInfo52(ndr, "info52", &r->info52); 591 break; 592 593 default: 594 ndr_print_drsuapi_DsBindInfoFallBack(ndr, "Fallback", &r->Fallback); 595 break; 596 597 } 598 } -
vendor/current/librpc/ndr/ndr_krb5pac.c
r740 r988 116 116 } 117 117 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); 118 if (ndr->offset > ndr->relative_highest_offset) { 119 ndr->relative_highest_offset = ndr->offset; 120 } 118 121 ndr->offset = _relative_save_offset; 119 122 } -
vendor/current/librpc/ndr/ndr_ntprinting.c
r860 r988 29 29 if (string_flags & LIBNDR_FLAG_STR_ASCII) { 30 30 flags |= LIBNDR_FLAG_STR_ASCII; 31 } else if (string_flags & LIBNDR_FLAG_STR_RAW8) { 32 flags |= LIBNDR_FLAG_STR_RAW8; 31 33 } else { 32 34 flags |= LIBNDR_FLAG_STR_UTF8; -
vendor/current/librpc/ndr/ndr_orpc.c
r414 r988 94 94 ndr->depth++; 95 95 for (i=0;ar->stringbindings[i];i++) { 96 char *idx = NULL; 97 asprintf(&idx, "[%d]", i); 98 if (idx) { 99 ndr_print_STRINGBINDING(ndr, idx, ar->stringbindings[i]); 100 free(idx); 101 } 96 char idx[13]; /* 2^32 has 10 digits */ 97 snprintf(idx, sizeof(idx), "[%d]", i); 98 ndr_print_STRINGBINDING(ndr, idx, ar->stringbindings[i]); 102 99 } 103 100 ndr->depth--; … … 105 102 ndr->depth++; 106 103 for (i=0;ar->securitybindings[i];i++) { 107 char *idx = NULL; 108 asprintf(&idx, "[%d]", i); 109 if (idx) { 110 ndr_print_SECURITYBINDING(ndr, idx, ar->securitybindings[i]); 111 free(idx); 112 } 104 char idx[13]; /* 2^32 has 10 digits */ 105 snprintf(idx, sizeof(idx), "[%d]", i); 106 ndr_print_SECURITYBINDING(ndr, idx, ar->securitybindings[i]); 113 107 } 114 108 ndr->depth--; … … 163 157 ndr->depth++; 164 158 for (i=0;ar->stringbindings[i];i++) { 165 char *idx = NULL; 166 asprintf(&idx, "[%d]", i); 167 if (idx) { 168 ndr_print_STRINGBINDING(ndr, idx, ar->stringbindings[i]); 169 free(idx); 170 } 159 char idx[13]; /* 2^32 has 10 digits */ 160 snprintf(idx, sizeof(idx), "[%d]", i); 161 ndr_print_STRINGBINDING(ndr, idx, ar->stringbindings[i]); 171 162 } 172 163 ndr->depth--; -
vendor/current/librpc/ndr/ndr_sec_helper.c
r740 r988 229 229 /* handle a w2k bug which send random data in the buffer */ 230 230 ZERO_STRUCTP(sid); 231 } else if (sid->num_auths == 0 && sid->sub_auths) {231 } else if (sid->num_auths == 0) { 232 232 ZERO_STRUCT(sid->sub_auths); 233 233 } … … 315 315 NDR_CHECK(ndr_push_int8(ndr, NDR_SCALARS, r->num_auths)); 316 316 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->id_auth, 6)); 317 if (r->num_auths < 0 || r->num_auths > ARRAY_SIZE(r->sub_auths)) { 318 return ndr_push_error(ndr, NDR_ERR_RANGE, "value out of range"); 319 } 317 320 for (cntr_sub_auths_0 = 0; cntr_sub_auths_0 < r->num_auths; cntr_sub_auths_0++) { 318 321 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sub_auths[cntr_sub_auths_0])); … … 329 332 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sid_rev_num)); 330 333 NDR_CHECK(ndr_pull_int8(ndr, NDR_SCALARS, &r->num_auths)); 331 if (r->num_auths < 0 || r->num_auths > 15) {334 if (r->num_auths < 0 || r->num_auths > ARRAY_SIZE(r->sub_auths)) { 332 335 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); 333 336 } 334 337 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->id_auth, 6)); 338 ZERO_STRUCT(r->sub_auths); 335 339 for (cntr_sub_auths_0 = 0; cntr_sub_auths_0 < r->num_auths; cntr_sub_auths_0++) { 336 340 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sub_auths[cntr_sub_auths_0])); -
vendor/current/librpc/ndr/ndr_spoolss_buf.c
r740 r988 26 26 #include "librpc/gen_ndr/ndr_spoolss.h" 27 27 #include "librpc/gen_ndr/ndr_security.h" 28 #if (_SAMBA_BUILD_ >= 4)29 #include "param/param.h"30 #endif31 28 32 29 #define NDR_SPOOLSS_PUSH_ENUM_IN(fn) do { \ -
vendor/current/librpc/ndr/ndr_string.c
r746 r988 31 31 uint32_t len1, ofs, len2; 32 32 uint16_t len3; 33 size_t conv erted_size;34 int chset = CH_UTF16;33 size_t conv_src_len = 0, converted_size; 34 int do_convert = 1, chset = CH_UTF16; 35 35 unsigned byte_mul = 2; 36 36 unsigned flags = ndr->flags; … … 55 55 byte_mul = 1; 56 56 flags &= ~LIBNDR_FLAG_STR_UTF8; 57 } 58 59 if (flags & LIBNDR_FLAG_STR_RAW8) { 60 do_convert = 0; 61 byte_mul = 1; 62 flags &= ~LIBNDR_FLAG_STR_RAW8; 57 63 } 58 64 … … 74 80 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &len2)); 75 81 if (len2 > len1) { 76 return ndr_pull_error(ndr, NDR_ERR_STRING, 77 "Bad string lengths len1=%u ofs=%u len2=%u\n", 82 return ndr_pull_error(ndr, NDR_ERR_STRING, 83 "Bad string lengths len1=%u ofs=%u len2=%u\n", 78 84 len1, ofs, len2); 79 } 80 NDR_PULL_NEED_BYTES(ndr, (len2 + c_len_term)*byte_mul); 81 if (len2 == 0) { 82 as = talloc_strdup(ndr->current_mem_ctx, ""); 83 } else { 84 if (!convert_string_talloc(ndr->current_mem_ctx, chset, 85 CH_UNIX, 86 ndr->data+ndr->offset, 87 (len2 + c_len_term)*byte_mul, 88 (void **)(void *)&as, 89 &converted_size, false)) 90 { 91 return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 92 "Bad character conversion with flags 0x%x", flags); 93 } 94 } 95 NDR_CHECK(ndr_pull_advance(ndr, (len2 + c_len_term)*byte_mul)); 96 97 if (len1 != len2) { 85 } else if (len1 != len2) { 98 86 DEBUG(6,("len1[%u] != len2[%u] '%s'\n", len1, len2, as)); 99 87 } 100 101 /* this is a way of detecting if a string is sent with the wrong 102 termination */ 103 if (ndr->flags & LIBNDR_FLAG_STR_NOTERM) { 104 if (strlen(as) < (len2 + c_len_term)) { 105 DEBUG(6,("short string '%s'\n", as)); 106 } 107 } else { 108 if (strlen(as) == (len2 + c_len_term)) { 109 DEBUG(6,("long string '%s'\n", as)); 110 } 111 } 112 *s = as; 88 conv_src_len = len2 + c_len_term; 113 89 break; 114 90 … … 116 92 case LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_NOTERM: 117 93 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &len1)); 118 NDR_PULL_NEED_BYTES(ndr, (len1 + c_len_term)*byte_mul); 119 if (len1 == 0) { 120 as = talloc_strdup(ndr->current_mem_ctx, ""); 121 } else { 122 if (!convert_string_talloc(ndr->current_mem_ctx, chset, 123 CH_UNIX, 124 ndr->data+ndr->offset, 125 (len1 + c_len_term)*byte_mul, 126 (void **)(void *)&as, 127 &converted_size, false)) 128 { 129 return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 130 "Bad character conversion with flags 0x%x", flags); 131 } 132 } 133 NDR_CHECK(ndr_pull_advance(ndr, (len1 + c_len_term)*byte_mul)); 134 135 /* this is a way of detecting if a string is sent with the wrong 136 termination */ 137 if (ndr->flags & LIBNDR_FLAG_STR_NOTERM) { 138 if (strlen(as) < (len1 + c_len_term)) { 139 DEBUG(6,("short string '%s'\n", as)); 140 } 141 } else { 142 if (strlen(as) == (len1 + c_len_term)) { 143 DEBUG(6,("long string '%s'\n", as)); 144 } 145 } 146 *s = as; 94 conv_src_len = len1 + c_len_term; 147 95 break; 148 96 … … 155 103 } 156 104 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &len1)); 157 NDR_PULL_NEED_BYTES(ndr, (len1 + c_len_term)*byte_mul); 158 if (len1 == 0) { 159 as = talloc_strdup(ndr->current_mem_ctx, ""); 160 } else { 161 if (!convert_string_talloc(ndr->current_mem_ctx, chset, 162 CH_UNIX, 163 ndr->data+ndr->offset, 164 (len1 + c_len_term)*byte_mul, 165 (void **)(void *)&as, 166 &converted_size, false)) 167 { 168 return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 169 "Bad character conversion with flags 0x%x", flags); 170 } 171 } 172 NDR_CHECK(ndr_pull_advance(ndr, (len1 + c_len_term)*byte_mul)); 173 174 /* this is a way of detecting if a string is sent with the wrong 175 termination */ 176 if (ndr->flags & LIBNDR_FLAG_STR_NOTERM) { 177 if (strlen(as) < (len1 + c_len_term)) { 178 DEBUG(6,("short string '%s'\n", as)); 179 } 180 } else { 181 if (strlen(as) == (len1 + c_len_term)) { 182 DEBUG(6,("long string '%s'\n", as)); 183 } 184 } 185 *s = as; 186 break; 187 105 conv_src_len = len1 + c_len_term; 106 break; 188 107 189 108 case LIBNDR_FLAG_STR_SIZE2: 190 109 case LIBNDR_FLAG_STR_SIZE2|LIBNDR_FLAG_STR_NOTERM: 191 110 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &len3)); 192 NDR_PULL_NEED_BYTES(ndr, (len3 + c_len_term)*byte_mul); 193 if (len3 == 0) { 194 as = talloc_strdup(ndr->current_mem_ctx, ""); 195 } else { 196 if (!convert_string_talloc(ndr->current_mem_ctx, chset, 197 CH_UNIX, 198 ndr->data+ndr->offset, 199 (len3 + c_len_term)*byte_mul, 200 (void **)(void *)&as, 201 &converted_size, false)) 202 { 203 return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 204 "Bad character conversion with flags 0x%x", flags); 205 } 206 } 207 NDR_CHECK(ndr_pull_advance(ndr, (len3 + c_len_term)*byte_mul)); 208 209 /* this is a way of detecting if a string is sent with the wrong 210 termination */ 211 if (ndr->flags & LIBNDR_FLAG_STR_NOTERM) { 212 if (strlen(as) < (len3 + c_len_term)) { 213 DEBUG(6,("short string '%s'\n", as)); 214 } 215 } else { 216 if (strlen(as) == (len3 + c_len_term)) { 217 DEBUG(6,("long string '%s'\n", as)); 218 } 219 } 220 *s = as; 111 conv_src_len = len3 + c_len_term; 221 112 break; 222 113 223 114 case LIBNDR_FLAG_STR_SIZE2|LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_BYTESIZE: 224 115 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &len3)); 225 NDR_PULL_NEED_BYTES(ndr, len3); 226 if (len3 == 0) { 227 as = talloc_strdup(ndr->current_mem_ctx, ""); 228 } else { 229 if (!convert_string_talloc(ndr->current_mem_ctx, chset, 230 CH_UNIX, 231 ndr->data+ndr->offset, len3, 232 (void **)(void *)&as, 233 &converted_size, false)) 234 { 235 return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 236 "Bad character conversion with flags 0x%x", flags); 237 } 238 } 239 NDR_CHECK(ndr_pull_advance(ndr, len3)); 240 *s = as; 116 conv_src_len = len3; 117 byte_mul = 1; /* the length is now absolute */ 241 118 break; 242 119 243 120 case LIBNDR_FLAG_STR_NULLTERM: 244 121 if (byte_mul == 1) { 245 len1= ascii_len_n((const char *)(ndr->data+ndr->offset), ndr->data_size - ndr->offset);122 conv_src_len = ascii_len_n((const char *)(ndr->data+ndr->offset), ndr->data_size - ndr->offset); 246 123 } else { 247 len1 = utf16_len_n(ndr->data+ndr->offset, ndr->data_size - ndr->offset); 248 } 249 if (!convert_string_talloc(ndr->current_mem_ctx, chset, CH_UNIX, 250 ndr->data+ndr->offset, len1, 251 (void **)(void *)&as, 252 &converted_size, false)) 253 { 254 return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 255 "Bad character conversion with flags 0x%x", flags); 256 } 257 NDR_CHECK(ndr_pull_advance(ndr, len1)); 258 *s = as; 124 conv_src_len = utf16_len_n(ndr->data+ndr->offset, ndr->data_size - ndr->offset); 125 } 126 byte_mul = 1; /* the length is now absolute */ 259 127 break; 260 128 … … 264 132 ndr->flags & LIBNDR_STRING_FLAGS); 265 133 } 266 267 len1 = ndr->data_size - ndr->offset; 268 269 NDR_PULL_NEED_BYTES(ndr, len1); 270 if (len1 == 0) { 271 as = talloc_strdup(ndr->current_mem_ctx, ""); 272 } else { 273 if (!convert_string_talloc(ndr->current_mem_ctx, chset, 274 CH_UNIX, 275 ndr->data+ndr->offset, len1, 276 (void **)(void *)&as, 277 &converted_size, false)) 278 { 279 return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 280 "Bad character conversion with flags 0x%x", flags); 281 } 282 } 283 NDR_CHECK(ndr_pull_advance(ndr, len1)); 284 285 *s = as; 134 conv_src_len = ndr->data_size - ndr->offset; 135 byte_mul = 1; /* the length is now absolute */ 286 136 break; 287 137 … … 290 140 ndr->flags & LIBNDR_STRING_FLAGS); 291 141 } 142 143 NDR_PULL_NEED_BYTES(ndr, conv_src_len * byte_mul); 144 if (conv_src_len == 0) { 145 as = talloc_strdup(ndr->current_mem_ctx, ""); 146 converted_size = 0; 147 } else { 148 if (!do_convert) { 149 as = talloc_strndup(ndr->current_mem_ctx, 150 (char *)ndr->data + ndr->offset, 151 conv_src_len); 152 if (!as) { 153 return ndr_pull_error(ndr, NDR_ERR_ALLOC, 154 "Failed to talloc_strndup() in RAW8 ndr_string_pull()"); 155 } 156 converted_size = MIN(strlen(as)+1, conv_src_len); 157 } else if (!convert_string_talloc(ndr->current_mem_ctx, chset, 158 CH_UNIX, ndr->data + ndr->offset, 159 conv_src_len * byte_mul, 160 (void **)(void *)&as, 161 &converted_size)) { 162 return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 163 "Bad character conversion with flags 0x%x", flags); 164 } 165 } 166 167 /* this is a way of detecting if a string is sent with the wrong 168 termination */ 169 if (ndr->flags & LIBNDR_FLAG_STR_NOTERM) { 170 if (as && converted_size > 0 && as[converted_size-1] == '\0') { 171 DEBUG(6,("short string '%s', sent with NULL termination despite NOTERM flag in IDL\n", as)); 172 } 173 } else { 174 if (as && converted_size > 0 && as[converted_size-1] != '\0') { 175 DEBUG(6,("long string '%s', send without NULL termination (which was expected)\n", as)); 176 } 177 } 178 179 NDR_CHECK(ndr_pull_advance(ndr, conv_src_len * byte_mul)); 180 *s = as; 292 181 293 182 return NDR_ERR_SUCCESS; … … 302 191 ssize_t s_len, c_len; 303 192 size_t d_len; 304 int chset = CH_UTF16;193 int do_convert = 1, chset = CH_UTF16; 305 194 unsigned flags = ndr->flags; 306 195 unsigned byte_mul = 2; … … 329 218 } 330 219 220 if (flags & LIBNDR_FLAG_STR_RAW8) { 221 do_convert = 0; 222 byte_mul = 1; 223 flags &= ~LIBNDR_FLAG_STR_RAW8; 224 } 225 331 226 flags &= ~LIBNDR_FLAG_STR_CONFORMANT; 332 227 … … 334 229 s_len++; 335 230 } 336 if (!convert_string_talloc(ndr, CH_UNIX, chset, s, s_len, 337 (void **)(void *)&dest, &d_len, false)) 231 232 if (!do_convert) { 233 d_len = s_len; 234 dest = (uint8_t *)talloc_strndup(ndr, s, s_len); 235 } else if (!convert_string_talloc(ndr, CH_UNIX, chset, s, s_len, 236 (void **)(void *)&dest, &d_len)) 338 237 { 339 238 return ndr_push_error(ndr, NDR_ERR_CHARCNV, … … 404 303 unsigned c_len_term = 1; 405 304 406 c_len = s?strlen_m(s):0; 407 408 if (flags & (LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_UTF8)) { 305 if (flags & LIBNDR_FLAG_STR_RAW8) { 306 c_len = s?strlen(s):0; 307 } else { 308 c_len = s?strlen_m(s):0; 309 } 310 311 if (flags & (LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_RAW8|LIBNDR_FLAG_STR_UTF8)) { 409 312 byte_mul = 1; 410 313 } … … 612 515 uint32_t i; 613 516 size_t size = 0; 517 int rawbytes = 0; 518 519 if (flags & LIBNDR_FLAG_STR_RAW8) { 520 rawbytes = 1; 521 flags &= ~LIBNDR_FLAG_STR_RAW8; 522 } 614 523 615 524 switch (flags & LIBNDR_STRING_FLAGS) { 616 525 case LIBNDR_FLAG_STR_NULLTERM: 617 526 for (i = 0; i < count; i++) { 618 size += strlen_m_term(a[i]);527 size += rawbytes?strlen(a[i]) + 1:strlen_m_term(a[i]); 619 528 } 620 529 break; 621 530 case LIBNDR_FLAG_STR_NOTERM: 622 531 for (i = 0; i < count; i++) { 623 size += strlen_m(a[i]);532 size += rawbytes?strlen(a[i]):strlen_m(a[i]); 624 533 } 625 534 break; … … 651 560 652 561 save_offset = ndr->offset; 653 ndr_pull_advance(ndr, (count - 1) * element_size);562 NDR_CHECK(ndr_pull_advance(ndr, (count - 1) * element_size)); 654 563 NDR_PULL_NEED_BYTES(ndr, element_size); 655 564 … … 685 594 ndr->data+ndr->offset, length*byte_mul, 686 595 discard_const_p(void *, var), 687 &converted_size , false))596 &converted_size)) 688 597 { 689 598 return ndr_pull_error(ndr, NDR_ERR_CHARCNV, … … 712 621 713 622 str_len = ndr_string_length(ndr->data+ndr->offset, byte_mul); 714 str_len = MIN(str_len, length); /* overrun protection */ 715 623 str_len = MIN(str_len, length); /* overrun protection */ 716 624 if (!convert_string_talloc(ndr->current_mem_ctx, chset, CH_UNIX, 717 625 ndr->data+ndr->offset, str_len*byte_mul, 718 626 discard_const_p(void *, var), 719 &converted_size , false))627 &converted_size)) 720 628 { 721 629 return ndr_pull_error(ndr, NDR_ERR_CHARCNV, … … 729 637 _PUBLIC_ enum ndr_err_code ndr_push_charset(struct ndr_push *ndr, int ndr_flags, const char *var, uint32_t length, uint8_t byte_mul, charset_t chset) 730 638 { 731 ssize_t re t, required;639 ssize_t required; 732 640 733 641 if (NDR_BE(ndr) && chset == CH_UTF16) { … … 740 648 741 649 if (required) { 742 ret = convert_string(CH_UNIX, chset, 650 size_t size = 0; 651 if (!convert_string(CH_UNIX, chset, 743 652 var, strlen(var), 744 ndr->data+ndr->offset, required, false); 745 if (ret == -1) { 746 return ndr_push_error(ndr, NDR_ERR_CHARCNV, 747 "Bad character conversion"); 653 ndr->data+ndr->offset, required, &size)) { 654 return ndr_push_error(ndr, NDR_ERR_CHARCNV, 655 "Bad character conversion"); 748 656 } 749 657 750 658 /* Make sure the remaining part of the string is filled with zeroes */ 751 if ( ret< required) {752 memset(ndr->data+ndr->offset+ ret, 0, required-ret);659 if (size < required) { 660 memset(ndr->data+ndr->offset+size, 0, required-size); 753 661 } 754 662 } … … 769 677 case CH_UTF8: 770 678 return strlen_m_ext_term((const char *)var, CH_UNIX, chset); 771 case CH_DISPLAY:772 679 case CH_DOS: 773 680 case CH_UNIX: -
vendor/current/librpc/ndr/ndr_table.c
r414 r988 74 74 { 75 75 const struct ndr_interface_list *l; 76 for (l=ndr_ interfaces;l;l=l->next){76 for (l=ndr_table_list();l;l=l->next){ 77 77 if (GUID_equal(&l->table->syntax_id.uuid, uuid) && 78 78 l->table->syntax_id.if_version == if_version) { … … 90 90 { 91 91 const struct ndr_interface_list *l; 92 for (l=ndr_ interfaces;l;l=l->next) {92 for (l=ndr_table_list();l;l=l->next) { 93 93 if (strcasecmp(l->table->name, name) == 0) { 94 return l->table; 95 } 96 } 97 return NULL; 98 } 99 100 /* 101 find a dcerpc interface by syntax 102 */ 103 const struct ndr_interface_table *ndr_table_by_syntax(const struct ndr_syntax_id *syntax) 104 { 105 const struct ndr_interface_list *l; 106 for (l=ndr_table_list();l;l=l->next) { 107 if (ndr_syntax_id_equal(&l->table->syntax_id, syntax)) { 94 108 return l->table; 95 109 } … … 104 118 { 105 119 const struct ndr_interface_list *l; 106 for (l=ndr_ interfaces;l;l=l->next) {120 for (l=ndr_table_list();l;l=l->next) { 107 121 if (GUID_equal(&l->table->syntax_id.uuid, uuid)) { 108 122 return l->table; … … 117 131 const struct ndr_interface_list *ndr_table_list(void) 118 132 { 133 ndr_table_init(); 119 134 return ndr_interfaces; 120 135 } -
vendor/current/librpc/ndr/ndr_table.h
r740 r988 28 28 int ndr_interface_num_calls(const struct GUID *uuid, uint32_t if_version); 29 29 const struct ndr_interface_table *ndr_table_by_name(const char *name); 30 const struct ndr_interface_table *ndr_table_by_syntax(const struct ndr_syntax_id *syntax); 30 31 const struct ndr_interface_table *ndr_table_by_uuid(const struct GUID *uuid); 31 32 const struct ndr_interface_list *ndr_table_list(void); -
vendor/current/librpc/ndr/ndr_wmi.c
r740 r988 24 24 #include "librpc/gen_ndr/ndr_dcom.h" 25 25 #include "librpc/gen_ndr/ndr_wmi.h" 26 #include "librpc/ndr/ndr_wmi.h" 26 27 27 28 // Just for debugging -
vendor/current/librpc/ndr/uuid.c
r740 r988 158 158 159 159 /** 160 build a GUID from a string161 */162 _PUBLIC_ NTSTATUS NS_GUID_from_string(const char *s, struct GUID *guid)163 {164 NTSTATUS status = NT_STATUS_INVALID_PARAMETER;165 uint32_t time_low;166 uint32_t time_mid, time_hi_and_version;167 uint32_t clock_seq[2];168 uint32_t node[6];169 int i;170 171 if (s == NULL) {172 return NT_STATUS_INVALID_PARAMETER;173 }174 175 if (11 == sscanf(s, "%08x-%04x%04x-%02x%02x%02x%02x-%02x%02x%02x%02x",176 &time_low, &time_mid, &time_hi_and_version,177 &clock_seq[0], &clock_seq[1],178 &node[0], &node[1], &node[2], &node[3], &node[4], &node[5])) {179 status = NT_STATUS_OK;180 }181 182 if (!NT_STATUS_IS_OK(status)) {183 return status;184 }185 186 guid->time_low = time_low;187 guid->time_mid = time_mid;188 guid->time_hi_and_version = time_hi_and_version;189 guid->clock_seq[0] = clock_seq[0];190 guid->clock_seq[1] = clock_seq[1];191 for (i=0;i<6;i++) {192 guid->node[i] = node[i];193 }194 195 return NT_STATUS_OK;196 }197 198 /**199 160 * generate a random GUID 200 161 */ … … 237 198 _PUBLIC_ bool GUID_equal(const struct GUID *u1, const struct GUID *u2) 238 199 { 239 if (u1->time_low != u2->time_low || 240 u1->time_mid != u2->time_mid || 241 u1->time_hi_and_version != u2->time_hi_and_version || 242 u1->clock_seq[0] != u2->clock_seq[0] || 243 u1->clock_seq[1] != u2->clock_seq[1] || 244 memcmp(u1->node, u2->node, 6) != 0) { 245 return false; 246 } 247 return true; 200 return (GUID_compare(u1, u2) == 0); 248 201 } 249 202 … … 278 231 _PUBLIC_ char *GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid) 279 232 { 280 return talloc_asprintf(mem_ctx, 281 "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", 282 guid->time_low, guid->time_mid, 283 guid->time_hi_and_version, 284 guid->clock_seq[0], 285 guid->clock_seq[1], 286 guid->node[0], guid->node[1], 287 guid->node[2], guid->node[3], 288 guid->node[4], guid->node[5]); 233 struct GUID_txt_buf buf; 234 return talloc_strdup(mem_ctx, GUID_buf_string(guid, &buf)); 235 } 236 237 /** 238 * Does the same without allocating memory, using the structure buffer. 239 * Useful for debug messages, so that you do not have to talloc_free the result 240 */ 241 _PUBLIC_ char* GUID_buf_string(const struct GUID *guid, 242 struct GUID_txt_buf *dst) 243 { 244 if (!guid) { 245 return NULL; 246 } 247 snprintf(dst->buf, sizeof(dst->buf), 248 "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", 249 guid->time_low, guid->time_mid, 250 guid->time_hi_and_version, 251 guid->clock_seq[0], 252 guid->clock_seq[1], 253 guid->node[0], guid->node[1], 254 guid->node[2], guid->node[3], 255 guid->node[4], guid->node[5]); 256 return dst->buf; 289 257 } 290 258 … … 319 287 } 320 288 321 _PUBLIC_ char *NS_GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid) 322 { 323 return talloc_asprintf(mem_ctx, 324 "%08x-%04x%04x-%02x%02x%02x%02x-%02x%02x%02x%02x", 325 guid->time_low, guid->time_mid, 326 guid->time_hi_and_version, 327 guid->clock_seq[0], 328 guid->clock_seq[1], 329 guid->node[0], guid->node[1], 330 guid->node[2], guid->node[3], 331 guid->node[4], guid->node[5]); 332 } 333 334 _PUBLIC_ bool policy_handle_empty(const struct policy_handle *h) 289 _PUBLIC_ bool ndr_policy_handle_empty(const struct policy_handle *h) 335 290 { 336 291 return (h->handle_type == 0 && GUID_all_zero(&h->uuid)); 337 292 } 338 293 339 _PUBLIC_ bool is_valid_policy_hnd(const struct policy_handle *hnd) 340 { 341 return !policy_handle_empty(hnd); 342 } 343 344 _PUBLIC_ bool policy_handle_equal(const struct policy_handle *hnd1, 294 _PUBLIC_ bool ndr_policy_handle_equal(const struct policy_handle *hnd1, 345 295 const struct policy_handle *hnd2) 346 296 { -
vendor/current/librpc/ndr_krb5pac.pc.in
r740 r988 7 7 Description: NDR marshallers for the KRB5 PAC formats 8 8 Requires: ndr 9 Version: 0.0.19 Version: @PACKAGE_VERSION@ 10 10 Libs: @LIB_RPATH@ -L${libdir} -lndr-krb5pac 11 11 Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1 -D_GNU_SOURCE=1 -
vendor/current/librpc/ndr_standard.pc.in
r740 r988 7 7 Description: NDR marshallers for the standard set of DCE/RPC interfaces 8 8 Requires: ndr 9 Version: 0.0.19 Version: @PACKAGE_VERSION@ 10 10 Libs: @LIB_RPATH@ -L${libdir} -lndr-standard 11 11 Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1 -D_GNU_SOURCE=1 -
vendor/current/librpc/rpc/binding.c
r740 r988 8 8 Copyright (C) Andrew Bartlett <abartlet@samba.org> 2005 9 9 Copyright (C) Rafal Szczesniak 2006 10 Copyright (C) Stefan Metzmacher 2014 10 11 11 12 This program is free software; you can redistribute it and/or modify … … 34 35 35 36 #define MAX_PROTSEQ 10 37 38 struct dcerpc_binding { 39 enum dcerpc_transport_t transport; 40 struct GUID object; 41 const char *object_string; 42 const char *host; 43 const char *target_hostname; 44 const char *target_principal; 45 const char *endpoint; 46 const char **options; 47 uint32_t flags; 48 uint32_t assoc_group_id; 49 char assoc_group_string[11]; /* 0x3456789a + '\0' */ 50 }; 36 51 37 52 static const struct { … … 74 89 }; 75 90 76 static const struct {91 static const struct ncacn_option { 77 92 const char *name; 78 93 uint32_t flag; … … 84 99 {"ntlm", DCERPC_AUTH_NTLM}, 85 100 {"krb5", DCERPC_AUTH_KRB5}, 101 {"schannel", DCERPC_SCHANNEL}, 86 102 {"validate", DCERPC_DEBUG_VALIDATE_BOTH}, 87 103 {"print", DCERPC_DEBUG_PRINT_BOTH}, … … 89 105 {"bigendian", DCERPC_PUSH_BIGENDIAN}, 90 106 {"smb2", DCERPC_SMB2}, 91 {"hdrsign", DCERPC_HEADER_SIGNING},92 107 {"ndr64", DCERPC_NDR64}, 93 {"localaddress", DCERPC_LOCALADDRESS}94 108 }; 109 110 static const struct ncacn_option *ncacn_option_by_name(const char *name) 111 { 112 size_t i; 113 114 for (i=0; i<ARRAY_SIZE(ncacn_options); i++) { 115 int ret; 116 117 ret = strcasecmp(ncacn_options[i].name, name); 118 if (ret != 0) { 119 continue; 120 } 121 122 return &ncacn_options[i]; 123 } 124 125 return NULL; 126 } 95 127 96 128 const char *epm_floor_string(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor) … … 106 138 char *uuidstr; 107 139 108 if (GUID_equal(&syntax.uuid, &ndr_transfer_syntax .uuid)) {140 if (GUID_equal(&syntax.uuid, &ndr_transfer_syntax_ndr.uuid)) { 109 141 return "NDR"; 110 142 } 111 143 112 if (GUID_equal(&syntax.uuid, &ndr 64_transfer_syntax.uuid)) {144 if (GUID_equal(&syntax.uuid, &ndr_transfer_syntax_ndr64.uuid)) { 113 145 return "NDR64"; 114 146 } … … 179 211 { 180 212 char *s = talloc_strdup(mem_ctx, ""); 213 char *o = s; 181 214 int i; 182 215 const char *t_name = NULL; 216 bool option_section = false; 217 const char *target_hostname = NULL; 183 218 184 219 if (b->transport != NCA_UNKNOWN) { 185 220 t_name = derpc_transport_string_by_transport(b->transport); 186 221 if (!t_name) { 187 return NULL; 188 } 189 } 190 191 if (!GUID_all_zero(&b->object.uuid)) { 192 s = talloc_asprintf(s, "%s@", 193 GUID_string(mem_ctx, &b->object.uuid)); 222 talloc_free(o); 223 return NULL; 224 } 225 } 226 227 if (!GUID_all_zero(&b->object)) { 228 o = s; 229 s = talloc_asprintf_append_buffer(s, "%s@", 230 GUID_string(mem_ctx, &b->object)); 231 if (s == NULL) { 232 talloc_free(o); 233 return NULL; 234 } 194 235 } 195 236 196 237 if (t_name != NULL) { 238 o = s; 197 239 s = talloc_asprintf_append_buffer(s, "%s:", t_name); 198 240 if (s == NULL) { 241 talloc_free(o); 199 242 return NULL; 200 243 } … … 202 245 203 246 if (b->host) { 247 o = s; 204 248 s = talloc_asprintf_append_buffer(s, "%s", b->host); 205 } 206 207 if (!b->endpoint && !b->options && !b->flags) { 249 if (s == NULL) { 250 talloc_free(o); 251 return NULL; 252 } 253 } 254 255 target_hostname = b->target_hostname; 256 if (target_hostname != NULL && b->host != NULL) { 257 if (strcmp(target_hostname, b->host) == 0) { 258 target_hostname = NULL; 259 } 260 } 261 262 if (b->endpoint) { 263 option_section = true; 264 } else if (target_hostname) { 265 option_section = true; 266 } else if (b->target_principal) { 267 option_section = true; 268 } else if (b->assoc_group_id != 0) { 269 option_section = true; 270 } else if (b->options) { 271 option_section = true; 272 } else if (b->flags) { 273 option_section = true; 274 } 275 276 if (!option_section) { 208 277 return s; 209 278 } 210 279 280 o = s; 211 281 s = talloc_asprintf_append_buffer(s, "["); 282 if (s == NULL) { 283 talloc_free(o); 284 return NULL; 285 } 212 286 213 287 if (b->endpoint) { 288 o = s; 214 289 s = talloc_asprintf_append_buffer(s, "%s", b->endpoint); 215 } 216 217 /* this is a *really* inefficent way of dealing with strings, 218 but this is rarely called and the strings are always short, 219 so I don't care */ 290 if (s == NULL) { 291 talloc_free(o); 292 return NULL; 293 } 294 } 295 296 for (i=0;i<ARRAY_SIZE(ncacn_options);i++) { 297 if (!(b->flags & ncacn_options[i].flag)) { 298 continue; 299 } 300 301 o = s; 302 s = talloc_asprintf_append_buffer(s, ",%s", ncacn_options[i].name); 303 if (s == NULL) { 304 talloc_free(o); 305 return NULL; 306 } 307 } 308 309 if (target_hostname) { 310 o = s; 311 s = talloc_asprintf_append_buffer(s, ",target_hostname=%s", 312 b->target_hostname); 313 if (s == NULL) { 314 talloc_free(o); 315 return NULL; 316 } 317 } 318 319 if (b->target_principal) { 320 o = s; 321 s = talloc_asprintf_append_buffer(s, ",target_principal=%s", 322 b->target_principal); 323 if (s == NULL) { 324 talloc_free(o); 325 return NULL; 326 } 327 } 328 329 if (b->assoc_group_id != 0) { 330 o = s; 331 s = talloc_asprintf_append_buffer(s, ",assoc_group_id=0x%08x", 332 b->assoc_group_id); 333 if (s == NULL) { 334 talloc_free(o); 335 return NULL; 336 } 337 } 338 220 339 for (i=0;b->options && b->options[i];i++) { 340 o = s; 221 341 s = talloc_asprintf_append_buffer(s, ",%s", b->options[i]); 222 if (!s) return NULL; 223 } 224 225 for (i=0;i<ARRAY_SIZE(ncacn_options);i++) { 226 if (b->flags & ncacn_options[i].flag) { 227 if (ncacn_options[i].flag == DCERPC_LOCALADDRESS && b->localaddress) { 228 s = talloc_asprintf_append_buffer(s, ",%s=%s", ncacn_options[i].name, 229 b->localaddress); 230 } else { 231 s = talloc_asprintf_append_buffer(s, ",%s", ncacn_options[i].name); 232 } 233 if (!s) return NULL; 234 } 235 } 236 342 if (s == NULL) { 343 talloc_free(o); 344 return NULL; 345 } 346 } 347 348 o = s; 237 349 s = talloc_asprintf_append_buffer(s, "]"); 350 if (s == NULL) { 351 talloc_free(o); 352 return NULL; 353 } 238 354 239 355 return s; … … 243 359 parse a binding string into a dcerpc_binding structure 244 360 */ 245 _PUBLIC_ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_binding **b_out) 246 { 361 _PUBLIC_ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *_s, struct dcerpc_binding **b_out) 362 { 363 char *_t; 247 364 struct dcerpc_binding *b; 248 char *options; 365 char *s; 366 char *options = NULL; 249 367 char *p; 250 int i, j, comma_count; 368 size_t i; 369 NTSTATUS status; 251 370 252 371 b = talloc_zero(mem_ctx, struct dcerpc_binding); … … 255 374 } 256 375 376 _t = talloc_strdup(b, _s); 377 if (_t == NULL) { 378 talloc_free(b); 379 return NT_STATUS_NO_MEMORY; 380 } 381 382 s = _t; 383 384 p = strchr(s, '['); 385 if (p) { 386 *p = '\0'; 387 options = p + 1; 388 if (options[strlen(options)-1] != ']') { 389 talloc_free(b); 390 return NT_STATUS_INVALID_PARAMETER_MIX; 391 } 392 options[strlen(options)-1] = 0; 393 } 394 257 395 p = strchr(s, '@'); 258 396 259 397 if (p && PTR_DIFF(p, s) == 36) { /* 36 is the length of a UUID */ 260 NTSTATUS status; 261 DATA_BLOB blob = data_blob(s, 36); 262 status = GUID_from_data_blob(&blob, &b->object.uuid); 263 264 if (NT_STATUS_IS_ERR(status)) { 265 DEBUG(0, ("Failed parsing UUID\n")); 398 *p = '\0'; 399 400 status = dcerpc_binding_set_string_option(b, "object", s); 401 if (!NT_STATUS_IS_OK(status)) { 402 talloc_free(b); 266 403 return status; 267 404 } 268 405 269 406 s = p + 1; 270 } else { 271 ZERO_STRUCT(b->object); 272 } 273 274 b->object.if_version = 0; 407 } 275 408 276 409 p = strchr(s, ':'); … … 278 411 if (p == NULL) { 279 412 b->transport = NCA_UNKNOWN; 413 } else if (is_ipaddress_v6(s)) { 414 b->transport = NCA_UNKNOWN; 280 415 } else { 281 char *type = talloc_strndup(mem_ctx, s, PTR_DIFF(p, s)); 282 if (!type) { 416 *p = '\0'; 417 418 status = dcerpc_binding_set_string_option(b, "transport", s); 419 if (!NT_STATUS_IS_OK(status)) { 420 talloc_free(b); 421 return status; 422 } 423 424 s = p + 1; 425 } 426 427 if (strlen(s) > 0) { 428 status = dcerpc_binding_set_string_option(b, "host", s); 429 if (!NT_STATUS_IS_OK(status)) { 430 talloc_free(b); 431 return status; 432 } 433 434 b->target_hostname = talloc_strdup(b, b->host); 435 if (b->target_hostname == NULL) { 436 talloc_free(b); 283 437 return NT_STATUS_NO_MEMORY; 284 438 } 285 286 for (i=0;i<ARRAY_SIZE(transports);i++) { 287 if (strcasecmp(type, transports[i].name) == 0) { 288 b->transport = transports[i].transport; 289 break; 439 } 440 441 for (i=0; options != NULL; i++) { 442 const char *name = options; 443 const char *value = NULL; 444 445 p = strchr(options, ','); 446 if (p != NULL) { 447 *p = '\0'; 448 options = p+1; 449 } else { 450 options = NULL; 451 } 452 453 p = strchr(name, '='); 454 if (p != NULL) { 455 *p = '\0'; 456 value = p + 1; 457 } 458 459 if (value == NULL) { 460 /* 461 * If it's not a key=value pair 462 * it might be a ncacn_option 463 * or if it's the first option 464 * it's the endpoint. 465 */ 466 const struct ncacn_option *no = NULL; 467 468 value = name; 469 470 no = ncacn_option_by_name(name); 471 if (no == NULL) { 472 if (i > 0) { 473 /* 474 * we don't allow unknown options 475 */ 476 return NT_STATUS_INVALID_PARAMETER_MIX; 477 } 478 479 /* 480 * This is the endpoint 481 */ 482 name = "endpoint"; 483 if (strlen(value) == 0) { 484 value = NULL; 485 } 290 486 } 291 487 } 292 488 293 if (i==ARRAY_SIZE(transports)) { 294 DEBUG(0,("Unknown dcerpc transport '%s'\n", type)); 295 return NT_STATUS_INVALID_PARAMETER; 296 } 297 298 talloc_free(type); 299 300 s = p+1; 301 } 302 303 p = strchr(s, '['); 304 if (p) { 305 b->host = talloc_strndup(b, s, PTR_DIFF(p, s)); 306 options = talloc_strdup(mem_ctx, p+1); 307 if (options[strlen(options)-1] != ']') { 308 return NT_STATUS_INVALID_PARAMETER; 309 } 310 options[strlen(options)-1] = 0; 489 status = dcerpc_binding_set_string_option(b, name, value); 490 if (!NT_STATUS_IS_OK(status)) { 491 talloc_free(b); 492 return status; 493 } 494 } 495 496 talloc_free(_t); 497 *b_out = b; 498 return NT_STATUS_OK; 499 } 500 501 _PUBLIC_ struct GUID dcerpc_binding_get_object(const struct dcerpc_binding *b) 502 { 503 return b->object; 504 } 505 506 _PUBLIC_ NTSTATUS dcerpc_binding_set_object(struct dcerpc_binding *b, 507 struct GUID object) 508 { 509 char *tmp = discard_const_p(char, b->object_string); 510 511 if (GUID_all_zero(&object)) { 512 talloc_free(tmp); 513 b->object_string = NULL; 514 ZERO_STRUCT(b->object); 515 return NT_STATUS_OK; 516 } 517 518 b->object_string = GUID_string(b, &object); 519 if (b->object_string == NULL) { 520 b->object_string = tmp; 521 return NT_STATUS_NO_MEMORY; 522 } 523 talloc_free(tmp); 524 525 b->object = object; 526 return NT_STATUS_OK; 527 } 528 529 _PUBLIC_ enum dcerpc_transport_t dcerpc_binding_get_transport(const struct dcerpc_binding *b) 530 { 531 return b->transport; 532 } 533 534 _PUBLIC_ NTSTATUS dcerpc_binding_set_transport(struct dcerpc_binding *b, 535 enum dcerpc_transport_t transport) 536 { 537 NTSTATUS status; 538 539 /* 540 * TODO: we may want to check the transport value is 541 * wellknown. 542 */ 543 if (b->transport == transport) { 544 return NT_STATUS_OK; 545 } 546 547 /* 548 * This implicitly resets the endpoint 549 * as the endpoint is transport specific. 550 * 551 * It also resets the assoc group as it's 552 * also endpoint specific. 553 * 554 * TODO: in future we may reset more options 555 * here. 556 */ 557 status = dcerpc_binding_set_string_option(b, "endpoint", NULL); 558 if (!NT_STATUS_IS_OK(status)) { 559 return status; 560 } 561 562 b->assoc_group_id = 0; 563 564 b->transport = transport; 565 return NT_STATUS_OK; 566 } 567 568 _PUBLIC_ void dcerpc_binding_get_auth_info(const struct dcerpc_binding *b, 569 enum dcerpc_AuthType *_auth_type, 570 enum dcerpc_AuthLevel *_auth_level) 571 { 572 enum dcerpc_AuthType auth_type; 573 enum dcerpc_AuthLevel auth_level; 574 575 if (b->flags & DCERPC_AUTH_SPNEGO) { 576 auth_type = DCERPC_AUTH_TYPE_SPNEGO; 577 } else if (b->flags & DCERPC_AUTH_KRB5) { 578 auth_type = DCERPC_AUTH_TYPE_KRB5; 579 } else if (b->flags & DCERPC_SCHANNEL) { 580 auth_type = DCERPC_AUTH_TYPE_SCHANNEL; 581 } else if (b->flags & DCERPC_AUTH_NTLM) { 582 auth_type = DCERPC_AUTH_TYPE_NTLMSSP; 311 583 } else { 312 b->host = talloc_strdup(b, s); 313 options = NULL; 314 } 315 if (!b->host) { 584 auth_type = DCERPC_AUTH_TYPE_NONE; 585 } 586 587 if (b->flags & DCERPC_SEAL) { 588 auth_level = DCERPC_AUTH_LEVEL_PRIVACY; 589 } else if (b->flags & DCERPC_SIGN) { 590 auth_level = DCERPC_AUTH_LEVEL_INTEGRITY; 591 } else if (b->flags & DCERPC_CONNECT) { 592 auth_level = DCERPC_AUTH_LEVEL_CONNECT; 593 } else if (auth_type != DCERPC_AUTH_TYPE_NONE) { 594 auth_level = DCERPC_AUTH_LEVEL_INTEGRITY; 595 } else { 596 auth_level = DCERPC_AUTH_LEVEL_NONE; 597 } 598 599 if (_auth_type != NULL) { 600 *_auth_type = auth_type; 601 } 602 603 if (_auth_level != NULL) { 604 *_auth_level = auth_level; 605 } 606 } 607 608 _PUBLIC_ uint32_t dcerpc_binding_get_assoc_group_id(const struct dcerpc_binding *b) 609 { 610 return b->assoc_group_id; 611 } 612 613 _PUBLIC_ NTSTATUS dcerpc_binding_set_assoc_group_id(struct dcerpc_binding *b, 614 uint32_t assoc_group_id) 615 { 616 b->assoc_group_id = assoc_group_id; 617 return NT_STATUS_OK; 618 } 619 620 _PUBLIC_ struct ndr_syntax_id dcerpc_binding_get_abstract_syntax(const struct dcerpc_binding *b) 621 { 622 const char *s = dcerpc_binding_get_string_option(b, "abstract_syntax"); 623 bool ok; 624 struct ndr_syntax_id id; 625 626 if (s == NULL) { 627 return ndr_syntax_id_null; 628 } 629 630 ok = ndr_syntax_id_from_string(s, &id); 631 if (!ok) { 632 return ndr_syntax_id_null; 633 } 634 635 return id; 636 } 637 638 _PUBLIC_ NTSTATUS dcerpc_binding_set_abstract_syntax(struct dcerpc_binding *b, 639 const struct ndr_syntax_id *syntax) 640 { 641 NTSTATUS status; 642 char *s = NULL; 643 644 if (syntax == NULL) { 645 status = dcerpc_binding_set_string_option(b, "abstract_syntax", NULL); 646 if (!NT_STATUS_IS_OK(status)) { 647 return status; 648 } 649 650 return NT_STATUS_OK; 651 } 652 653 if (ndr_syntax_id_equal(&ndr_syntax_id_null, syntax)) { 654 status = dcerpc_binding_set_string_option(b, "abstract_syntax", NULL); 655 if (!NT_STATUS_IS_OK(status)) { 656 return status; 657 } 658 659 return NT_STATUS_OK; 660 } 661 662 s = ndr_syntax_id_to_string(b, syntax); 663 if (s == NULL) { 316 664 return NT_STATUS_NO_MEMORY; 317 665 } 318 666 319 b->target_hostname = b->host; 320 321 b->options = NULL; 322 b->flags = 0; 323 b->assoc_group_id = 0; 324 b->endpoint = NULL; 325 b->localaddress = NULL; 326 327 if (!options) { 328 *b_out = b; 329 return NT_STATUS_OK; 330 } 331 332 comma_count = count_chars(options, ','); 333 334 b->options = talloc_array(b, const char *, comma_count+2); 335 if (!b->options) { 667 status = dcerpc_binding_set_string_option(b, "abstract_syntax", s); 668 TALLOC_FREE(s); 669 if (!NT_STATUS_IS_OK(status)) { 670 return status; 671 } 672 673 return NT_STATUS_OK; 674 } 675 676 _PUBLIC_ const char *dcerpc_binding_get_string_option(const struct dcerpc_binding *b, 677 const char *name) 678 { 679 struct { 680 const char *name; 681 const char *value; 682 #define _SPECIAL(x) { .name = #x, .value = b->x, } 683 } specials[] = { 684 { .name = "object", .value = b->object_string, }, 685 _SPECIAL(host), 686 _SPECIAL(endpoint), 687 _SPECIAL(target_hostname), 688 _SPECIAL(target_principal), 689 #undef _SPECIAL 690 }; 691 const struct ncacn_option *no = NULL; 692 size_t name_len = strlen(name); 693 size_t i; 694 int ret; 695 696 ret = strcmp(name, "transport"); 697 if (ret == 0) { 698 return derpc_transport_string_by_transport(b->transport); 699 } 700 701 ret = strcmp(name, "assoc_group_id"); 702 if (ret == 0) { 703 char *tmp = discard_const_p(char, b->assoc_group_string); 704 705 if (b->assoc_group_id == 0) { 706 return NULL; 707 } 708 709 snprintf(tmp, sizeof(b->assoc_group_string), 710 "0x%08x", b->assoc_group_id); 711 return (const char *)b->assoc_group_string; 712 } 713 714 for (i=0; i < ARRAY_SIZE(specials); i++) { 715 ret = strcmp(specials[i].name, name); 716 if (ret != 0) { 717 continue; 718 } 719 720 return specials[i].value; 721 } 722 723 no = ncacn_option_by_name(name); 724 if (no != NULL) { 725 if (b->flags & no->flag) { 726 return no->name; 727 } 728 729 return NULL; 730 } 731 732 if (b->options == NULL) { 733 return NULL; 734 } 735 736 for (i=0; b->options[i]; i++) { 737 const char *o = b->options[i]; 738 const char *vs = NULL; 739 740 ret = strncmp(name, o, name_len); 741 if (ret != 0) { 742 continue; 743 } 744 745 if (o[name_len] != '=') { 746 continue; 747 } 748 749 vs = &o[name_len + 1]; 750 751 return vs; 752 } 753 754 return NULL; 755 } 756 757 _PUBLIC_ char *dcerpc_binding_copy_string_option(TALLOC_CTX *mem_ctx, 758 const struct dcerpc_binding *b, 759 const char *name) 760 { 761 const char *c = dcerpc_binding_get_string_option(b, name); 762 char *v; 763 764 if (c == NULL) { 765 errno = ENOENT; 766 return NULL; 767 } 768 769 v = talloc_strdup(mem_ctx, c); 770 if (v == NULL) { 771 errno = ENOMEM; 772 return NULL; 773 } 774 775 return v; 776 } 777 778 _PUBLIC_ NTSTATUS dcerpc_binding_set_string_option(struct dcerpc_binding *b, 779 const char *name, 780 const char *value) 781 { 782 struct { 783 const char *name; 784 const char **ptr; 785 #define _SPECIAL(x) { .name = #x, .ptr = &b->x, } 786 } specials[] = { 787 _SPECIAL(host), 788 _SPECIAL(endpoint), 789 _SPECIAL(target_hostname), 790 _SPECIAL(target_principal), 791 #undef _SPECIAL 792 }; 793 const struct ncacn_option *no = NULL; 794 size_t name_len = strlen(name); 795 const char *opt = NULL; 796 char *tmp; 797 size_t i; 798 int ret; 799 800 /* 801 * Note: value == NULL, means delete it. 802 * value != NULL means add or reset. 803 */ 804 805 ret = strcmp(name, "transport"); 806 if (ret == 0) { 807 enum dcerpc_transport_t t = dcerpc_transport_by_name(value); 808 809 if (t == NCA_UNKNOWN && value != NULL) { 810 return NT_STATUS_INVALID_PARAMETER_MIX; 811 } 812 813 return dcerpc_binding_set_transport(b, t); 814 } 815 816 ret = strcmp(name, "object"); 817 if (ret == 0) { 818 NTSTATUS status; 819 struct GUID uuid = GUID_zero(); 820 821 if (value != NULL) { 822 DATA_BLOB blob; 823 blob = data_blob_string_const(value); 824 if (blob.length != 36) { 825 return NT_STATUS_INVALID_PARAMETER_MIX; 826 } 827 828 status = GUID_from_data_blob(&blob, &uuid); 829 if (!NT_STATUS_IS_OK(status)) { 830 return status; 831 } 832 } 833 834 return dcerpc_binding_set_object(b, uuid); 835 } 836 837 ret = strcmp(name, "assoc_group_id"); 838 if (ret == 0) { 839 uint32_t assoc_group_id = 0; 840 841 if (value != NULL) { 842 char c; 843 844 ret = sscanf(value, "0x%08x%c", &assoc_group_id, &c); 845 if (ret != 1) { 846 return NT_STATUS_INVALID_PARAMETER_MIX; 847 } 848 } 849 850 return dcerpc_binding_set_assoc_group_id(b, assoc_group_id); 851 } 852 853 for (i=0; i < ARRAY_SIZE(specials); i++) { 854 ret = strcmp(specials[i].name, name); 855 if (ret != 0) { 856 continue; 857 } 858 859 tmp = discard_const_p(char, *specials[i].ptr); 860 861 if (value == NULL) { 862 talloc_free(tmp); 863 *specials[i].ptr = NULL; 864 return NT_STATUS_OK; 865 } 866 867 if (value[0] == '\0') { 868 return NT_STATUS_INVALID_PARAMETER_MIX; 869 } 870 871 *specials[i].ptr = talloc_strdup(b, value); 872 if (*specials[i].ptr == NULL) { 873 *specials[i].ptr = tmp; 874 return NT_STATUS_NO_MEMORY; 875 } 876 talloc_free(tmp); 877 878 return NT_STATUS_OK; 879 } 880 881 no = ncacn_option_by_name(name); 882 if (no != NULL) { 883 if (value == NULL) { 884 b->flags &= ~no->flag; 885 return NT_STATUS_OK; 886 } 887 888 ret = strcasecmp(no->name, value); 889 if (ret != 0) { 890 return NT_STATUS_INVALID_PARAMETER_MIX; 891 } 892 893 b->flags |= no->flag; 894 return NT_STATUS_OK; 895 } 896 897 for (i=0; b->options && b->options[i]; i++) { 898 const char *o = b->options[i]; 899 900 ret = strncmp(name, o, name_len); 901 if (ret != 0) { 902 continue; 903 } 904 905 if (o[name_len] != '=') { 906 continue; 907 } 908 909 opt = o; 910 break; 911 } 912 913 if (opt == NULL) { 914 const char **n; 915 916 if (value == NULL) { 917 return NT_STATUS_OK; 918 } 919 920 n = talloc_realloc(b, b->options, const char *, i + 2); 921 if (n == NULL) { 922 return NT_STATUS_NO_MEMORY; 923 } 924 n[i] = NULL; 925 n[i + 1] = NULL; 926 b->options = n; 927 } 928 929 tmp = discard_const_p(char, opt); 930 931 if (value == NULL) { 932 for (;b->options[i];i++) { 933 b->options[i] = b->options[i+1]; 934 } 935 talloc_free(tmp); 936 return NT_STATUS_OK; 937 } 938 939 b->options[i] = talloc_asprintf(b->options, "%s=%s", 940 name, value); 941 if (b->options[i] == NULL) { 942 b->options[i] = tmp; 336 943 return NT_STATUS_NO_MEMORY; 337 944 } 338 945 339 for (i=0; (p = strchr(options, ',')); i++) { 340 b->options[i] = talloc_strndup(b, options, PTR_DIFF(p, options)); 341 if (!b->options[i]) { 342 return NT_STATUS_NO_MEMORY; 343 } 344 options = p+1; 345 } 346 b->options[i] = options; 347 b->options[i+1] = NULL; 348 349 /* some options are pre-parsed for convenience */ 350 for (i=0;b->options[i];i++) { 351 for (j=0;j<ARRAY_SIZE(ncacn_options);j++) { 352 size_t opt_len = strlen(ncacn_options[j].name); 353 if (strncasecmp(ncacn_options[j].name, b->options[i], opt_len) == 0) { 354 int k; 355 char c = b->options[i][opt_len]; 356 357 if (ncacn_options[j].flag == DCERPC_LOCALADDRESS && c == '=') { 358 b->localaddress = talloc_strdup(b, &b->options[i][opt_len+1]); 359 } else if (c != 0) { 360 continue; 361 } 362 363 b->flags |= ncacn_options[j].flag; 364 for (k=i;b->options[k];k++) { 365 b->options[k] = b->options[k+1]; 366 } 367 i--; 368 break; 369 } 370 } 371 } 372 373 if (b->options[0]) { 374 /* Endpoint is first option */ 375 b->endpoint = b->options[0]; 376 if (strlen(b->endpoint) == 0) b->endpoint = NULL; 377 378 for (i=0;b->options[i];i++) { 379 b->options[i] = b->options[i+1]; 380 } 381 } 382 383 if (b->options[0] == NULL) 384 b->options = NULL; 385 386 *b_out = b; 946 return NT_STATUS_OK; 947 } 948 949 _PUBLIC_ uint32_t dcerpc_binding_get_flags(const struct dcerpc_binding *b) 950 { 951 return b->flags; 952 } 953 954 _PUBLIC_ NTSTATUS dcerpc_binding_set_flags(struct dcerpc_binding *b, 955 uint32_t additional, 956 uint32_t clear) 957 { 958 /* 959 * TODO: in future we may want to reject invalid combinations 960 */ 961 b->flags &= ~clear; 962 b->flags |= additional; 963 387 964 return NT_STATUS_OK; 388 965 } … … 425 1002 { 426 1003 DATA_BLOB blob; 427 struct ndr_push *ndr = ndr_push_init_ctx(mem_ctx); 1004 enum ndr_err_code ndr_err; 1005 struct ndr_push *ndr; 1006 1007 ndr = ndr_push_init_ctx(mem_ctx); 1008 if (ndr == NULL) { 1009 return data_blob_null; 1010 } 428 1011 429 1012 ndr->flags |= LIBNDR_FLAG_NOALIGN; 430 1013 431 ndr_push_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid); 432 ndr_push_uint16(ndr, NDR_SCALARS, syntax->if_version); 1014 ndr_err = ndr_push_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid); 1015 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { 1016 return data_blob_null; 1017 } 1018 ndr_err = ndr_push_uint16(ndr, NDR_SCALARS, syntax->if_version); 1019 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { 1020 return data_blob_null; 1021 } 433 1022 434 1023 blob = ndr_push_blob(ndr); … … 464 1053 } 465 1054 466 c onst char *dcerpc_floor_get_rhs_data(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor)1055 char *dcerpc_floor_get_rhs_data(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor) 467 1056 { 468 1057 switch (epm_floor->lhs.protocol) { … … 531 1120 const char *data) 532 1121 { 1122 if (data == NULL) { 1123 data = ""; 1124 } 1125 533 1126 switch (epm_floor->lhs.protocol) { 534 1127 case EPM_PROTOCOL_TCP: … … 545 1138 546 1139 case EPM_PROTOCOL_IP: 1140 if (!is_ipaddress_v4(data)) { 1141 data = "0.0.0.0"; 1142 } 547 1143 epm_floor->rhs.ip.ipaddr = talloc_strdup(mem_ctx, data); 548 1144 NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.ip.ipaddr); … … 631 1227 } 632 1228 633 for (j = 0; j < transports[i].num_protocols ; j++) {1229 for (j = 0; j < transports[i].num_protocols && j < MAX_PROTSEQ; j++) { 634 1230 if (transports[i].protseq[j] != tower->floors[j+2].lhs.protocol) { 635 1231 break; … … 658 1254 } 659 1255 1256 _PUBLIC_ enum dcerpc_transport_t dcerpc_transport_by_name(const char *name) 1257 { 1258 size_t i; 1259 1260 if (name == NULL) { 1261 return NCA_UNKNOWN; 1262 } 1263 1264 for (i=0; i<ARRAY_SIZE(transports);i++) { 1265 if (strcasecmp(name, transports[i].name) == 0) { 1266 return transports[i].transport; 1267 } 1268 } 1269 1270 return NCA_UNKNOWN; 1271 } 1272 660 1273 _PUBLIC_ NTSTATUS dcerpc_binding_from_tower(TALLOC_CTX *mem_ctx, 661 1274 struct epm_tower *tower, … … 663 1276 { 664 1277 NTSTATUS status; 665 struct dcerpc_binding *binding; 1278 struct dcerpc_binding *b; 1279 enum dcerpc_transport_t transport; 1280 struct ndr_syntax_id abstract_syntax; 1281 char *endpoint = NULL; 1282 char *host = NULL; 666 1283 667 1284 /* … … 674 1291 } 675 1292 676 binding = talloc_zero(mem_ctx, struct dcerpc_binding); 677 NT_STATUS_HAVE_NO_MEMORY(binding); 678 679 ZERO_STRUCT(binding->object); 680 binding->options = NULL; 681 binding->host = NULL; 682 binding->target_hostname = NULL; 683 binding->flags = 0; 684 binding->assoc_group_id = 0; 685 686 binding->transport = dcerpc_transport_by_tower(tower); 687 688 if (binding->transport == (unsigned int)-1) { 1293 status = dcerpc_parse_binding(mem_ctx, "", &b); 1294 if (!NT_STATUS_IS_OK(status)) { 1295 return status; 1296 } 1297 1298 transport = dcerpc_transport_by_tower(tower); 1299 if (transport == NCA_UNKNOWN) { 1300 talloc_free(b); 689 1301 return NT_STATUS_NOT_SUPPORTED; 690 1302 } 691 1303 692 /* Set object uuid */ 693 status = dcerpc_floor_get_lhs_data(&tower->floors[0], &binding->object); 694 1304 status = dcerpc_binding_set_transport(b, transport); 695 1305 if (!NT_STATUS_IS_OK(status)) { 696 DEBUG(1, ("Error pulling object uuid and version: %s", nt_errstr(status)));1306 talloc_free(b); 697 1307 return status; 698 1308 } 699 1309 1310 /* Set abstract syntax */ 1311 status = dcerpc_floor_get_lhs_data(&tower->floors[0], &abstract_syntax); 1312 if (!NT_STATUS_IS_OK(status)) { 1313 talloc_free(b); 1314 return status; 1315 } 1316 1317 status = dcerpc_binding_set_abstract_syntax(b, &abstract_syntax); 1318 if (!NT_STATUS_IS_OK(status)) { 1319 talloc_free(b); 1320 return status; 1321 } 1322 700 1323 /* Ignore floor 1, it contains the NDR version info */ 701 1324 702 binding->options = NULL;703 704 1325 /* Set endpoint */ 1326 errno = 0; 705 1327 if (tower->num_floors >= 4) { 706 binding->endpoint = dcerpc_floor_get_rhs_data(binding, &tower->floors[3]); 707 } else { 708 binding->endpoint = NULL; 709 } 1328 endpoint = dcerpc_floor_get_rhs_data(b, &tower->floors[3]); 1329 } 1330 if (errno != 0) { 1331 int saved_errno = errno; 1332 talloc_free(b); 1333 return map_nt_error_from_unix_common(saved_errno); 1334 } 1335 1336 status = dcerpc_binding_set_string_option(b, "endpoint", endpoint); 1337 if (!NT_STATUS_IS_OK(status)) { 1338 talloc_free(b); 1339 return status; 1340 } 1341 TALLOC_FREE(endpoint); 710 1342 711 1343 /* Set network address */ 1344 errno = 0; 712 1345 if (tower->num_floors >= 5) { 713 binding->host = dcerpc_floor_get_rhs_data(binding, &tower->floors[4]); 714 NT_STATUS_HAVE_NO_MEMORY(binding->host); 715 binding->target_hostname = binding->host; 716 } 717 *b_out = binding; 1346 host = dcerpc_floor_get_rhs_data(b, &tower->floors[4]); 1347 } 1348 if (errno != 0) { 1349 int saved_errno = errno; 1350 talloc_free(b); 1351 return map_nt_error_from_unix_common(saved_errno); 1352 } 1353 1354 status = dcerpc_binding_set_string_option(b, "host", host); 1355 if (!NT_STATUS_IS_OK(status)) { 1356 talloc_free(b); 1357 return status; 1358 } 1359 status = dcerpc_binding_set_string_option(b, "target_hostname", host); 1360 if (!NT_STATUS_IS_OK(status)) { 1361 talloc_free(b); 1362 return status; 1363 } 1364 TALLOC_FREE(host); 1365 1366 *b_out = b; 718 1367 return NT_STATUS_OK; 719 1368 } … … 735 1384 n->assoc_group_id = b->assoc_group_id; 736 1385 1386 if (b->object_string != NULL) { 1387 n->object_string = talloc_strdup(n, b->object_string); 1388 if (n->object_string == NULL) { 1389 talloc_free(n); 1390 return NULL; 1391 } 1392 } 737 1393 if (b->host != NULL) { 738 1394 n->host = talloc_strdup(n, b->host); … … 754 1410 n->target_principal = talloc_strdup(n, b->target_principal); 755 1411 if (n->target_principal == NULL) { 756 talloc_free(n);757 return NULL;758 }759 }760 761 if (b->localaddress != NULL) {762 n->localaddress = talloc_strdup(n, b->localaddress);763 if (n->localaddress == NULL) {764 1412 talloc_free(n); 765 1413 return NULL; … … 805 1453 const enum epm_protocol *protseq = NULL; 806 1454 int num_protocols = -1, i; 1455 struct ndr_syntax_id abstract_syntax; 807 1456 NTSTATUS status; 808 1457 … … 827 1476 tower->floors[0].lhs.protocol = EPM_PROTOCOL_UUID; 828 1477 829 tower->floors[0].lhs.lhs_data = dcerpc_floor_pack_lhs_data(tower->floors, &binding->object); 1478 abstract_syntax = dcerpc_binding_get_abstract_syntax(binding); 1479 tower->floors[0].lhs.lhs_data = dcerpc_floor_pack_lhs_data(tower->floors, 1480 &abstract_syntax); 830 1481 831 1482 if (!dcerpc_floor_pack_rhs_if_version_data( 832 tower->floors, & binding->object,1483 tower->floors, &abstract_syntax, 833 1484 &tower->floors[0].rhs.uuid.unknown)) { 834 1485 return NT_STATUS_NO_MEMORY; … … 839 1490 840 1491 tower->floors[1].lhs.lhs_data = dcerpc_floor_pack_lhs_data(tower->floors, 841 &ndr_transfer_syntax );1492 &ndr_transfer_syntax_ndr); 842 1493 843 1494 tower->floors[1].rhs.uuid.unknown = data_blob_talloc_zero(tower->floors, 2); … … 846 1497 for (i = 0; i < num_protocols; i++) { 847 1498 tower->floors[2 + i].lhs.protocol = protseq[i]; 848 tower->floors[2 + i].lhs.lhs_data = data_blob_ talloc(tower->floors, NULL, 0);1499 tower->floors[2 + i].lhs.lhs_data = data_blob_null; 849 1500 ZERO_STRUCT(tower->floors[2 + i].rhs); 850 dcerpc_floor_set_rhs_data(tower->floors, &tower->floors[2 + i], ""); 1501 status = dcerpc_floor_set_rhs_data(tower->floors, 1502 &tower->floors[2 + i], 1503 NULL); 1504 if (!NT_STATUS_IS_OK(status)) { 1505 return status; 1506 } 851 1507 } 852 1508 853 1509 /* The 4th floor contains the endpoint */ 854 1510 if (num_protocols >= 2 && binding->endpoint) { 855 status = dcerpc_floor_set_rhs_data(tower->floors, &tower->floors[3], binding->endpoint); 856 if (NT_STATUS_IS_ERR(status)) { 1511 status = dcerpc_floor_set_rhs_data(tower->floors, 1512 &tower->floors[3], 1513 binding->endpoint); 1514 if (!NT_STATUS_IS_OK(status)) { 857 1515 return status; 858 1516 } … … 861 1519 /* The 5th contains the network address */ 862 1520 if (num_protocols >= 3 && binding->host) { 863 if (is_ipaddress(binding->host) || 864 (binding->host[0] == '\\' && binding->host[1] == '\\')) { 865 status = dcerpc_floor_set_rhs_data(tower->floors, &tower->floors[4], 866 binding->host); 867 } else { 868 /* note that we don't attempt to resolve the 869 name here - when we get a hostname here we 870 are in the client code, and want to put in 871 a wildcard all-zeros IP for the server to 872 fill in */ 873 status = dcerpc_floor_set_rhs_data(tower->floors, &tower->floors[4], 874 "0.0.0.0"); 875 } 876 if (NT_STATUS_IS_ERR(status)) { 1521 status = dcerpc_floor_set_rhs_data(tower->floors, 1522 &tower->floors[4], 1523 binding->host); 1524 if (!NT_STATUS_IS_OK(status)) { 877 1525 return status; 878 1526 } -
vendor/current/librpc/rpc/binding_handle.c
r740 r988 99 99 } 100 100 101 void dcerpc_binding_handle_auth_info(struct dcerpc_binding_handle *h, 102 enum dcerpc_AuthType *auth_type, 103 enum dcerpc_AuthLevel *auth_level) 104 { 105 enum dcerpc_AuthType _auth_type; 106 enum dcerpc_AuthLevel _auth_level; 107 108 if (auth_type == NULL) { 109 auth_type = &_auth_type; 110 } 111 112 if (auth_level == NULL) { 113 auth_level = &_auth_level; 114 } 115 116 *auth_type = DCERPC_AUTH_TYPE_NONE; 117 *auth_level = DCERPC_AUTH_LEVEL_NONE; 118 119 if (h->ops->auth_info == NULL) { 120 return; 121 } 122 123 h->ops->auth_info(h, auth_type, auth_level); 124 } 125 101 126 struct dcerpc_binding_handle_raw_call_state { 102 127 const struct dcerpc_binding_handle_ops *ops; … … 156 181 &state->out_flags); 157 182 TALLOC_FREE(subreq); 158 if (!NT_STATUS_IS_OK(error)) { 159 tevent_req_nterror(req, error); 183 if (tevent_req_nterror(req, error)) { 160 184 return; 161 185 } … … 201 225 struct tevent_context *ev; 202 226 struct tevent_req *subreq; 203 NTSTATUS status ;227 NTSTATUS status = NT_STATUS_NO_MEMORY; 204 228 205 229 /* … … 210 234 ev = h->sync_ev; 211 235 } else { 212 ev = tevent_context_init(frame);236 ev = samba_tevent_context_init(frame); 213 237 } 214 238 if (ev == NULL) { 215 talloc_free(frame); 216 return NT_STATUS_NO_MEMORY; 239 goto fail; 217 240 } 218 241 … … 223 246 in_length); 224 247 if (subreq == NULL) { 225 talloc_free(frame); 226 return NT_STATUS_NO_MEMORY; 227 } 228 229 if (!tevent_req_poll(subreq, ev)) { 230 status = map_nt_error_from_unix(errno); 231 talloc_free(frame); 232 return status; 248 goto fail; 249 } 250 251 if (!tevent_req_poll_ntstatus(subreq, ev, &status)) { 252 goto fail; 233 253 } 234 254 … … 238 258 out_length, 239 259 out_flags); 240 if (!NT_STATUS_IS_OK(status)) { 241 talloc_free(frame); 242 return status; 243 } 244 260 fail: 245 261 TALLOC_FREE(frame); 246 return NT_STATUS_OK;262 return status; 247 263 } 248 264 … … 289 305 error = state->ops->disconnect_recv(subreq); 290 306 TALLOC_FREE(subreq); 291 if (!NT_STATUS_IS_OK(error)) { 292 tevent_req_nterror(req, error); 307 if (tevent_req_nterror(req, error)) { 293 308 return; 294 309 } … … 442 457 &out_flags); 443 458 TALLOC_FREE(subreq); 444 if (!NT_STATUS_IS_OK(error)) { 445 tevent_req_nterror(req, error); 459 if (tevent_req_nterror(req, error)) { 446 460 return; 447 461 } … … 495 509 NTSTATUS dcerpc_binding_handle_call_recv(struct tevent_req *req) 496 510 { 497 NTSTATUS error; 498 499 if (tevent_req_is_nterror(req, &error)) { 500 tevent_req_received(req); 501 return error; 502 } 503 504 tevent_req_received(req); 505 return NT_STATUS_OK; 511 return tevent_req_simple_recv_ntstatus(req); 506 512 } 507 513 … … 516 522 struct tevent_context *ev; 517 523 struct tevent_req *subreq; 518 NTSTATUS status ;524 NTSTATUS status = NT_STATUS_NO_MEMORY; 519 525 520 526 /* … … 525 531 ev = h->sync_ev; 526 532 } else { 527 ev = tevent_context_init(frame);533 ev = samba_tevent_context_init(frame); 528 534 } 529 535 if (ev == NULL) { 530 talloc_free(frame); 531 return NT_STATUS_NO_MEMORY; 536 goto fail; 532 537 } 533 538 … … 536 541 opnum, r_mem, r_ptr); 537 542 if (subreq == NULL) { 538 talloc_free(frame); 539 return NT_STATUS_NO_MEMORY; 540 } 541 542 if (!tevent_req_poll(subreq, ev)) { 543 status = map_nt_error_from_unix(errno); 544 talloc_free(frame); 545 return status; 543 goto fail; 544 } 545 546 if (!tevent_req_poll_ntstatus(subreq, ev, &status)) { 547 goto fail; 546 548 } 547 549 548 550 status = dcerpc_binding_handle_call_recv(subreq); 549 if (!NT_STATUS_IS_OK(status)) { 550 talloc_free(frame); 551 return status; 552 } 553 551 fail: 554 552 TALLOC_FREE(frame); 555 return NT_STATUS_OK;556 } 553 return status; 554 } -
vendor/current/librpc/rpc/dcerpc_error.c
r740 r988 27 27 const char *errstr; 28 28 uint32_t faultcode; 29 NTSTATUS nt_status; 29 30 }; 30 31 31 32 static const struct dcerpc_fault_table dcerpc_faults[] = 32 33 { 33 #define _FAULT_STR(x) { #x , x } 34 _FAULT_STR(DCERPC_NCA_S_COMM_FAILURE), 35 _FAULT_STR(DCERPC_NCA_S_OP_RNG_ERROR), 36 _FAULT_STR(DCERPC_NCA_S_UNKNOWN_IF), 37 _FAULT_STR(DCERPC_NCA_S_WRONG_BOOT_TIME), 38 _FAULT_STR(DCERPC_NCA_S_YOU_CRASHED), 39 _FAULT_STR(DCERPC_NCA_S_PROTO_ERROR), 40 _FAULT_STR(DCERPC_NCA_S_OUT_ARGS_TOO_BIG), 41 _FAULT_STR(DCERPC_NCA_S_SERVER_TOO_BUSY), 42 _FAULT_STR(DCERPC_NCA_S_FAULT_STRING_TOO_LARGE), 43 _FAULT_STR(DCERPC_NCA_S_UNSUPPORTED_TYPE), 44 _FAULT_STR(DCERPC_NCA_S_FAULT_INT_DIV_BY_ZERO), 45 _FAULT_STR(DCERPC_NCA_S_FAULT_ADDR_ERROR), 46 _FAULT_STR(DCERPC_NCA_S_FAULT_FP_DIV_BY_ZERO), 47 _FAULT_STR(DCERPC_NCA_S_FAULT_FP_UNDERFLOW), 48 _FAULT_STR(DCERPC_NCA_S_FAULT_FP_OVERRFLOW), 49 _FAULT_STR(DCERPC_NCA_S_FAULT_INVALID_TAG), 50 _FAULT_STR(DCERPC_NCA_S_FAULT_INVALID_BOUND), 51 _FAULT_STR(DCERPC_NCA_S_FAULT_RPC_VERSION_MISMATCH), 52 _FAULT_STR(DCERPC_NCA_S_FAULT_UNSPEC_REJECT), 53 _FAULT_STR(DCERPC_NCA_S_FAULT_BAD_ACTID), 54 _FAULT_STR(DCERPC_NCA_S_FAULT_WHO_ARE_YOU_FAILED), 55 _FAULT_STR(DCERPC_NCA_S_FAULT_MANAGER_NOT_ENTERED), 56 _FAULT_STR(DCERPC_NCA_S_FAULT_CANCEL), 57 _FAULT_STR(DCERPC_NCA_S_FAULT_ILL_INST), 58 _FAULT_STR(DCERPC_NCA_S_FAULT_FP_ERROR), 59 _FAULT_STR(DCERPC_NCA_S_FAULT_INT_OVERFLOW), 60 _FAULT_STR(DCERPC_NCA_S_UNUSED_1C000011), 61 _FAULT_STR(DCERPC_NCA_S_FAULT_UNSPEC), 62 _FAULT_STR(DCERPC_NCA_S_FAULT_REMOTE_COMM_FAILURE), 63 _FAULT_STR(DCERPC_NCA_S_FAULT_PIPE_EMPTY), 64 _FAULT_STR(DCERPC_NCA_S_FAULT_PIPE_CLOSED), 65 _FAULT_STR(DCERPC_NCA_S_FAULT_PIPE_ORDER), 66 _FAULT_STR(DCERPC_NCA_S_FAULT_PIPE_DISCIPLINE), 67 _FAULT_STR(DCERPC_NCA_S_FAULT_PIPE_COMM_ERROR), 68 _FAULT_STR(DCERPC_NCA_S_FAULT_PIPE_MEMORY), 69 _FAULT_STR(DCERPC_NCA_S_FAULT_CONTEXT_MISMATCH), 70 _FAULT_STR(DCERPC_NCA_S_FAULT_REMOTE_NO_MEMORY), 71 _FAULT_STR(DCERPC_NCA_S_INVALID_PRES_CONTEXT_ID), 72 _FAULT_STR(DCERPC_NCA_S_UNSUPPORTED_AUTHN_LEVEL), 73 _FAULT_STR(DCERPC_NCA_S_UNUSED_1C00001E), 74 _FAULT_STR(DCERPC_NCA_S_INVALID_CHECKSUM), 75 _FAULT_STR(DCERPC_NCA_S_INVALID_CRC), 76 _FAULT_STR(DCERPC_NCA_S_FAULT_USER_DEFINED), 77 _FAULT_STR(DCERPC_NCA_S_FAULT_TX_OPEN_FAILED), 78 _FAULT_STR(DCERPC_NCA_S_FAULT_CODESET_CONV_ERROR), 79 _FAULT_STR(DCERPC_NCA_S_FAULT_OBJECT_NOT_FOUND), 80 _FAULT_STR(DCERPC_NCA_S_FAULT_NO_CLIENT_STUB), 34 #define _FAULT_STR(x, s) { .errstr = #x , .faultcode = x, .nt_status = s } 35 #define _FAULT_STR_NO_NT_MAPPING(x) _FAULT_STR(x, NT_STATUS_RPC_NOT_RPC_ERROR) 36 _FAULT_STR(DCERPC_NCA_S_COMM_FAILURE, NT_STATUS_RPC_COMM_FAILURE), 37 _FAULT_STR(DCERPC_NCA_S_OP_RNG_ERROR, NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE), 38 _FAULT_STR(DCERPC_NCA_S_UNKNOWN_IF, NT_STATUS_RPC_UNKNOWN_IF), 39 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_WRONG_BOOT_TIME), 40 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_YOU_CRASHED), 41 _FAULT_STR(DCERPC_NCA_S_PROTO_ERROR, NT_STATUS_RPC_PROTOCOL_ERROR), 42 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_OUT_ARGS_TOO_BIG), 43 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_SERVER_TOO_BUSY), 44 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_STRING_TOO_LARGE), 45 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_UNSUPPORTED_TYPE), 46 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_ADDR_ERROR), 47 _FAULT_STR(DCERPC_NCA_S_FAULT_FP_DIV_BY_ZERO, NT_STATUS_RPC_FP_DIV_ZERO), 48 _FAULT_STR(DCERPC_NCA_S_FAULT_FP_UNDERFLOW, NT_STATUS_RPC_FP_UNDERFLOW), 49 _FAULT_STR(DCERPC_NCA_S_FAULT_FP_OVERRFLOW, NT_STATUS_RPC_FP_OVERFLOW), 50 _FAULT_STR(DCERPC_NCA_S_FAULT_INT_DIV_BY_ZERO, NT_STATUS_RPC_FP_DIV_ZERO), 51 _FAULT_STR(DCERPC_NCA_S_FAULT_INT_OVERFLOW, NT_STATUS_RPC_FP_OVERFLOW), 52 /* 53 * What's the difference between NT_STATUS_RPC_INVALID_TAG 54 * and NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE ??? 55 * 56 * Our callers expect NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE. 57 */ 58 _FAULT_STR(DCERPC_NCA_S_FAULT_INVALID_TAG, NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE), 59 _FAULT_STR(DCERPC_NCA_S_FAULT_INVALID_TAG, NT_STATUS_RPC_INVALID_TAG), 60 _FAULT_STR(DCERPC_NCA_S_FAULT_INVALID_BOUND, NT_STATUS_RPC_INVALID_BOUND), 61 _FAULT_STR(DCERPC_NCA_S_FAULT_RPC_VERSION_MISMATCH, NT_STATUS_RPC_PROTOCOL_ERROR), 62 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_UNSPEC_REJECT), 63 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_BAD_ACTID), 64 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_WHO_ARE_YOU_FAILED), 65 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_MANAGER_NOT_ENTERED), 66 _FAULT_STR(DCERPC_NCA_S_FAULT_CANCEL, NT_STATUS_RPC_CALL_CANCELLED), 67 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_ILL_INST), 68 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_FP_ERROR), 69 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_UNUSED_1C000011), 70 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_UNSPEC), 71 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_REMOTE_COMM_FAILURE), 72 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_PIPE_EMPTY), 73 _FAULT_STR(DCERPC_NCA_S_FAULT_PIPE_CLOSED, NT_STATUS_RPC_PIPE_CLOSED), 74 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_PIPE_ORDER), 75 _FAULT_STR(DCERPC_NCA_S_FAULT_PIPE_DISCIPLINE, NT_STATUS_RPC_PIPE_DISCIPLINE_ERROR), 76 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_PIPE_COMM_ERROR), 77 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_PIPE_MEMORY), 78 _FAULT_STR(DCERPC_NCA_S_FAULT_CONTEXT_MISMATCH, NT_STATUS_RPC_SS_CONTEXT_MISMATCH), 79 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_REMOTE_NO_MEMORY), 80 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_INVALID_PRES_CONTEXT_ID), 81 _FAULT_STR(DCERPC_NCA_S_UNSUPPORTED_AUTHN_LEVEL, NT_STATUS_RPC_UNSUPPORTED_AUTHN_LEVEL), 82 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_UNUSED_1C00001E), 83 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_INVALID_CHECKSUM), 84 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_INVALID_CRC), 85 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_USER_DEFINED), 86 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_TX_OPEN_FAILED), 87 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_CODESET_CONV_ERROR), 88 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_OBJECT_NOT_FOUND), 89 _FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_NO_CLIENT_STUB), 90 _FAULT_STR(DCERPC_FAULT_OTHER, NT_STATUS_RPC_CALL_FAILED), 91 _FAULT_STR(DCERPC_FAULT_ACCESS_DENIED, NT_STATUS_ACCESS_DENIED), 92 _FAULT_STR(DCERPC_FAULT_NO_CALL_ACTIVE, NT_STATUS_RPC_NO_CALL_ACTIVE), 93 _FAULT_STR(DCERPC_FAULT_CANT_PERFORM, NT_STATUS_EPT_CANT_PERFORM_OP), 94 _FAULT_STR(DCERPC_FAULT_OUT_OF_RESOURCES, NT_STATUS_RPC_OUT_OF_RESOURCES), 95 _FAULT_STR(DCERPC_FAULT_BAD_STUB_DATA, NT_STATUS_RPC_BAD_STUB_DATA), 96 _FAULT_STR(DCERPC_FAULT_SEC_PKG_ERROR, NT_STATUS_RPC_SEC_PKG_ERROR), 81 97 { NULL, 0 } 82 98 #undef _FAULT_STR … … 100 116 _PUBLIC_ NTSTATUS dcerpc_fault_to_nt_status(uint32_t fault_code) 101 117 { 102 /* TODO: add more mappings */ 103 switch (fault_code) { 104 case DCERPC_FAULT_OP_RNG_ERROR: 105 return NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE; 106 case DCERPC_FAULT_UNK_IF: 107 return NT_STATUS_RPC_UNKNOWN_IF; 108 case DCERPC_FAULT_NDR: 109 return NT_STATUS_RPC_BAD_STUB_DATA; 110 case DCERPC_FAULT_INVALID_TAG: 111 return NT_STATUS_RPC_ENUM_VALUE_OUT_OF_RANGE; 112 case DCERPC_FAULT_CONTEXT_MISMATCH: 113 return NT_STATUS_RPC_SS_CONTEXT_MISMATCH; 114 case DCERPC_FAULT_OTHER: 115 return NT_STATUS_RPC_CALL_FAILED; 116 case DCERPC_FAULT_ACCESS_DENIED: 117 return NT_STATUS_ACCESS_DENIED; 118 case DCERPC_FAULT_SEC_PKG_ERROR: 119 return NT_STATUS_RPC_SEC_PKG_ERROR; 118 int idx = 0; 119 WERROR werr = W_ERROR(fault_code); 120 121 if (fault_code == 0) { 122 return NT_STATUS_RPC_PROTOCOL_ERROR; 120 123 } 121 124 122 return NT_STATUS_RPC_PROTOCOL_ERROR; 125 while (dcerpc_faults[idx].errstr != NULL) { 126 if (dcerpc_faults[idx].faultcode == fault_code) { 127 return dcerpc_faults[idx].nt_status; 128 } 129 idx++; 130 } 131 132 return werror_to_ntstatus(werr); 123 133 } 124 134 135 _PUBLIC_ uint32_t dcerpc_fault_from_nt_status(NTSTATUS nt_status) 136 { 137 int idx = 0; 138 WERROR werr; 139 140 if (NT_STATUS_IS_OK(nt_status)) { 141 return DCERPC_NCA_S_PROTO_ERROR; 142 } 143 144 while (dcerpc_faults[idx].errstr != NULL) { 145 if (NT_STATUS_EQUAL(dcerpc_faults[idx].nt_status, nt_status)) { 146 return dcerpc_faults[idx].faultcode; 147 } 148 idx++; 149 } 150 151 werr = ntstatus_to_werror(nt_status); 152 153 return W_ERROR_V(werr); 154 } -
vendor/current/librpc/rpc/dcerpc_util.c
r919 r988 47 47 } else { 48 48 return RSVAL(blob->data, DCERPC_FRAG_LEN_OFFSET); 49 }50 }51 52 uint32_t dcerpc_get_call_id(const DATA_BLOB *blob)53 {54 if (CVAL(blob->data,DCERPC_DREP_OFFSET) & DCERPC_DREP_LE) {55 return IVAL(blob->data, DCERPC_CALL_ID_OFFSET);56 } else {57 return RIVAL(blob->data, DCERPC_CALL_ID_OFFSET);58 49 } 59 50 } … … 329 320 330 321 if (state->buffer.length == 0) { 331 /* first get enough to read the fragment length */ 322 /* 323 * first get enough to read the fragment length 324 * 325 * We read the full fixed ncacn_packet header 326 * in order to make wireshark happy with 327 * pcap files from socket_wrapper. 328 */ 332 329 ofs = 0; 333 state->buffer.length = DCERPC_ FRAG_LEN_OFFSET + 2;330 state->buffer.length = DCERPC_NCACN_PAYLOAD_OFFSET; 334 331 state->buffer.data = talloc_array(state, uint8_t, 335 332 state->buffer.length); … … 337 334 return -1; 338 335 } 339 } else if (state->buffer.length == (DCERPC_FRAG_LEN_OFFSET + 2)) {336 } else if (state->buffer.length == DCERPC_NCACN_PAYLOAD_OFFSET) { 340 337 /* now read the fragment length and allocate the full buffer */ 341 338 size_t frag_len = dcerpc_get_frag_length(&state->buffer); … … 395 392 TALLOC_FREE(subreq); 396 393 if (ret == -1) { 397 status = map_nt_error_from_unix (sys_errno);394 status = map_nt_error_from_unix_common(sys_errno); 398 395 tevent_req_nterror(req, status); 399 396 return; … … 451 448 tevent_req_received(req); 452 449 return NT_STATUS_OK; 450 } 451 452 const char *dcerpc_default_transport_endpoint(TALLOC_CTX *mem_ctx, 453 enum dcerpc_transport_t transport, 454 const struct ndr_interface_table *table) 455 { 456 NTSTATUS status; 457 const char *p = NULL; 458 const char *endpoint = NULL; 459 int i; 460 struct dcerpc_binding *default_binding = NULL; 461 TALLOC_CTX *frame = talloc_stackframe(); 462 463 /* Find one of the default pipes for this interface */ 464 465 for (i = 0; i < table->endpoints->count; i++) { 466 enum dcerpc_transport_t dtransport; 467 const char *dendpoint; 468 469 status = dcerpc_parse_binding(frame, table->endpoints->names[i], 470 &default_binding); 471 if (!NT_STATUS_IS_OK(status)) { 472 continue; 473 } 474 475 dtransport = dcerpc_binding_get_transport(default_binding); 476 dendpoint = dcerpc_binding_get_string_option(default_binding, 477 "endpoint"); 478 if (dendpoint == NULL) { 479 TALLOC_FREE(default_binding); 480 continue; 481 } 482 483 if (transport == NCA_UNKNOWN) { 484 transport = dtransport; 485 } 486 487 if (transport != dtransport) { 488 TALLOC_FREE(default_binding); 489 continue; 490 } 491 492 p = dendpoint; 493 break; 494 } 495 496 if (p == NULL) { 497 goto done; 498 } 499 500 /* 501 * extract the pipe name without \\pipe from for example 502 * ncacn_np:[\\pipe\\epmapper] 503 */ 504 if (transport == NCACN_NP) { 505 if (strncasecmp(p, "\\pipe\\", 6) == 0) { 506 p += 6; 507 } 508 if (strncmp(p, "\\", 1) == 0) { 509 p += 1; 510 } 511 } 512 513 endpoint = talloc_strdup(mem_ctx, p); 514 515 done: 516 talloc_free(frame); 517 return endpoint; 453 518 } 454 519 … … 558 623 } 559 624 560 #define CHECK(msg, ok) \ 561 do { \ 562 if (!ok) { \ 563 DEBUG(10, ("SEC_VT check %s failed\n", msg)); \ 564 return false; \ 565 } \ 566 } while(0) 567 568 #define CHECK_SYNTAX(msg, s1, s2) \ 569 do { \ 570 if (!ndr_syntax_id_equal(&s1, &s2)) { \ 571 TALLOC_CTX *frame = talloc_stackframe(); \ 572 DEBUG(10, ("SEC_VT check %s failed: %s vs. %s\n", msg, \ 573 ndr_syntax_id_to_string(frame, &s1), \ 574 ndr_syntax_id_to_string(frame, &s1))); \ 575 TALLOC_FREE(frame); \ 576 return false; \ 577 } \ 578 } while(0) 579 625 static bool dcerpc_sec_vt_bitmask_check(const uint32_t *bitmask1, 626 struct dcerpc_sec_vt *c) 627 { 628 if (bitmask1 == NULL) { 629 if (c->command & DCERPC_SEC_VT_MUST_PROCESS) { 630 DEBUG(10, ("SEC_VT check Bitmask1 must_process_command " 631 "failed\n")); 632 return false; 633 } 634 635 return true; 636 } 637 638 if ((c->u.bitmask1 & DCERPC_SEC_VT_CLIENT_SUPPORTS_HEADER_SIGNING) 639 && (!(*bitmask1 & DCERPC_SEC_VT_CLIENT_SUPPORTS_HEADER_SIGNING))) { 640 DEBUG(10, ("SEC_VT check Bitmask1 client_header_signing " 641 "failed\n")); 642 return false; 643 } 644 return true; 645 } 646 647 static bool dcerpc_sec_vt_pctx_check(const struct dcerpc_sec_vt_pcontext *pcontext, 648 struct dcerpc_sec_vt *c) 649 { 650 TALLOC_CTX *mem_ctx; 651 bool ok; 652 653 if (pcontext == NULL) { 654 if (c->command & DCERPC_SEC_VT_MUST_PROCESS) { 655 DEBUG(10, ("SEC_VT check Pcontext must_process_command " 656 "failed\n")); 657 return false; 658 } 659 660 return true; 661 } 662 663 mem_ctx = talloc_stackframe(); 664 ok = ndr_syntax_id_equal(&pcontext->abstract_syntax, 665 &c->u.pcontext.abstract_syntax); 666 if (!ok) { 667 DEBUG(10, ("SEC_VT check pcontext abstract_syntax failed: " 668 "%s vs. %s\n", 669 ndr_syntax_id_to_string(mem_ctx, 670 &pcontext->abstract_syntax), 671 ndr_syntax_id_to_string(mem_ctx, 672 &c->u.pcontext.abstract_syntax))); 673 goto err_ctx_free; 674 } 675 ok = ndr_syntax_id_equal(&pcontext->transfer_syntax, 676 &c->u.pcontext.transfer_syntax); 677 if (!ok) { 678 DEBUG(10, ("SEC_VT check pcontext transfer_syntax failed: " 679 "%s vs. %s\n", 680 ndr_syntax_id_to_string(mem_ctx, 681 &pcontext->transfer_syntax), 682 ndr_syntax_id_to_string(mem_ctx, 683 &c->u.pcontext.transfer_syntax))); 684 goto err_ctx_free; 685 } 686 687 ok = true; 688 err_ctx_free: 689 talloc_free(mem_ctx); 690 return ok; 691 } 692 693 static bool dcerpc_sec_vt_hdr2_check(const struct dcerpc_sec_vt_header2 *header2, 694 struct dcerpc_sec_vt *c) 695 { 696 if (header2 == NULL) { 697 if (c->command & DCERPC_SEC_VT_MUST_PROCESS) { 698 DEBUG(10, ("SEC_VT check Header2 must_process_command failed\n")); 699 return false; 700 } 701 702 return true; 703 } 704 705 if (!dcerpc_sec_vt_header2_equal(header2, &c->u.header2)) { 706 DEBUG(10, ("SEC_VT check Header2 failed\n")); 707 return false; 708 } 709 710 return true; 711 } 580 712 581 713 bool dcerpc_sec_verification_trailer_check( … … 592 724 593 725 for (i=0; i < vt->count.count; i++) { 726 bool ok; 594 727 struct dcerpc_sec_vt *c = &vt->commands[i]; 595 728 596 729 switch (c->command & DCERPC_SEC_VT_COMMAND_ENUM) { 597 730 case DCERPC_SEC_VT_COMMAND_BITMASK1: 598 if (bitmask1 == NULL) { 599 CHECK("Bitmask1 must_process_command", 600 !(c->command & DCERPC_SEC_VT_MUST_PROCESS)); 601 break; 602 } 603 604 if (c->u.bitmask1 & DCERPC_SEC_VT_CLIENT_SUPPORTS_HEADER_SIGNING) { 605 CHECK("Bitmask1 client_header_signing", 606 *bitmask1 & DCERPC_SEC_VT_CLIENT_SUPPORTS_HEADER_SIGNING); 731 ok = dcerpc_sec_vt_bitmask_check(bitmask1, c); 732 if (!ok) { 733 return false; 607 734 } 608 735 break; 609 736 610 737 case DCERPC_SEC_VT_COMMAND_PCONTEXT: 611 if (pcontext == NULL) { 612 CHECK("Pcontext must_process_command", 613 !(c->command & DCERPC_SEC_VT_MUST_PROCESS)); 614 break; 738 ok = dcerpc_sec_vt_pctx_check(pcontext, c); 739 if (!ok) { 740 return false; 615 741 } 616 617 CHECK_SYNTAX("Pcontect abstract_syntax",618 pcontext->abstract_syntax,619 c->u.pcontext.abstract_syntax);620 CHECK_SYNTAX("Pcontext transfer_syntax",621 pcontext->transfer_syntax,622 c->u.pcontext.transfer_syntax);623 742 break; 624 743 625 744 case DCERPC_SEC_VT_COMMAND_HEADER2: { 626 if (header2 == NULL) { 627 CHECK("Header2 must_process_command", 628 !(c->command & DCERPC_SEC_VT_MUST_PROCESS)); 629 break; 745 ok = dcerpc_sec_vt_hdr2_check(header2, c); 746 if (!ok) { 747 return false; 630 748 } 631 632 CHECK("Header2", dcerpc_sec_vt_header2_equal(header2, &c->u.header2));633 749 break; 634 750 } 635 751 636 752 default: 637 CHECK("Unknown must_process_command", 638 !(c->command & DCERPC_SEC_VT_MUST_PROCESS)); 753 if (c->command & DCERPC_SEC_VT_MUST_PROCESS) { 754 DEBUG(10, ("SEC_VT check Unknown must_process_command failed\n")); 755 return false; 756 } 757 639 758 break; 640 759 } … … 643 762 return true; 644 763 } 764 765 static const struct ndr_syntax_id dcerpc_bind_time_features_prefix = { 766 .uuid = { 767 .time_low = 0x6cb71c2c, 768 .time_mid = 0x9812, 769 .time_hi_and_version = 0x4540, 770 .clock_seq = {0x00, 0x00}, 771 .node = {0x00,0x00,0x00,0x00,0x00,0x00} 772 }, 773 .if_version = 1, 774 }; 775 776 bool dcerpc_extract_bind_time_features(struct ndr_syntax_id s, uint64_t *_features) 777 { 778 uint8_t values[8]; 779 uint64_t features = 0; 780 781 values[0] = s.uuid.clock_seq[0]; 782 values[1] = s.uuid.clock_seq[1]; 783 values[2] = s.uuid.node[0]; 784 values[3] = s.uuid.node[1]; 785 values[4] = s.uuid.node[2]; 786 values[5] = s.uuid.node[3]; 787 values[6] = s.uuid.node[4]; 788 values[7] = s.uuid.node[5]; 789 790 ZERO_STRUCT(s.uuid.clock_seq); 791 ZERO_STRUCT(s.uuid.node); 792 793 if (!ndr_syntax_id_equal(&s, &dcerpc_bind_time_features_prefix)) { 794 if (_features != NULL) { 795 *_features = 0; 796 } 797 return false; 798 } 799 800 features = BVAL(values, 0); 801 802 if (_features != NULL) { 803 *_features = features; 804 } 805 806 return true; 807 } 808 809 struct ndr_syntax_id dcerpc_construct_bind_time_features(uint64_t features) 810 { 811 struct ndr_syntax_id s = dcerpc_bind_time_features_prefix; 812 uint8_t values[8]; 813 814 SBVAL(values, 0, features); 815 816 s.uuid.clock_seq[0] = values[0]; 817 s.uuid.clock_seq[1] = values[1]; 818 s.uuid.node[0] = values[2]; 819 s.uuid.node[1] = values[3]; 820 s.uuid.node[2] = values[4]; 821 s.uuid.node[3] = values[5]; 822 s.uuid.node[4] = values[6]; 823 s.uuid.node[5] = values[7]; 824 825 return s; 826 } -
vendor/current/librpc/rpc/rpc_common.h
r919 r988 22 22 #ifndef __DEFAULT_LIBRPC_RPCCOMMON_H__ 23 23 #define __DEFAULT_LIBRPC_RPCCOMMON_H__ 24 25 #include "gen_ndr/dcerpc.h" 26 #include "lib/util/attr.h" 24 27 25 28 struct dcerpc_binding_handle; … … 41 44 42 45 /** this describes a binding to a particular transport/pipe */ 43 struct dcerpc_binding { 44 enum dcerpc_transport_t transport; 45 struct ndr_syntax_id object; 46 const char *host; 47 const char *target_hostname; 48 const char *target_principal; 49 const char *endpoint; 50 const char **options; 51 const char *localaddress; 52 uint32_t flags; 53 uint32_t assoc_group_id; 54 }; 46 struct dcerpc_binding; 55 47 56 48 /* dcerpc pipe flags */ … … 99 91 #define DCERPC_CONCURRENT_MULTIPLEX (1<<19) 100 92 101 /* this triggers the DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN flag in the bind request*/93 /* this indicates DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN flag was negotiated */ 102 94 #define DCERPC_HEADER_SIGNING (1<<20) 103 95 … … 105 97 #define DCERPC_NDR64 (1<<21) 106 98 107 /* specify binding interface */ 108 #define DCERPC_LOCALADDRESS (1<<22) 99 /* handle upgrades or downgrades automatically */ 100 #define DCERPC_SCHANNEL_AUTO (1<<23) 101 102 /* use aes schannel with hmac-sh256 session key */ 103 #define DCERPC_SCHANNEL_AES (1<<24) 104 105 /* this triggers the DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN flag in the bind request */ 106 #define DCERPC_PROPOSE_HEADER_SIGNING (1<<25) 109 107 110 108 /* The following definitions come from ../librpc/rpc/dcerpc_error.c */ … … 112 110 const char *dcerpc_errstr(TALLOC_CTX *mem_ctx, uint32_t fault_code); 113 111 NTSTATUS dcerpc_fault_to_nt_status(uint32_t fault_code); 112 uint32_t dcerpc_fault_from_nt_status(NTSTATUS nt_status); 114 113 115 114 /* The following definitions come from ../librpc/rpc/binding.c */ 116 115 117 116 const char *epm_floor_string(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor); 118 c onst char *dcerpc_floor_get_rhs_data(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor);117 char *dcerpc_floor_get_rhs_data(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor); 119 118 enum dcerpc_transport_t dcerpc_transport_by_endpoint_protocol(int prot); 120 119 struct dcerpc_binding *dcerpc_binding_dup(TALLOC_CTX *mem_ctx, … … 128 127 NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_binding **b_out); 129 128 char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_binding *b); 129 struct GUID dcerpc_binding_get_object(const struct dcerpc_binding *b); 130 NTSTATUS dcerpc_binding_set_object(struct dcerpc_binding *b, 131 struct GUID object); 132 enum dcerpc_transport_t dcerpc_binding_get_transport(const struct dcerpc_binding *b); 133 NTSTATUS dcerpc_binding_set_transport(struct dcerpc_binding *b, 134 enum dcerpc_transport_t transport); 135 void dcerpc_binding_get_auth_info(const struct dcerpc_binding *b, 136 enum dcerpc_AuthType *_auth_type, 137 enum dcerpc_AuthLevel *_auth_level); 138 uint32_t dcerpc_binding_get_assoc_group_id(const struct dcerpc_binding *b); 139 NTSTATUS dcerpc_binding_set_assoc_group_id(struct dcerpc_binding *b, 140 uint32_t assoc_group_id); 141 struct ndr_syntax_id dcerpc_binding_get_abstract_syntax(const struct dcerpc_binding *b); 142 NTSTATUS dcerpc_binding_set_abstract_syntax(struct dcerpc_binding *b, 143 const struct ndr_syntax_id *syntax); 144 const char *dcerpc_binding_get_string_option(const struct dcerpc_binding *b, 145 const char *name); 146 char *dcerpc_binding_copy_string_option(TALLOC_CTX *mem_ctx, 147 const struct dcerpc_binding *b, 148 const char *name); 149 NTSTATUS dcerpc_binding_set_string_option(struct dcerpc_binding *b, 150 const char *name, 151 const char *value); 152 uint32_t dcerpc_binding_get_flags(const struct dcerpc_binding *b); 153 NTSTATUS dcerpc_binding_set_flags(struct dcerpc_binding *b, 154 uint32_t additional, 155 uint32_t clear); 130 156 NTSTATUS dcerpc_floor_get_lhs_data(const struct epm_floor *epm_floor, struct ndr_syntax_id *syntax); 131 157 const char *derpc_transport_string_by_transport(enum dcerpc_transport_t t); 158 enum dcerpc_transport_t dcerpc_transport_by_name(const char *name); 132 159 enum dcerpc_transport_t dcerpc_transport_by_tower(const struct epm_tower *tower); 133 160 … … 136 163 void dcerpc_set_frag_length(DATA_BLOB *blob, uint16_t v); 137 164 uint16_t dcerpc_get_frag_length(const DATA_BLOB *blob); 138 uint32_t dcerpc_get_call_id(const DATA_BLOB *blob);139 165 void dcerpc_set_auth_length(DATA_BLOB *blob, uint16_t v); 140 166 uint8_t dcerpc_get_endian_flag(DATA_BLOB *blob); 167 const char *dcerpc_default_transport_endpoint(TALLOC_CTX *mem_ctx, 168 enum dcerpc_transport_t transport, 169 const struct ndr_interface_table *table); 141 170 142 171 /** … … 187 216 uint32_t timeout); 188 217 218 void (*auth_info)(struct dcerpc_binding_handle *h, 219 enum dcerpc_AuthType *auth_type, 220 enum dcerpc_AuthLevel *auth_level); 221 189 222 struct tevent_req *(*raw_call_send)(TALLOC_CTX *mem_ctx, 190 223 struct tevent_context *ev, … … 257 290 uint32_t timeout); 258 291 292 void dcerpc_binding_handle_auth_info(struct dcerpc_binding_handle *h, 293 enum dcerpc_AuthType *auth_type, 294 enum dcerpc_AuthLevel *auth_level); 295 259 296 struct tevent_req *dcerpc_binding_handle_raw_call_send(TALLOC_CTX *mem_ctx, 260 297 struct tevent_context *ev, … … 343 380 const struct dcerpc_sec_vt_header2 *header2); 344 381 382 /** 383 * @brief check and optionally extract the Bind Time Features from 384 * the given ndr_syntax_id. 385 * 386 * <a href="http://msdn.microsoft.com/en-us/library/cc243715.aspx">MS-RPCE 3.3.1.5.3 Bind Time Feature Negotiation</a>. 387 * 388 * @param[in] s the syntax that should be checked. 389 * 390 * @param[out] features This is optional, it will be filled with the extracted 391 * features the on success, otherwise it's filled with 0. 392 * 393 * @return true if the syntax matches the 6CB71C2C-9812-4540 prefix with version 1, false otherwise. 394 * 395 * @see dcerpc_construct_bind_time_features 396 */ 397 bool dcerpc_extract_bind_time_features(struct ndr_syntax_id syntax, uint64_t *features); 398 399 /** 400 * @brief Construct a ndr_syntax_id used for Bind Time Features Negotiation. 401 * 402 * <a href="http://msdn.microsoft.com/en-us/library/cc243715.aspx">MS-RPCE 3.3.1.5.3 Bind Time Feature Negotiation</a>. 403 * 404 * @param[in] features The supported features. 405 * 406 * @return The ndr_syntax_id with the given features. 407 * 408 * @see dcerpc_extract_bind_time_features 409 */ 410 struct ndr_syntax_id dcerpc_construct_bind_time_features(uint64_t features); 411 412 #define DCERPC_AUTH_PAD_LENGTH(stub_length) (\ 413 (((stub_length) % DCERPC_AUTH_PAD_ALIGNMENT) > 0)?\ 414 (DCERPC_AUTH_PAD_ALIGNMENT - (stub_length) % DCERPC_AUTH_PAD_ALIGNMENT):\ 415 0) 416 345 417 #endif /* __DEFAULT_LIBRPC_RPCCOMMON_H__ */ -
vendor/current/librpc/tools/ndrdump.1.xml
r740 r988 6 6 <refentrytitle>ndrdump</refentrytitle> 7 7 <manvolnum>1</manvolnum> 8 <refmiscinfo class="source">Samba</refmiscinfo> 9 <refmiscinfo class="manual">System Administration tools</refmiscinfo> 10 <refmiscinfo class="version">4.0</refmiscinfo> 8 11 </refmeta> 9 12 -
vendor/current/librpc/tools/ndrdump.c
r740 r988 24 24 #include "librpc/ndr/libndr.h" 25 25 #include "librpc/ndr/ndr_table.h" 26 #i f (_SAMBA_BUILD_ >= 4)26 #include "librpc/gen_ndr/ndr_dcerpc.h" 27 27 #include "lib/cmdline/popt_common.h" 28 28 #include "param/param.h" 29 #endif30 29 31 30 static const struct ndr_interface_call *find_function( … … 120 119 printf("%s: Unable to find DCE/RPC interface table for '%s': %s\n", plugin, pipe_name, dlerror()); 121 120 talloc_free(symbol); 121 dlclose(handle); 122 122 return NULL; 123 123 } … … 128 128 } 129 129 130 static void printf_cb(const char *buf, void *private_data)131 {132 printf("%s", buf);133 }134 135 130 static void ndrdump_data(uint8_t *d, uint32_t l, bool force) 136 131 { 137 dump_data_ cb(d, l, !force, printf_cb, NULL);132 dump_data_file(d, l, !force, stdout); 138 133 } 139 134 … … 150 145 uint64_t idx = 0; 151 146 while (true) { 147 void *saved_mem_ctx; 152 148 uint32_t *count; 153 149 void *c; … … 166 162 (unsigned long long)idx); 167 163 164 saved_mem_ctx = ndr_pull->current_mem_ctx; 165 ndr_pull->current_mem_ctx = c; 168 166 ndr_err = pipes->pipes[i].ndr_pull(ndr_pull, NDR_SCALARS, c); 167 ndr_pull->current_mem_ctx = saved_mem_ctx; 169 168 status = ndr_map_error2ntstatus(ndr_err); 170 169 171 170 printf("pull returned %s\n", nt_errstr(status)); 172 171 if (!NT_STATUS_IS_OK(status)) { 172 talloc_free(c); 173 173 return status; 174 174 } 175 175 pipes->pipes[i].ndr_print(ndr_print, n, c); 176 176 talloc_free(c); 177 177 if (*count == 0) { 178 178 break; … … 220 220 { NULL } 221 221 }; 222 struct ndr_interface_call_pipes *in_pipes = NULL; 223 struct ndr_interface_call_pipes *out_pipes = NULL; 222 const struct ndr_interface_call_pipes *in_pipes = NULL; 223 const struct ndr_interface_call_pipes *out_pipes = NULL; 224 uint32_t highest_ofs; 225 struct dcerpc_sec_verification_trailer *sec_vt = NULL; 224 226 225 227 ndr_table_init(); 226 228 227 229 /* Initialise samba stuff */ 228 load_case_tables();230 smb_init_locale(); 229 231 230 232 setlinebuf(stdout); … … 342 344 343 345 ndr_pull = ndr_pull_init_blob(&blob, mem_ctx); 346 if (ndr_pull == NULL) { 347 perror("ndr_pull_init_blob"); 348 exit(1); 349 } 344 350 ndr_pull->flags |= LIBNDR_FLAG_REF_ALLOC; 345 351 if (assume_ndr64) { … … 349 355 ndr_err = f->ndr_pull(ndr_pull, NDR_IN, st); 350 356 351 if (ndr_pull->offset != ndr_pull->data_size) { 352 printf("WARNING! %d unread bytes while parsing context file\n", ndr_pull->data_size - ndr_pull->offset); 357 if (ndr_pull->offset > ndr_pull->relative_highest_offset) { 358 highest_ofs = ndr_pull->offset; 359 } else { 360 highest_ofs = ndr_pull->relative_highest_offset; 361 } 362 363 if (highest_ofs != ndr_pull->data_size) { 364 printf("WARNING! %d unread bytes while parsing context file\n", ndr_pull->data_size - highest_ofs); 353 365 } 354 366 … … 378 390 379 391 ndr_pull = ndr_pull_init_blob(&blob, mem_ctx); 392 if (ndr_pull == NULL) { 393 perror("ndr_pull_init_blob"); 394 exit(1); 395 } 380 396 ndr_pull->flags |= LIBNDR_FLAG_REF_ALLOC; 381 397 if (assume_ndr64) { … … 386 402 ndr_print->print = ndr_print_printf_helper; 387 403 ndr_print->depth = 1; 404 405 ndr_err = ndr_pop_dcerpc_sec_verification_trailer(ndr_pull, mem_ctx, &sec_vt); 406 status = ndr_map_error2ntstatus(ndr_err); 407 if (!NT_STATUS_IS_OK(status)) { 408 printf("ndr_pop_dcerpc_sec_verification_trailer returned %s\n", 409 nt_errstr(status)); 410 } 411 412 if (sec_vt != NULL && sec_vt->count.count > 0) { 413 printf("SEC_VT: consumed %d bytes\n", 414 (int)(blob.length - ndr_pull->data_size)); 415 if (dumpdata) { 416 ndrdump_data(blob.data + ndr_pull->data_size, 417 blob.length - ndr_pull->data_size, 418 dumpdata); 419 } 420 ndr_print_dcerpc_sec_verification_trailer(ndr_print, "SEC_VT", sec_vt); 421 } 422 TALLOC_FREE(sec_vt); 388 423 389 424 if (out_pipes) { … … 400 435 printf("pull returned %s\n", nt_errstr(status)); 401 436 402 if (ndr_pull->offset != ndr_pull->data_size) { 403 printf("WARNING! %d unread bytes\n", ndr_pull->data_size - ndr_pull->offset); 404 ndrdump_data(ndr_pull->data+ndr_pull->offset, 405 ndr_pull->data_size - ndr_pull->offset, 437 if (ndr_pull->offset > ndr_pull->relative_highest_offset) { 438 highest_ofs = ndr_pull->offset; 439 } else { 440 highest_ofs = ndr_pull->relative_highest_offset; 441 } 442 443 if (highest_ofs != ndr_pull->data_size) { 444 printf("WARNING! %d unread bytes\n", ndr_pull->data_size - highest_ofs); 445 ndrdump_data(ndr_pull->data+highest_ofs, 446 ndr_pull->data_size - highest_ofs, 406 447 dumpdata); 407 448 } … … 454 495 455 496 ndr_v_pull = ndr_pull_init_blob(&v_blob, mem_ctx); 497 if (ndr_v_pull == NULL) { 498 perror("ndr_pull_init_blob"); 499 exit(1); 500 } 456 501 ndr_v_pull->flags |= LIBNDR_FLAG_REF_ALLOC; 457 502 -
vendor/current/librpc/tools/wscript_build
r740 r988 4 4 source='ndrdump.c', 5 5 manpages='ndrdump.1', 6 deps='samba-hostconfig samba-util popt POPT_SAMBA ndr-table errors'6 deps='samba-hostconfig samba-util popt POPT_SAMBA ndr-table samba-errors NDR_DCERPC' 7 7 ) -
vendor/current/librpc/wscript_build
r919 r988 5 5 6 6 bld.SAMBA_SUBSYSTEM('NDR_AUDIOSRV', 7 source='gen_ndr/ndr_audiosrv.c', 7 source='gen_ndr/ndr_audiosrv.c', 8 public_deps='ndr' 9 ) 10 11 bld.SAMBA_SUBSYSTEM('NDR_AUTH', 12 source='gen_ndr/ndr_auth.c ndr/ndr_auth.c', 13 public_headers='gen_ndr/auth.h', 14 header_path='gen_ndr', 15 public_deps='ndr NDR_SECURITY ndr-krb5pac' 16 ) 17 18 bld.SAMBA_SUBSYSTEM('NDR_ATSVC', 19 source='gen_ndr/ndr_atsvc.c', 20 public_deps='ndr' 21 ) 22 23 bld.SAMBA_SUBSYSTEM('NDR_NAMED_PIPE_AUTH', 24 source='gen_ndr/ndr_named_pipe_auth.c', 25 public_deps='ndr NDR_AUTH' 26 ) 27 28 bld.SAMBA_SUBSYSTEM('NDR_DNSSERVER', 29 source='gen_ndr/ndr_dnsserver.c ndr/ndr_dnsserver.c', 30 public_deps='ndr NDR_DNSP' 31 ) 32 33 bld.SAMBA_SUBSYSTEM('NDR_DNS', 34 source='gen_ndr/ndr_dns.c ndr/ndr_dns.c', 35 public_deps='ndr NDR_DNSP' 36 ) 37 38 bld.SAMBA_SUBSYSTEM('NDR_DSBACKUP', 39 source='gen_ndr/ndr_dsbackup.c', 40 public_deps='ndr' 41 ) 42 43 bld.SAMBA_SUBSYSTEM('NDR_DFS', 44 source='gen_ndr/ndr_dfs.c', 45 public_deps='ndr' 46 ) 47 48 bld.SAMBA_SUBSYSTEM('NDR_WINREG', 49 source='gen_ndr/ndr_winreg.c', 50 public_deps='ndr NDR_SECURITY NDR_LSA' 51 ) 52 53 bld.SAMBA_SUBSYSTEM('NDR_EFS', 54 source='gen_ndr/ndr_efs.c', 55 public_deps='ndr NDR_SECURITY' 56 ) 57 58 bld.SAMBA_SUBSYSTEM('NDR_ROT', 59 source='gen_ndr/ndr_rot.c', 60 public_deps='ndr NDR_ORPC' 61 ) 62 63 bld.SAMBA_SUBSYSTEM('NDR_FRSRPC', 64 source='ndr/ndr_frsrpc.c gen_ndr/ndr_frsrpc.c', 65 public_deps='ndr' 66 ) 67 68 bld.SAMBA_SUBSYSTEM('RPC_NDR_FRSRPC', 69 source='gen_ndr/ndr_frsrpc_c.c', 70 public_deps='NDR_FRSRPC' 71 ) 72 73 bld.SAMBA_SUBSYSTEM('NDR_FRSAPI', 74 source='gen_ndr/ndr_frsapi.c', 75 public_deps='ndr' 76 ) 77 78 bld.SAMBA_SUBSYSTEM('NDR_FRSTRANS', 79 source='gen_ndr/ndr_frstrans.c', 80 public_deps='ndr' 81 ) 82 83 bld.SAMBA_SUBSYSTEM('NDR_DFSBLOBS', 84 source='gen_ndr/ndr_dfsblobs.c', 85 public_deps='ndr' 86 ) 87 88 bld.SAMBA_SUBSYSTEM('NDR_BKUPBLOBS', 89 source='ndr/ndr_bkupblobs.c gen_ndr/ndr_bkupblobs.c', 8 90 public_deps='ndr' 9 91 ) 10 92 11 bld.SAMBA_SUBSYSTEM('NDR_AUTH', 12 source='gen_ndr/ndr_auth.c', 13 public_headers='gen_ndr/auth.h', 14 header_path='gen_ndr', 15 public_deps='ndr NDR_SECURITY ndr-krb5pac' 16 ) 17 18 bld.SAMBA_SUBSYSTEM('NDR_ATSVC', 19 source='gen_ndr/ndr_atsvc.c', 93 bld.SAMBA_SUBSYSTEM('NDR_FSCC', 94 source='gen_ndr/ndr_fscc.c', 20 95 public_deps='ndr' 21 96 ) 22 97 23 bld.SAMBA_SUBSYSTEM('NDR_NAMED_PIPE_AUTH', 24 source='gen_ndr/ndr_named_pipe_auth.c', 25 public_deps='ndr NDR_AUTH' 26 ) 27 28 bld.SAMBA_SUBSYSTEM('NDR_DNSSERVER', 29 source='gen_ndr/ndr_dnsserver.c', 98 bld.SAMBA_SUBSYSTEM('NDR_FRSBLOBS', 99 source='gen_ndr/ndr_frsblobs.c', 30 100 public_deps='ndr' 31 101 ) 32 102 33 bld.SAMBA_SUBSYSTEM('NDR_DNS', 34 source='gen_ndr/ndr_dns.c ndr/ndr_dns.c', 103 bld.SAMBA_SUBSYSTEM('NDR_POLICYAGENT', 104 source='gen_ndr/ndr_policyagent.c', 105 public_deps='ndr' 106 ) 107 108 bld.SAMBA_SUBSYSTEM('NDR_UNIXINFO', 109 source='gen_ndr/ndr_unixinfo.c', 110 public_deps='ndr NDR_SECURITY' 111 ) 112 113 bld.SAMBA_SUBSYSTEM('NDR_SPOOLSS', 114 source='gen_ndr/ndr_spoolss.c', 115 public_deps='ndr NDR_SPOOLSS_BUF NDR_SECURITY' 116 ) 117 118 bld.SAMBA_SUBSYSTEM('NDR_SPOOLSS_BUF', 119 source='ndr/ndr_spoolss_buf.c', 120 deps='talloc' 121 ) 122 123 bld.SAMBA_SUBSYSTEM('NDR_PRINTCAP', 124 source='gen_ndr/ndr_printcap.c', 125 public_deps='ndr' 126 ) 127 128 bld.SAMBA_SUBSYSTEM('NDR_EPMAPPER', 129 source='gen_ndr/ndr_epmapper.c', 130 public_deps='ndr' 131 ) 132 133 bld.SAMBA_SUBSYSTEM('NDR_DBGIDL', 134 source='gen_ndr/ndr_dbgidl.c', 135 public_deps='ndr' 136 ) 137 138 bld.SAMBA_SUBSYSTEM('NDR_DSSETUP', 139 source='gen_ndr/ndr_dssetup.c', 140 public_deps='ndr' 141 ) 142 143 bld.SAMBA_SUBSYSTEM('NDR_MSGSVC', 144 source='gen_ndr/ndr_msgsvc.c', 145 public_deps='ndr' 146 ) 147 148 bld.SAMBA_SUBSYSTEM('NDR_MGMT', 149 source='gen_ndr/ndr_mgmt.c', 150 public_deps='ndr' 151 ) 152 153 bld.SAMBA_SUBSYSTEM('NDR_ORPC', 154 source='ndr/ndr_orpc.c gen_ndr/ndr_orpc.c', 155 public_deps='ndr' 156 ) 157 158 bld.SAMBA_SUBSYSTEM('NDR_OXIDRESOLVER', 159 source='gen_ndr/ndr_oxidresolver.c', 160 public_deps='ndr NDR_ORPC' 161 ) 162 163 bld.SAMBA_SUBSYSTEM('NDR_REMACT', 164 source='gen_ndr/ndr_remact.c', 165 public_deps='ndr NDR_ORPC' 166 ) 167 168 bld.SAMBA_SUBSYSTEM('NDR_DCOM', 169 source='gen_ndr/ndr_dcom.c', 170 public_deps='ndr NDR_SECURITY NDR_ORPC' 171 ) 172 173 bld.SAMBA_SUBSYSTEM('NDR_WMI', 174 source='ndr/ndr_wmi.c gen_ndr/ndr_wmi.c', 175 public_deps='ndr NDR_SECURITY NDR_DCOM' 176 ) 177 178 bld.SAMBA_SUBSYSTEM('NDR_WZCSVC', 179 source='gen_ndr/ndr_wzcsvc.c', 180 public_deps='ndr' 181 ) 182 183 bld.SAMBA_SUBSYSTEM('NDR_BROWSER', 184 source='gen_ndr/ndr_browser.c', 185 public_deps='ndr' 186 ) 187 188 bld.SAMBA_SUBSYSTEM('NDR_W32TIME', 189 source='gen_ndr/ndr_w32time.c', 190 public_deps='ndr' 191 ) 192 193 bld.SAMBA_SUBSYSTEM('NDR_SCERPC', 194 source='gen_ndr/ndr_scerpc.c', 195 public_deps='ndr' 196 ) 197 198 bld.SAMBA_SUBSYSTEM('NDR_SERVER_ID', 199 source='gen_ndr/ndr_server_id.c', 200 deps='ndr', 201 public_headers='gen_ndr/server_id.h', 202 header_path='gen_ndr' 203 ) 204 205 bld.SAMBA_SUBSYSTEM('NDR_TRKWKS', 206 source='gen_ndr/ndr_trkwks.c', 207 public_deps='ndr' 208 ) 209 210 bld.SAMBA_SUBSYSTEM('NDR_KEYSVC', 211 source='gen_ndr/ndr_keysvc.c', 212 public_deps='ndr' 213 ) 214 215 bld.SAMBA_SUBSYSTEM('NDR_RAP', 216 source='gen_ndr/ndr_rap.c ndr/ndr_rap.c', 217 public_deps='ndr' 218 ) 219 220 bld.SAMBA_SUBSYSTEM('NDR_IDMAP', 221 source='gen_ndr/ndr_idmap.c', 222 public_deps='ndr ndr-standard' 223 ) 224 225 bld.SAMBA_SUBSYSTEM('NDR_NOTIFY', 226 source='gen_ndr/ndr_notify.c', 227 public_deps='ndr ndr-standard NDR_SERVER_ID NDR_FILE_ID' 228 ) 229 230 bld.SAMBA_SUBSYSTEM('NDR_NTLMSSP', 231 source='ndr/ndr_ntlmssp.c gen_ndr/ndr_ntlmssp.c', 232 public_deps='ndr ndr-standard' 233 ) 234 235 bld.SAMBA_SUBSYSTEM('NDR_NEGOEX', 236 source='ndr/ndr_negoex.c gen_ndr/ndr_negoex.c', 237 public_deps='ndr' 238 ) 239 240 bld.SAMBA_SUBSYSTEM('NDR_DNSP', 241 source='gen_ndr/ndr_dnsp.c ndr/ndr_dnsp.c', 242 public_deps='ndr' 243 ) 244 245 bld.SAMBA_SUBSYSTEM('NDR_NFS4ACL', 246 source='gen_ndr/ndr_nfs4acl.c', 247 public_deps='ndr NDR_SECURITY' 248 ) 249 250 bld.SAMBA_SUBSYSTEM('NDR_NTPRINTING', 251 source='gen_ndr/ndr_ntprinting.c ndr/ndr_ntprinting.c', 252 public_deps='ndr' 253 ) 254 255 bld.SAMBA_SUBSYSTEM('NDR_SAMR', 256 source='gen_ndr/ndr_samr.c', 257 public_deps='ndr NDR_SECURITY NDR_LSA' 258 ) 259 260 bld.SAMBA_SUBSYSTEM('NDR_LSA', 261 source='gen_ndr/ndr_lsa.c', 262 public_deps='ndr NDR_SECURITY' 263 ) 264 265 bld.SAMBA_SUBSYSTEM('NDR_SECURITY', 266 source='gen_ndr/ndr_security.c ndr/ndr_sec_helper.c', 267 deps='ndr samba-security', 268 public_headers='gen_ndr/security.h', 269 header_path='gen_ndr' 270 ) 271 272 bld.SAMBA_SUBSYSTEM('NDR_SMB_ACL', 273 source='gen_ndr/ndr_smb_acl.c', 274 deps='ndr', 275 ) 276 277 bld.SAMBA_SUBSYSTEM('NDR_SVCCTL', 278 source='gen_ndr/ndr_svcctl.c ndr/ndr_svcctl.c', 279 public_deps='ndr NDR_SECURITY' 280 ) 281 282 bld.SAMBA_SUBSYSTEM('NDR_SRVSVC', 283 source='gen_ndr/ndr_srvsvc.c', 284 public_deps='ndr NDR_SECURITY NDR_SVCCTL' 285 ) 286 287 bld.SAMBA_SUBSYSTEM('NDR_NETLOGON', 288 source='gen_ndr/ndr_netlogon.c ndr/ndr_netlogon.c', 289 public_deps='ndr NDR_SECURITY NDR_LSA NDR_SAMR ndr_nbt' 290 ) 291 292 bld.SAMBA_SUBSYSTEM('NDR_EVENTLOG', 293 source='gen_ndr/ndr_eventlog.c', 294 public_deps='ndr NDR_SECURITY NDR_LSA' 295 ) 296 297 bld.SAMBA_SUBSYSTEM('NDR_NTSVCS', 298 source='gen_ndr/ndr_ntsvcs.c', 299 public_deps='ndr' 300 ) 301 302 bld.SAMBA_SUBSYSTEM('NDR_WKSSVC', 303 source='gen_ndr/ndr_wkssvc.c', 304 public_deps='ndr NDR_SECURITY' 305 ) 306 307 bld.SAMBA_SUBSYSTEM('NDR_ECHO', 308 source='gen_ndr/ndr_echo.c', 309 public_deps='ndr' 310 ) 311 312 bld.SAMBA_SUBSYSTEM('NDR_INITSHUTDOWN', 313 source='gen_ndr/ndr_initshutdown.c', 314 public_deps='ndr NDR_LSA' 315 ) 316 317 bld.SAMBA_SUBSYSTEM('NDR_COMPRESSION', 318 source='ndr/ndr_compression.c', 319 public_deps='samba-errors ndr', 320 deps='z LZXPRESS' 321 ) 322 323 bld.SAMBA_SUBSYSTEM('NDR_FSRVP', 324 source='gen_ndr/ndr_fsrvp.c', 35 325 public_deps='ndr' 36 326 ) 37 327 38 bld.SAMBA_SUBSYSTEM('NDR_DSBACKUP', 39 source='gen_ndr/ndr_dsbackup.c', 40 public_deps='ndr' 41 ) 42 43 bld.SAMBA_SUBSYSTEM('NDR_DFS', 44 source='gen_ndr/ndr_dfs.c', 45 public_deps='ndr' 46 ) 47 48 bld.SAMBA_SUBSYSTEM('NDR_WINREG', 49 source='gen_ndr/ndr_winreg.c', 50 public_deps='ndr NDR_SECURITY NDR_LSA' 51 ) 52 53 bld.SAMBA_SUBSYSTEM('NDR_EFS', 54 source='gen_ndr/ndr_efs.c', 55 public_deps='ndr NDR_SECURITY' 56 ) 57 58 bld.SAMBA_SUBSYSTEM('NDR_ROT', 59 source='gen_ndr/ndr_rot.c', 60 public_deps='ndr NDR_ORPC' 61 ) 62 63 bld.SAMBA_SUBSYSTEM('NDR_FRSRPC', 64 source='ndr/ndr_frsrpc.c gen_ndr/ndr_frsrpc.c', 65 public_deps='ndr' 66 ) 67 68 bld.SAMBA_SUBSYSTEM('NDR_FRSAPI', 69 source='gen_ndr/ndr_frsapi.c', 70 public_deps='ndr' 71 ) 72 73 bld.SAMBA_SUBSYSTEM('NDR_FRSTRANS', 74 source='gen_ndr/ndr_frstrans.c', 75 public_deps='ndr' 76 ) 77 78 bld.SAMBA_SUBSYSTEM('NDR_DFSBLOBS', 79 source='gen_ndr/ndr_dfsblobs.c', 80 public_deps='ndr' 81 ) 82 83 bld.SAMBA_SUBSYSTEM('NDR_POLICYAGENT', 84 source='gen_ndr/ndr_policyagent.c', 85 public_deps='ndr' 86 ) 87 88 bld.SAMBA_SUBSYSTEM('NDR_UNIXINFO', 89 source='gen_ndr/ndr_unixinfo.c', 90 public_deps='ndr NDR_SECURITY' 91 ) 92 93 bld.SAMBA_SUBSYSTEM('NDR_SPOOLSS', 94 source='gen_ndr/ndr_spoolss.c', 95 public_deps='ndr NDR_SPOOLSS_BUF NDR_SECURITY' 96 ) 97 98 bld.SAMBA_SUBSYSTEM('NDR_SPOOLSS_BUF', 99 source='ndr/ndr_spoolss_buf.c', 100 deps='talloc' 101 ) 102 103 bld.SAMBA_SUBSYSTEM('NDR_PRINTCAP', 104 source='gen_ndr/ndr_printcap.c', 105 public_deps='ndr' 106 ) 107 108 bld.SAMBA_SUBSYSTEM('NDR_EPMAPPER', 109 source='gen_ndr/ndr_epmapper.c', 110 public_deps='ndr' 111 ) 112 113 bld.SAMBA_SUBSYSTEM('NDR_DBGIDL', 114 source='gen_ndr/ndr_dbgidl.c', 115 public_deps='ndr' 116 ) 117 118 bld.SAMBA_SUBSYSTEM('NDR_DSSETUP', 119 source='gen_ndr/ndr_dssetup.c', 120 public_deps='ndr' 121 ) 122 123 bld.SAMBA_SUBSYSTEM('NDR_MSGSVC', 124 source='gen_ndr/ndr_msgsvc.c', 125 public_deps='ndr' 126 ) 127 128 bld.SAMBA_SUBSYSTEM('NDR_MGMT', 129 source='gen_ndr/ndr_mgmt.c', 130 public_deps='ndr' 131 ) 132 133 bld.SAMBA_SUBSYSTEM('NDR_ORPC', 134 source='ndr/ndr_orpc.c gen_ndr/ndr_orpc.c', 135 public_deps='ndr' 136 ) 137 138 bld.SAMBA_SUBSYSTEM('NDR_OXIDRESOLVER', 139 source='gen_ndr/ndr_oxidresolver.c', 140 public_deps='ndr NDR_ORPC' 141 ) 142 143 bld.SAMBA_SUBSYSTEM('NDR_REMACT', 144 source='gen_ndr/ndr_remact.c', 145 public_deps='ndr NDR_ORPC' 146 ) 147 148 bld.SAMBA_SUBSYSTEM('NDR_DCOM', 149 source='gen_ndr/ndr_dcom.c', 150 public_deps='ndr NDR_SECURITY NDR_ORPC' 151 ) 152 153 bld.SAMBA_SUBSYSTEM('NDR_WMI', 154 source='ndr/ndr_wmi.c gen_ndr/ndr_wmi.c', 155 public_deps='ndr NDR_SECURITY NDR_DCOM' 156 ) 157 158 bld.SAMBA_SUBSYSTEM('NDR_WZCSVC', 159 source='gen_ndr/ndr_wzcsvc.c', 160 public_deps='ndr' 161 ) 162 163 bld.SAMBA_SUBSYSTEM('NDR_BROWSER', 164 source='gen_ndr/ndr_browser.c', 165 public_deps='ndr' 166 ) 167 168 bld.SAMBA_SUBSYSTEM('NDR_W32TIME', 169 source='gen_ndr/ndr_w32time.c', 170 public_deps='ndr' 171 ) 172 173 bld.SAMBA_SUBSYSTEM('NDR_SCERPC', 174 source='gen_ndr/ndr_scerpc.c', 175 public_deps='ndr' 176 ) 177 178 bld.SAMBA_SUBSYSTEM('NDR_TRKWKS', 179 source='gen_ndr/ndr_trkwks.c', 180 public_deps='ndr' 181 ) 182 183 bld.SAMBA_SUBSYSTEM('NDR_KEYSVC', 184 source='gen_ndr/ndr_keysvc.c', 185 public_deps='ndr' 186 ) 187 188 bld.SAMBA_SUBSYSTEM('NDR_RAP', 189 source='gen_ndr/ndr_rap.c ndr/ndr_rap.c', 190 public_deps='ndr' 191 ) 192 193 bld.SAMBA_SUBSYSTEM('NDR_IDMAP', 194 source='gen_ndr/ndr_idmap.c', 195 public_deps='ndr ndr-standard' 196 ) 197 198 bld.SAMBA_SUBSYSTEM('NDR_NTLMSSP', 199 source='ndr/ndr_ntlmssp.c gen_ndr/ndr_ntlmssp.c', 200 public_deps='ndr ndr-standard' 201 ) 202 203 bld.SAMBA_SUBSYSTEM('NDR_DNSP', 204 source='gen_ndr/ndr_dnsp.c ndr/ndr_dnsp.c', 205 public_deps='ndr' 206 ) 207 208 bld.SAMBA_SUBSYSTEM('NDR_NTPRINTING', 209 source='gen_ndr/ndr_ntprinting.c ndr/ndr_ntprinting.c', 210 public_deps='ndr' 211 ) 212 213 bld.SAMBA_SUBSYSTEM('NDR_SAMR', 214 source='gen_ndr/ndr_samr.c', 215 public_deps='ndr NDR_SECURITY NDR_LSA' 216 ) 217 218 bld.SAMBA_SUBSYSTEM('NDR_LSA', 219 source='gen_ndr/ndr_lsa.c', 220 public_deps='ndr NDR_SECURITY' 221 ) 222 223 bld.SAMBA_SUBSYSTEM('NDR_SECURITY', 224 source='gen_ndr/ndr_security.c ndr/ndr_sec_helper.c', 225 deps='ndr security', 226 public_headers='gen_ndr/security.h', 227 header_path='gen_ndr' 228 ) 229 230 bld.SAMBA_SUBSYSTEM('NDR_SVCCTL', 231 source='gen_ndr/ndr_svcctl.c ndr/ndr_svcctl.c', 232 public_deps='ndr NDR_SECURITY' 233 ) 234 235 bld.SAMBA_SUBSYSTEM('NDR_SRVSVC', 236 source='gen_ndr/ndr_srvsvc.c', 237 public_deps='ndr NDR_SECURITY NDR_SVCCTL' 238 ) 239 240 bld.SAMBA_SUBSYSTEM('NDR_NETLOGON', 241 source='gen_ndr/ndr_netlogon.c ndr/ndr_netlogon.c', 242 public_deps='ndr NDR_SECURITY NDR_LSA NDR_SAMR NDR_NBT' 243 ) 244 245 bld.SAMBA_SUBSYSTEM('NDR_EVENTLOG', 246 source='gen_ndr/ndr_eventlog.c', 247 public_deps='ndr NDR_SECURITY NDR_LSA' 248 ) 249 250 bld.SAMBA_SUBSYSTEM('NDR_NTSVCS', 251 source='gen_ndr/ndr_ntsvcs.c', 252 public_deps='ndr' 253 ) 254 255 bld.SAMBA_SUBSYSTEM('NDR_WKSSVC', 256 source='gen_ndr/ndr_wkssvc.c', 257 public_deps='ndr NDR_SECURITY' 258 ) 259 260 bld.SAMBA_SUBSYSTEM('NDR_ECHO', 261 source='gen_ndr/ndr_echo.c', 262 public_deps='ndr' 263 ) 264 265 bld.SAMBA_SUBSYSTEM('NDR_INITSHUTDOWN', 266 source='gen_ndr/ndr_initshutdown.c', 267 public_deps='ndr NDR_LSA' 268 ) 269 270 bld.SAMBA_SUBSYSTEM('NDR_COMPRESSION', 271 source='ndr/ndr_compression.c', 272 public_deps='errors ndr', 273 deps='z LZXPRESS' 274 ) 328 bld.SAMBA_SUBSYSTEM('NDR_WITNESS', 329 source='gen_ndr/ndr_witness.c ndr/ndr_witness.c', 330 public_deps='ndr' 331 ) 332 333 bld.SAMBA_SUBSYSTEM('NDR_CLUSAPI', 334 source='gen_ndr/ndr_clusapi.c', 335 public_deps='ndr' 336 ) 337 338 bld.SAMBA_SUBSYSTEM('NDR_MDSSVC', 339 source='gen_ndr/ndr_mdssvc.c', 340 public_deps='ndr' 341 ) 275 342 276 343 bld.SAMBA_SUBSYSTEM('NDR_DCERPC', 277 source='gen_ndr/ndr_dcerpc.c ndr/ndr_dcerpc.c', 278 public_deps='ndr', 279 deps='bitmap', 280 public_headers='gen_ndr/ndr_dcerpc.h gen_ndr/dcerpc.h', 281 header_path= [ ('*gen_ndr*', 'gen_ndr') ], 282 ) 344 source='gen_ndr/ndr_dcerpc.c ndr/ndr_dcerpc.c', 345 public_deps='ndr', 346 public_headers='gen_ndr/ndr_dcerpc.h gen_ndr/dcerpc.h ndr/ndr_dcerpc.h', 347 header_path=[ ('gen_ndr*', 'gen_ndr'), ('ndr*', 'ndr')] 348 ) 283 349 284 350 bld.SAMBA_SUBSYSTEM('NDR_DRSUAPI', 285 source='ndr/ndr_drsuapi.c gen_ndr/ndr_drsuapi.c', 286 public_deps='ndr NDR_COMPRESSION NDR_SECURITY ndr-standard ASN1_UTIL' 287 ) 351 source='ndr/ndr_drsuapi.c gen_ndr/ndr_drsuapi.c', 352 public_deps='ndr NDR_COMPRESSION NDR_SECURITY ndr-standard asn1util', 353 public_headers='gen_ndr/ndr_drsuapi.h gen_ndr/drsuapi.h ndr/ndr_drsuapi.h', 354 header_path=[ ('gen_ndr*', 'gen_ndr'), ('ndr*', 'ndr')] 355 ) 288 356 289 357 bld.SAMBA_SUBSYSTEM('NDR_DRSBLOBS', 290 source='ndr/ndr_drsblobs.c gen_ndr/ndr_drsblobs.c', 291 public_deps='ndr NDR_DRSUAPI' 292 ) 358 source='ndr/ndr_drsblobs.c gen_ndr/ndr_drsblobs.c', 359 public_deps='ndr NDR_DRSUAPI', 360 public_headers='gen_ndr/ndr_drsblobs.h gen_ndr/drsblobs.h ndr/ndr_drsblobs.h', 361 header_path=[ ('gen_ndr*', 'gen_ndr'), ('ndr*', 'ndr')] 362 ) 293 363 294 364 bld.SAMBA_LIBRARY('ndr-krb5pac', 295 296 297 298 299 300 301 365 source='ndr/ndr_krb5pac.c gen_ndr/ndr_krb5pac.c', 366 public_deps='ndr ndr-standard NDR_SECURITY', 367 public_headers='gen_ndr/krb5pac.h gen_ndr/ndr_krb5pac.h', 368 header_path='gen_ndr', 369 pc_files='ndr_krb5pac.pc', 370 vnum='0.0.1' 371 ) 302 372 303 373 bld.SAMBA_LIBRARY('ndr-standard', 304 source='gen_ndr/ndr_eventlog6.c', 305 vnum='0.0.1', 306 pc_files='ndr_standard.pc', 307 deps='''NDR_SECURITY NDR_LSA NDR_SAMR NDR_NETLOGON NDR_EVENTLOG NDR_DFS 308 NDR_NTSVCS NDR_SVCCTL NDR_INITSHUTDOWN NDR_WKSSVC NDR_SRVSVC NDR_WINREG 309 NDR_ECHO security NDR_DNS NDR_ATSVC''', 310 public_deps='ndr', 311 public_headers='gen_ndr/samr.h gen_ndr/ndr_samr.h gen_ndr/lsa.h gen_ndr/netlogon.h gen_ndr/atsvc.h gen_ndr/ndr_atsvc.h gen_ndr/ndr_svcctl.h gen_ndr/svcctl.h', 312 header_path='gen_ndr' 313 ) 374 source='gen_ndr/ndr_eventlog6.c', 375 vnum='0.0.1', 376 pc_files='ndr_standard.pc', 377 deps='''NDR_SECURITY NDR_LSA NDR_SAMR NDR_NETLOGON NDR_EVENTLOG NDR_DFS 378 NDR_NTSVCS NDR_SVCCTL NDR_INITSHUTDOWN NDR_WKSSVC NDR_SRVSVC NDR_WINREG 379 NDR_ECHO security NDR_DNS NDR_DNSP NDR_ATSVC NDR_SPOOLSS NDR_DSSETUP 380 NDR_SERVER_ID NDR_NOTIFY''', 381 public_deps='ndr', 382 public_headers='gen_ndr/samr.h gen_ndr/ndr_samr.h gen_ndr/lsa.h gen_ndr/netlogon.h gen_ndr/atsvc.h gen_ndr/ndr_atsvc.h gen_ndr/ndr_svcctl.h gen_ndr/svcctl.h', 383 header_path='gen_ndr' 384 ) 314 385 315 386 bld.SAMBA_SUBSYSTEM('NDR_XATTR', 316 source='ndr/ndr_xattr.c gen_ndr/ndr_xattr.c', 317 public_deps='ndr NDR_SECURITY' 318 ) 387 source='ndr/ndr_xattr.c gen_ndr/ndr_xattr.c', 388 public_deps='ndr NDR_SECURITY' 389 ) 390 391 bld.SAMBA_SUBSYSTEM('NDR_SMB2_LEASE_STRUCT', 392 source='gen_ndr/ndr_smb2_lease_struct.c', 393 public_deps='ndr', 394 public_headers='gen_ndr/smb2_lease_struct.h' 395 ) 319 396 320 397 bld.SAMBA_SUBSYSTEM('NDR_SCHANNEL', 321 source='ndr/ndr_schannel.c gen_ndr/ndr_schannel.c', 322 public_deps='ndr NDR_NBT' 323 ) 324 325 bld.SAMBA_SUBSYSTEM('NDR_NBT', 326 source='gen_ndr/ndr_nbt.c', 327 public_deps='ndr NDR_NBT_BUF NDR_SECURITY ndr-standard LIBCLI_NDR_NETLOGON', 328 public_headers='gen_ndr/nbt.h', 329 header_path='gen_ndr' 330 ) 398 source='ndr/ndr_schannel.c gen_ndr/ndr_schannel.c', 399 public_deps='ndr ndr_nbt' 400 ) 401 402 bld.SAMBA_LIBRARY('ndr_nbt', 403 source='gen_ndr/ndr_nbt.c ndr/ndr_nbt.c', 404 public_deps='ndr NDR_NBT_BUF NDR_SECURITY', 405 public_headers='gen_ndr/nbt.h gen_ndr/ndr_nbt.h ndr/ndr_nbt.h', 406 header_path=[ ('gen_ndr*', 'gen_ndr'), ('ndr*', 'ndr')], 407 pc_files='ndr_nbt.pc', 408 vnum='0.0.1' 409 ) 331 410 332 411 bld.SAMBA_SUBSYSTEM('NDR_BACKUPKEY', 333 334 335 412 source='ndr/ndr_backupkey.c gen_ndr/ndr_backupkey.c', 413 public_deps='ndr' 414 ) 336 415 337 416 bld.SAMBA_SUBSYSTEM('NDR_PREG', 338 339 340 417 source='gen_ndr/ndr_preg.c ndr/ndr_preg.c', 418 public_deps='ndr' 419 ) 341 420 342 421 bld.SAMBA_SUBSYSTEM('NDR_FILE_ID', 343 source='gen_ndr/ndr_file_id.c', 344 public_deps='ndr' 345 ) 422 source='gen_ndr/ndr_file_id.c', 423 public_deps='ndr' 424 ) 425 426 bld.SAMBA_SUBSYSTEM('NDR_MESSAGING', 427 source='gen_ndr/ndr_messaging.c', 428 public_deps='ndr NDR_SERVER_ID' 429 ) 346 430 347 431 bld.SAMBA_SUBSYSTEM('RPC_NDR_XATTR', 348 source='gen_ndr/ndr_xattr_c.c', 349 public_deps='NDR_XATTR dcerpc' 350 ) 432 source='gen_ndr/ndr_xattr_c.c', 433 public_deps='NDR_XATTR dcerpc-binding' 434 ) 435 436 bld.SAMBA_SUBSYSTEM('RPC_NDR_IDMAP', 437 source='gen_ndr/ndr_idmap_c.c', 438 public_deps='NDR_IDMAP dcerpc-binding' 439 ) 440 441 bld.SAMBA_SUBSYSTEM('RPC_NDR_SMB_ACL', 442 source='gen_ndr/ndr_smb_acl_c.c', 443 public_deps='NDR_SMB_ACL dcerpc-binding' 444 ) 351 445 352 446 bld.SAMBA_SUBSYSTEM('RPC_NDR_ROT', 353 354 public_deps='NDR_ROT dcerpc'355 447 source='gen_ndr/ndr_rot_c.c', 448 public_deps='NDR_ROT dcerpc-binding' 449 ) 356 450 357 451 bld.SAMBA_SUBSYSTEM('RPC_NDR_ATSVC', 358 359 public_deps='dcerpcNDR_ATSVC'360 452 source='gen_ndr/ndr_atsvc_c.c', 453 public_deps='dcerpc-binding NDR_ATSVC' 454 ) 361 455 362 456 bld.SAMBA_SUBSYSTEM('RPC_NDR_AUDIOSRV', 363 364 public_deps='NDR_AUDIOSRV dcerpc'365 457 source='gen_ndr/ndr_audiosrv_c.c', 458 public_deps='NDR_AUDIOSRV dcerpc-binding' 459 ) 366 460 367 461 bld.SAMBA_SUBSYSTEM('RPC_NDR_ECHO', 368 369 public_deps='dcerpcNDR_ECHO'370 462 source='gen_ndr/ndr_echo_c.c', 463 public_deps='dcerpc-binding NDR_ECHO' 464 ) 371 465 372 466 bld.SAMBA_SUBSYSTEM('RPC_NDR_DSBACKUP', 373 374 public_deps='dcerpcNDR_DSBACKUP'375 467 source='gen_ndr/ndr_dsbackup_c.c', 468 public_deps='dcerpc-binding NDR_DSBACKUP' 469 ) 376 470 377 471 bld.SAMBA_SUBSYSTEM('RPC_NDR_EFS', 378 379 public_deps='dcerpcNDR_EFS'380 472 source='gen_ndr/ndr_efs_c.c', 473 public_deps='dcerpc-binding NDR_EFS' 474 ) 381 475 382 476 bld.SAMBA_SUBSYSTEM('RPC_NDR_LSA', 383 384 public_deps='dcerpcndr-standard'385 477 source='gen_ndr/ndr_lsa_c.c', 478 public_deps='dcerpc-binding ndr-standard' 479 ) 386 480 387 481 bld.SAMBA_SUBSYSTEM('RPC_NDR_SAMR', 388 389 public_deps='dcerpcNDR_SAMR'390 482 source='gen_ndr/ndr_samr_c.c', 483 public_deps='dcerpc-binding NDR_SAMR' 484 ) 391 485 392 486 bld.SAMBA_SUBSYSTEM('RPC_NDR_DFS', 393 394 public_deps='dcerpcndr-standard'395 487 source='gen_ndr/ndr_dfs_c.c', 488 public_deps='dcerpc-binding ndr-standard' 489 ) 396 490 397 491 bld.SAMBA_SUBSYSTEM('RPC_NDR_FRSAPI', 398 399 public_deps='dcerpcNDR_FRSAPI'400 492 source='gen_ndr/ndr_frsapi_c.c', 493 public_deps='dcerpc-binding NDR_FRSAPI' 494 ) 401 495 402 496 bld.SAMBA_SUBSYSTEM('RPC_NDR_DRSUAPI', 403 404 public_deps='dcerpcNDR_DRSUAPI'405 497 source='gen_ndr/ndr_drsuapi_c.c', 498 public_deps='dcerpc-binding NDR_DRSUAPI' 499 ) 406 500 407 501 bld.SAMBA_SUBSYSTEM('RPC_NDR_DRSBLOBS', 408 409 public_deps='dcerpcNDR_DRSBLOBS'410 502 source='gen_ndr/ndr_drsblobs_c.c', 503 public_deps='dcerpc-binding NDR_DRSBLOBS' 504 ) 411 505 412 506 bld.SAMBA_SUBSYSTEM('RPC_NDR_POLICYAGENT', 413 414 public_deps='dcerpcNDR_POLICYAGENT'415 507 source='gen_ndr/ndr_policyagent_c.c', 508 public_deps='dcerpc-binding NDR_POLICYAGENT' 509 ) 416 510 417 511 bld.SAMBA_SUBSYSTEM('RPC_NDR_UNIXINFO', 418 419 public_deps='dcerpcNDR_UNIXINFO'420 512 source='gen_ndr/ndr_unixinfo_c.c', 513 public_deps='dcerpc-binding NDR_UNIXINFO' 514 ) 421 515 422 516 bld.SAMBA_SUBSYSTEM('RPC_NDR_BROWSER', 423 424 public_deps='dcerpcNDR_BROWSER'425 517 source='gen_ndr/ndr_browser_c.c', 518 public_deps='dcerpc-binding NDR_BROWSER' 519 ) 426 520 427 521 bld.SAMBA_SUBSYSTEM('RPC_NDR_SPOOLSS', 428 429 public_deps='dcerpcNDR_SPOOLSS'430 522 source='gen_ndr/ndr_spoolss_c.c', 523 public_deps='dcerpc-binding NDR_SPOOLSS' 524 ) 431 525 432 526 bld.SAMBA_SUBSYSTEM('RPC_NDR_NBT', 433 434 public_deps='dcerpc NDR_NBT'435 527 source='gen_ndr/ndr_nbt_c.c', 528 public_deps='dcerpc-binding ndr_nbt' 529 ) 436 530 437 531 bld.SAMBA_SUBSYSTEM('RPC_NDR_WKSSVC', 438 439 public_deps='dcerpcndr-standard'440 532 source='gen_ndr/ndr_wkssvc_c.c', 533 public_deps='dcerpc-binding ndr-standard' 534 ) 441 535 442 536 bld.SAMBA_SUBSYSTEM('RPC_NDR_SRVSVC', 443 444 public_deps='dcerpcNDR_SRVSVC'445 537 source='gen_ndr/ndr_srvsvc_c.c', 538 public_deps='dcerpc-binding NDR_SRVSVC' 539 ) 446 540 447 541 bld.SAMBA_SUBSYSTEM('RPC_NDR_SVCCTL', 448 449 public_deps='dcerpcndr-standard',450 451 452 542 source='gen_ndr/ndr_svcctl_c.c', 543 public_deps='dcerpc-binding ndr-standard', 544 public_headers='gen_ndr/ndr_svcctl_c.h ndr/ndr_svcctl.h', 545 header_path=[ ('gen_ndr*', 'gen_ndr'), ('ndr*', 'ndr')] 546 ) 453 547 454 548 bld.SAMBA_SUBSYSTEM('RPC_NDR_EVENTLOG', 455 456 public_deps='dcerpcndr-standard'457 549 source='gen_ndr/ndr_eventlog_c.c', 550 public_deps='dcerpc-binding ndr-standard' 551 ) 458 552 459 553 bld.SAMBA_SUBSYSTEM('RPC_NDR_EPMAPPER', 460 461 462 554 source='gen_ndr/ndr_epmapper_c.c', 555 public_deps='tevent NDR_EPMAPPER' 556 ) 463 557 464 558 bld.SAMBA_SUBSYSTEM('RPC_NDR_DBGIDL', 465 466 public_deps='dcerpcNDR_DBGIDL'467 559 source='gen_ndr/ndr_dbgidl_c.c', 560 public_deps='dcerpc-binding NDR_DBGIDL' 561 ) 468 562 469 563 bld.SAMBA_SUBSYSTEM('RPC_NDR_DSSETUP', 470 471 public_deps='dcerpcNDR_DSSETUP'472 564 source='gen_ndr/ndr_dssetup_c.c', 565 public_deps='dcerpc-binding NDR_DSSETUP' 566 ) 473 567 474 568 bld.SAMBA_SUBSYSTEM('RPC_NDR_MSGSVC', 475 476 public_deps='dcerpcNDR_MSGSVC'477 569 source='gen_ndr/ndr_msgsvc_c.c', 570 public_deps='dcerpc-binding NDR_MSGSVC' 571 ) 478 572 479 573 bld.SAMBA_SUBSYSTEM('RPC_NDR_WINREG', 480 481 public_deps='dcerpcndr-standard'482 574 source='gen_ndr/ndr_winreg_c.c', 575 public_deps='dcerpc-binding ndr-standard' 576 ) 483 577 484 578 bld.SAMBA_SUBSYSTEM('RPC_NDR_INITSHUTDOWN', 485 486 public_deps='dcerpcndr-standard'487 579 source='gen_ndr/ndr_initshutdown_c.c', 580 public_deps='dcerpc-binding ndr-standard' 581 ) 488 582 489 583 bld.SAMBA_SUBSYSTEM('RPC_NDR_MGMT', 490 491 492 584 source='gen_ndr/ndr_mgmt_c.c', 585 deps='tevent NDR_MGMT' 586 ) 493 587 494 588 bld.SAMBA_SUBSYSTEM('RPC_NDR_OXIDRESOLVER', 495 496 public_deps='dcerpcNDR_OXIDRESOLVER'497 589 source='gen_ndr/ndr_oxidresolver_c.c', 590 public_deps='dcerpc-binding NDR_OXIDRESOLVER' 591 ) 498 592 499 593 bld.SAMBA_SUBSYSTEM('RPC_NDR_REMACT', 500 501 public_deps='dcerpcNDR_REMACT'502 594 source='gen_ndr/ndr_remact_c.c', 595 public_deps='dcerpc-binding NDR_REMACT' 596 ) 503 597 504 598 bld.SAMBA_SUBSYSTEM('RPC_NDR_WZCSVC', 505 506 public_deps='dcerpcNDR_WZCSVC'507 599 source='gen_ndr/ndr_wzcsvc_c.c', 600 public_deps='dcerpc-binding NDR_WZCSVC' 601 ) 508 602 509 603 bld.SAMBA_SUBSYSTEM('RPC_NDR_W32TIME', 510 511 public_deps='dcerpcNDR_W32TIME'512 604 source='gen_ndr/ndr_w32time_c.c', 605 public_deps='dcerpc-binding NDR_W32TIME' 606 ) 513 607 514 608 bld.SAMBA_SUBSYSTEM('RPC_NDR_SCERPC', 515 source='gen_ndr/ndr_scerpc_c.c', 516 public_deps='dcerpc NDR_SCERPC' 517 ) 609 source='gen_ndr/ndr_scerpc_c.c', 610 public_deps='dcerpc-binding NDR_SCERPC' 611 ) 612 613 bld.SAMBA_SUBSYSTEM('RPC_NDR_SERVER_ID', 614 source='gen_ndr/ndr_server_id_c.c', 615 public_deps='dcerpc-binding NDR_SERVER_ID' 616 ) 518 617 519 618 bld.SAMBA_SUBSYSTEM('RPC_NDR_NTSVCS', 520 521 public_deps='dcerpcndr-standard'522 619 source='gen_ndr/ndr_ntsvcs_c.c', 620 public_deps='dcerpc-binding ndr-standard' 621 ) 523 622 524 623 bld.SAMBA_SUBSYSTEM('RPC_NDR_NETLOGON', 525 526 527 624 source='gen_ndr/ndr_netlogon_c.c', 625 public_deps='ndr-standard tevent' 626 ) 528 627 529 628 bld.SAMBA_SUBSYSTEM('RPC_NDR_TRKWKS', 530 531 public_deps='dcerpcNDR_TRKWKS'532 629 source='gen_ndr/ndr_trkwks_c.c', 630 public_deps='dcerpc-binding NDR_TRKWKS' 631 ) 533 632 534 633 bld.SAMBA_SUBSYSTEM('RPC_NDR_KEYSVC', 535 536 public_deps='dcerpcNDR_KEYSVC'537 634 source='gen_ndr/ndr_keysvc_c.c', 635 public_deps='dcerpc-binding NDR_KEYSVC' 636 ) 538 637 539 638 bld.SAMBA_SUBSYSTEM('RPC_NDR_BACKUPKEY', 540 source='gen_ndr/ndr_backupkey_c.c', 541 public_deps='dcerpc NDR_BACKUPKEY' 542 ) 543 544 bld.SAMBA_SUBSYSTEM('RPC_NDR_DNSP', 545 source='gen_ndr/ndr_dnsp_c.c', 546 public_deps='dcerpc NDR_DNSP' 547 ) 639 source='gen_ndr/ndr_backupkey_c.c', 640 public_deps='dcerpc-binding NDR_BACKUPKEY' 641 ) 642 643 bld.SAMBA_SUBSYSTEM('RPC_NDR_DNSSERVER', 644 source='gen_ndr/ndr_dnsserver_c.c', 645 public_deps='dcerpc-binding ndr-standard' 646 ) 647 648 bld.SAMBA_SUBSYSTEM('NDR_IOCTL', 649 source='gen_ndr/ndr_ioctl.c ndr/ndr_ioctl.c', 650 public_deps='ndr' 651 ) 652 653 bld.SAMBA_SUBSYSTEM('RPC_NDR_FSRVP', 654 source='gen_ndr/ndr_fsrvp_c.c', 655 public_deps='dcerpc-binding NDR_FSRVP' 656 ) 657 658 bld.SAMBA_SUBSYSTEM('RPC_NDR_WITNESS', 659 source='gen_ndr/ndr_witness_c.c', 660 public_deps='dcerpc-binding NDR_WITNESS' 661 ) 662 663 bld.SAMBA_SUBSYSTEM('RPC_NDR_CLUSAPI', 664 source='gen_ndr/ndr_clusapi_c.c', 665 public_deps='dcerpc-binding NDR_CLUSAPI' 666 ) 667 668 bld.SAMBA_SUBSYSTEM('RPC_NDR_MDSSVC', 669 source='gen_ndr/ndr_mdssvc_c.c', 670 public_deps='dcerpc-binding NDR_MDSSVC' 671 ) 548 672 549 673 # a grouping library for NDR subsystems that may be used by more than one target 550 674 bld.SAMBA_LIBRARY('ndr-samba', 551 source=[], 552 deps='NDR_DRSBLOBS NDR_DRSUAPI NDR_IDMAP NDR_NTLMSSP NDR_SCHANNEL NDR_MGMT NDR_DNSP NDR_EPMAPPER NDR_XATTR NDR_UNIXINFO NDR_NAMED_PIPE_AUTH NDR_DCOM', 553 private_library=True, 554 grouping_library=True 555 ) 675 source=[], 676 deps='''NDR_DRSBLOBS NDR_DRSUAPI NDR_IDMAP NDR_NTLMSSP NDR_NEGOEX NDR_SCHANNEL NDR_MGMT 677 NDR_DNSSERVER NDR_EPMAPPER NDR_XATTR NDR_UNIXINFO NDR_NAMED_PIPE_AUTH NDR_DCOM 678 NDR_NTPRINTING NDR_FSRVP NDR_WITNESS NDR_MDSSVC NDR_OPEN_FILES NDR_SMBXSRV''', 679 private_library=True, 680 grouping_library=True 681 ) 556 682 557 683 # a grouping library for RPC_NDR subsystems that may be used by more than one target 558 684 bld.SAMBA_LIBRARY('dcerpc-samba', 559 source=[], 560 deps='RPC_NDR_DRSUAPI RPC_NDR_LSA RPC_NDR_WINREG', 561 private_library=True, 562 grouping_library=True 563 ) 685 source='', 686 deps='''RPC_NDR_LSA RPC_NDR_SAMR RPC_NDR_NETLOGON RPC_NDR_EVENTLOG 687 RPC_NDR_DFS RPC_NDR_NTSVCS RPC_NDR_SVCCTL RPC_NDR_INITSHUTDOWN 688 RPC_NDR_WKSSVC RPC_NDR_SRVSVC RPC_NDR_WINREG RPC_NDR_ECHO RPC_NDR_EPMAPPER 689 RPC_NDR_ATSVC RPC_NDR_SPOOLSS RPC_NDR_DNSSERVER''', 690 public_deps='ndr-standard', 691 private_library=True, 692 grouping_library=True 693 ) 564 694 565 695 bld.SAMBA_LIBRARY('ndr', 566 source='ndr/ndr_string.c ndr/ndr_basic.c ndr/uuid.c ndr/ndr.c ndr/ndr_misc.c gen_ndr/ndr_misc.c', 567 pc_files='ndr.pc', 568 public_deps='errors talloc samba-util', 569 public_headers='gen_ndr/misc.h gen_ndr/ndr_misc.h ndr/libndr.h:ndr.h', 570 header_path= [ ( '*gen_ndr*', 'gen_ndr' ) ], 571 depends_on='PIDL_MISC', 572 vnum='0.0.1' 573 ) 574 575 bld.SAMBA_LIBRARY('rpccommon', 576 source='rpc/dcerpc_error.c rpc/binding.c rpc/dcerpc_util.c rpc/binding_handle.c', 577 deps='ndr tevent NDR_DCERPC LIBTSOCKET', 578 private_library=True) 696 source='ndr/ndr_string.c ndr/ndr_basic.c ndr/uuid.c ndr/ndr.c ndr/ndr_misc.c gen_ndr/ndr_misc.c ndr/util.c', 697 pc_files='ndr.pc', 698 public_deps='samba-errors talloc samba-util', 699 public_headers='gen_ndr/misc.h gen_ndr/ndr_misc.h ndr/libndr.h:ndr.h', 700 header_path= [('*gen_ndr*', 'gen_ndr')], 701 vnum='0.0.5', 702 abi_directory='ABI', 703 abi_match='ndr_* GUID_*', 704 ) 705 706 bld.SAMBA_LIBRARY('dcerpc-binding', 707 source='rpc/dcerpc_error.c rpc/binding.c rpc/dcerpc_util.c rpc/binding_handle.c', 708 deps='ndr tevent NDR_DCERPC LIBTSOCKET tevent-util', 709 pc_files=[], 710 public_headers='rpc/rpc_common.h', 711 vnum='0.0.1') 712 713 bld.SAMBA_SUBSYSTEM('NDR_WINBIND', 714 source='gen_ndr/ndr_winbind.c', 715 public_deps='ndr NDR_LSA' 716 ) 717 718 bld.SAMBA_SUBSYSTEM('RPC_NDR_WINBIND', 719 source='gen_ndr/ndr_winbind_c.c', 720 public_deps='dcerpc NDR_WINBIND' 721 ) 722 723 bld.SAMBA3_SUBSYSTEM('SRV_NDR_WINBIND', 724 source='gen_ndr/srv_winbind.c', 725 public_deps='NDR_WINBIND' 726 ) 727 728 bld.SAMBA_SUBSYSTEM('NDR_FSRVP_STATE', 729 source='gen_ndr/ndr_fsrvp_state.c', 730 public_deps='ndr' 731 )
Note:
See TracChangeset
for help on using the changeset viewer.