s3:libads: avoid changing ADS->server.workgroup
[samba.git] / source3 / librpc / idl / ads.idl
blobd10e5b4dc77e8b5b6b2eebc364a534fb3d85a6bf
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_DISABLE_KERBEROS = 0x0001,
26 ADS_AUTH_NO_BIND = 0x0002,
27 ADS_AUTH_ANON_BIND = 0x0004,
28 ADS_AUTH_SIMPLE_BIND = 0x0008,
29 ADS_AUTH_ALLOW_NTLMSSP = 0x0010,
30 ADS_AUTH_SASL_SIGN = 0x0020,
31 ADS_AUTH_SASL_SEAL = 0x0040,
32 ADS_AUTH_SASL_FORCE = 0x0080,
33 ADS_AUTH_USER_CREDS = 0x0100
34 } ads_auth_flags;
36 const int ADS_SASL_WRAPPING_IN_MAX_WRAPPED = 0x0FFFFFFF;
37 const int ADS_SASL_WRAPPING_OUT_MAX_WRAPPED = 0x00A00000;
39 typedef [nopull,nopush] struct {
40 string realm;
41 string workgroup;
42 string ldap_server;
43 boolean8 gc; /* Is this a global catalog server? */
44 boolean8 no_fallback; /* Bail if the ldap_server is not available */
45 } ads_server;
47 typedef [nopull,nopush] struct {
48 string realm;
49 string password;
50 string user_name;
51 string kdc_server;
52 ads_auth_flags flags;
53 int time_offset;
54 string ccache_name;
55 time_t tgt_expire;
56 time_t tgs_expire;
57 time_t renewable;
58 } ads_auth;
60 typedef [nopull,nopush] struct {
61 nbt_server_type flags; /* cldap flags identifying the services. */
62 string workgroup;
63 string realm;
64 string bind_path;
65 string ldap_server_name;
66 string server_site_name;
67 string client_site_name;
68 time_t current_time;
69 string schema_path;
70 string config_path;
71 int ldap_page_size;
72 } ads_config;
74 typedef [nopull,nopush] struct {
75 uint32 ofs;
76 uint32 needed;
77 uint32 left;
78 uint32 max_wrapped;
79 uint32 min_wrapped;
80 uint32 size;
81 uint8 *buf;
82 } ads_ldap_buf_in;
84 typedef [nopull,nopush] struct {
85 uint32 ofs;
86 uint32 left;
87 uint32 max_unwrapped;
88 uint32 sig_size;
89 uint32 size;
90 uint8 *buf;
91 } ads_ldap_buf_out;
93 typedef [nopull,nopush] struct {
94 ads_saslwrap_type wrap_type;
95 [ignore] ads_saslwrap_ops *wrap_ops;
96 #ifdef HAVE_LDAP_SASL_WRAPPING
97 [ignore] Sockbuf_IO_Desc *sbiod; /* lowlevel state for LDAP wrapping */
98 #endif /* HAVE_LDAP_SASL_WRAPPING */
99 [ignore] TALLOC_CTX *mem_ctx;
100 [ignore] void *wrap_private_data;
101 ads_ldap_buf_in in;
102 ads_ldap_buf_out out;
103 } ads_saslwrap;
105 typedef [nopull,nopush] struct {
106 [ignore] ldap *ld;
107 sockaddr_storage ss; /* the ip of the active connection, if any */
108 time_t last_attempt; /* last attempt to reconnect, monotonic clock */
109 int port;
110 } ads_ldap;
112 typedef [public,nopull,nopush] struct {
113 /* info needed to find the server */
114 ads_server server;
116 /* info needed to authenticate */
117 ads_auth auth;
119 /* info derived from the servers config */
120 ads_config config;
122 #ifdef HAVE_LDAP
123 ads_saslwrap ldap_wrap_data;
124 /* info about the current LDAP connection */
125 ads_ldap ldap;
126 #endif /* HAVE_LDAP */
128 } ads_struct;