s3-smbd: Added a become_user_by_session() function.
[Samba.git] / librpc / idl / schannel.idl
blobb597a4395d28d9d52554bb35b94a12e336206945
1 #include "idl_types.h"
3 /*
4 schannel structures
5 */
7 import "netlogon.idl", "nbt.idl";
10 pointer_default(unique),
11 helper("../librpc/ndr/ndr_schannel.h")
13 interface schannel
15 /* this structure is used internally in the NETLOGON server */
17 typedef [public,flag(NDR_PAHEX)] struct {
18 netr_NegotiateFlags negotiate_flags;
19 uint8 session_key[16];
20 uint32 sequence;
21 netr_Credential seed;
22 netr_Credential client;
23 netr_Credential server;
24 netr_SchannelType secure_channel_type;
25 [string,charset(UTF8)] uint8 computer_name[];
26 [string,charset(UTF8)] uint8 account_name[];
27 dom_sid *sid;
28 } netlogon_creds_CredentialState;
30 /* MS-NRPC 2.2.1.3.1 NL_AUTH_MESSAGE */
32 typedef [v1_enum] enum {
33 NL_NEGOTIATE_REQUEST = 0x00000000,
34 NL_NEGOTIATE_RESPONSE = 0x00000001
35 } NL_AUTH_MESSAGE_TYPE;
37 typedef [bitmap32bit] bitmap {
38 NL_FLAG_OEM_NETBIOS_DOMAIN_NAME = 0x00000001,
39 NL_FLAG_OEM_NETBIOS_COMPUTER_NAME = 0x00000002,
40 NL_FLAG_UTF8_DNS_DOMAIN_NAME = 0x00000004,
41 NL_FLAG_UTF8_DNS_HOST_NAME = 0x00000008,
42 NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME = 0x00000010
43 } NL_AUTH_MESSAGE_FLAGS;
45 typedef [public,nodiscriminant,noprint] union {
46 [case (NL_FLAG_OEM_NETBIOS_DOMAIN_NAME)] astring a;
47 [case (NL_FLAG_OEM_NETBIOS_COMPUTER_NAME)] astring a;
48 [case (NL_FLAG_UTF8_DNS_DOMAIN_NAME)] nbt_string u;
49 [case (NL_FLAG_UTF8_DNS_HOST_NAME)] nbt_string u;
50 [case (NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME)] nbt_string u;
51 [default] ;
52 } NL_AUTH_MESSAGE_BUFFER;
54 typedef [public,nodiscriminant,noprint] union {
55 [case (NL_NEGOTIATE_RESPONSE)] uint32 dummy;
56 [default] ;
57 } NL_AUTH_MESSAGE_BUFFER_REPLY;
59 typedef [public,flag(NDR_PAHEX)] struct {
60 NL_AUTH_MESSAGE_TYPE MessageType;
61 NL_AUTH_MESSAGE_FLAGS Flags;
62 [switch_is(Flags & NL_FLAG_OEM_NETBIOS_DOMAIN_NAME)] NL_AUTH_MESSAGE_BUFFER oem_netbios_domain;
63 [switch_is(Flags & NL_FLAG_OEM_NETBIOS_COMPUTER_NAME)] NL_AUTH_MESSAGE_BUFFER oem_netbios_computer;
64 [switch_is(Flags & NL_FLAG_UTF8_DNS_DOMAIN_NAME)] NL_AUTH_MESSAGE_BUFFER utf8_dns_domain;
65 [switch_is(Flags & NL_FLAG_UTF8_DNS_HOST_NAME)] NL_AUTH_MESSAGE_BUFFER utf8_dns_host;
66 [switch_is(Flags & NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME)] NL_AUTH_MESSAGE_BUFFER utf8_netbios_computer;
67 [switch_is(MessageType & NL_NEGOTIATE_RESPONSE)] NL_AUTH_MESSAGE_BUFFER_REPLY Buffer;
68 } NL_AUTH_MESSAGE;
70 /* MS-NRPC 2.2.1.3.2 NL_AUTH_SIGNATURE */
72 typedef enum {
73 NL_SIGN_HMAC_SHA256 = 0x0013,
74 NL_SIGN_HMAC_MD5 = 0x0077
75 } NL_SIGNATURE_ALGORITHM;
77 typedef enum {
78 NL_SEAL_AES128 = 0x001A,
79 NL_SEAL_RC4 = 0x007A,
80 NL_SEAL_NONE = 0xFFFF
81 } NL_SEAL_ALGORITHM;
83 typedef [public,flag(NDR_PAHEX)] struct {
84 [value(NL_SIGN_HMAC_MD5)] NL_SIGNATURE_ALGORITHM SignatureAlgorithm;
85 NL_SEAL_ALGORITHM SealAlgorithm;
86 uint16 Pad;
87 uint16 Flags;
88 uint8 SequenceNumber[8];
89 uint8 Checksum[8];
90 uint8 Confounder[8];
91 } NL_AUTH_SIGNATURE;
93 const int NL_AUTH_SIGNATURE_SIZE = 0x20;
95 /* MS-NRPC 2.2.1.3.3 NL_AUTH_SHA2_SIGNATURE */
97 typedef [public,flag(NDR_PAHEX)] struct {
98 [value(NL_SIGN_HMAC_SHA256)] NL_SIGNATURE_ALGORITHM SignatureAlgorithm;
99 NL_SEAL_ALGORITHM SealAlgorithm;
100 uint16 Pad;
101 uint16 Flags;
102 uint8 SequenceNumber[8];
103 uint8 Checksum[32];
104 uint8 Confounder[8];
105 } NL_AUTH_SHA2_SIGNATURE;