libcli:security: allow spaces after BAD:
[Samba.git] / source3 / librpc / idl / ads.idl
blob381447a1a2969b17f4162f5f5f1ce7ea988b82ea
1 #include "idl_types.h"
2 #include "config.h"
4 /*
5 ads interface definition
6 */
8 import "nbt.idl";
10 cpp_quote("#include <system/network.h>")
13 pointer_default(unique)
15 interface ads
17 typedef [public] enum {
18 ADS_SASLWRAP_TYPE_PLAIN = 1,
19 ADS_SASLWRAP_TYPE_SIGN = 2,
20 ADS_SASLWRAP_TYPE_SEAL = 4
21 } ads_saslwrap_type;
23 /* ads auth control flags */
24 typedef [public] bitmap {
25 ADS_AUTH_NO_BIND = 0x0002,
26 ADS_AUTH_ANON_BIND = 0x0004,
27 ADS_AUTH_SASL_SIGN = 0x0020,
28 ADS_AUTH_SASL_SEAL = 0x0040,
29 ADS_AUTH_SASL_FORCE = 0x0080,
30 ADS_AUTH_SASL_STARTTLS = 0x0200,
31 ADS_AUTH_SASL_LDAPS = 0x0400,
32 ADS_AUTH_GENERATE_KRB5_CONFIG = 0x0800
33 } ads_auth_flags;
35 const int ADS_SASL_WRAPPING_IN_MAX_WRAPPED = 0x0FFFFFFF;
36 const int ADS_SASL_WRAPPING_OUT_MAX_WRAPPED = 0x00A00000;
38 typedef [nopull,nopush] struct {
39 string realm;
40 string workgroup;
41 string ldap_server;
42 boolean8 gc; /* Is this a global catalog server? */
43 boolean8 no_fallback; /* Bail if the ldap_server is not available */
44 } ads_server;
46 typedef [nopull,nopush] struct {
47 string kdc_server;
48 ads_auth_flags flags;
49 NTTIME expire_time;
50 [ignore] struct ads_reconnect_state *reconnect_state;
51 } ads_auth;
53 typedef [nopull,nopush] struct {
54 nbt_server_type flags; /* cldap flags identifying the services. */
55 string workgroup;
56 string realm;
57 string bind_path;
58 string ldap_server_name;
59 string server_site_name;
60 string client_site_name;
61 time_t current_time;
62 int time_offset;
63 string schema_path;
64 string config_path;
65 int ldap_page_size;
66 } ads_config;
68 typedef [nopull,nopush] struct {
69 uint32 ofs;
70 uint32 needed;
71 uint32 left;
72 uint32 max_wrapped;
73 uint32 min_wrapped;
74 uint32 size;
75 uint8 *buf;
76 } ads_ldap_buf_in;
78 typedef [nopull,nopush] struct {
79 uint32 ofs;
80 uint32 left;
81 uint32 max_unwrapped;
82 uint32 sig_size;
83 uint32 size;
84 uint8 *buf;
85 } ads_ldap_buf_out;
87 typedef [nopull,nopush] struct {
88 ads_saslwrap_type wrap_type;
89 [ignore] ads_saslwrap_ops *wrap_ops;
90 #ifdef HAVE_ADS
91 [ignore] struct sockbuf_io_desc *sbiod; /* lowlevel state for LDAP wrapping */
92 #endif /* HAVE_ADS */
93 [ignore] TALLOC_CTX *mem_ctx;
94 [ignore] void *wrap_private_data;
95 ads_ldap_buf_in in;
96 ads_ldap_buf_out out;
97 } ads_saslwrap;
99 typedef [nopull,nopush] struct {
100 [ignore] TALLOC_CTX *mem_ctx;
101 [ignore] timeval endtime;
102 #ifdef HAVE_ADS
103 [ignore] struct sockbuf_io_desc *sbiod; /* lowlevel state for LDAP wrapping */
104 [ignore] struct tstream_tls_params *tls_params;
105 [ignore] struct tstream_tls_sync *tls_sync;
106 #endif /* HAVE_ADS */
107 } ads_tlswrap;
109 typedef [nopull,nopush] struct {
110 [ignore] ldap *ld;
111 sockaddr_storage ss; /* the ip of the active connection, if any */
112 time_t last_attempt; /* last attempt to reconnect, monotonic clock */
113 int port;
114 } ads_ldap;
116 typedef [public,nopull,nopush] struct {
117 /* info needed to find the server */
118 ads_server server;
120 /* info needed to authenticate */
121 ads_auth auth;
123 /* info derived from the servers config */
124 ads_config config;
126 #ifdef HAVE_ADS
127 ads_saslwrap ldap_wrap_data;
128 ads_tlswrap ldap_tls_data;
129 /* info about the current LDAP connection */
130 ads_ldap ldap;
131 #endif /* HAVE_ADS */
133 } ads_struct;