1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
#include "idl_types.h"
#include "config.h"
/*
ads interface definition
*/
import "nbt.idl";
cpp_quote("#include <system/network.h>")
[
pointer_default(unique)
]
interface ads
{
typedef [public] enum {
ADS_SASLWRAP_TYPE_PLAIN = 1,
ADS_SASLWRAP_TYPE_SIGN = 2,
ADS_SASLWRAP_TYPE_SEAL = 4
} ads_saslwrap_type;
/* ads auth control flags */
typedef [public] bitmap {
ADS_AUTH_DISABLE_KERBEROS = 0x0001,
ADS_AUTH_NO_BIND = 0x0002,
ADS_AUTH_ANON_BIND = 0x0004,
ADS_AUTH_SIMPLE_BIND = 0x0008,
ADS_AUTH_ALLOW_NTLMSSP = 0x0010,
ADS_AUTH_SASL_SIGN = 0x0020,
ADS_AUTH_SASL_SEAL = 0x0040,
ADS_AUTH_SASL_FORCE = 0x0080,
ADS_AUTH_USER_CREDS = 0x0100
} ads_auth_flags;
const int ADS_SASL_WRAPPING_IN_MAX_WRAPPED = 0x0FFFFFFF;
const int ADS_SASL_WRAPPING_OUT_MAX_WRAPPED = 0x00A00000;
typedef [nopull,nopush] struct {
string realm;
string workgroup;
string ldap_server;
boolean8 gc; /* Is this a global catalog server? */
boolean8 no_fallback; /* Bail if the ldap_server is not available */
} ads_server;
typedef [nopull,nopush] struct {
string realm;
string password;
string user_name;
string kdc_server;
ads_auth_flags flags;
int time_offset;
string ccache_name;
time_t tgt_expire;
time_t tgs_expire;
time_t renewable;
} ads_auth;
typedef [nopull,nopush] struct {
nbt_server_type flags; /* cldap flags identifying the services. */
string workgroup;
string realm;
string bind_path;
string ldap_server_name;
string server_site_name;
string client_site_name;
time_t current_time;
string schema_path;
string config_path;
int ldap_page_size;
} ads_config;
typedef [nopull,nopush] struct {
uint32 ofs;
uint32 needed;
uint32 left;
uint32 max_wrapped;
uint32 min_wrapped;
uint32 size;
uint8 *buf;
} ads_ldap_buf_in;
typedef [nopull,nopush] struct {
uint32 ofs;
uint32 left;
uint32 max_unwrapped;
uint32 sig_size;
uint32 size;
uint8 *buf;
} ads_ldap_buf_out;
typedef [nopull,nopush] struct {
ads_saslwrap_type wrap_type;
[ignore] ads_saslwrap_ops *wrap_ops;
#ifdef HAVE_LDAP_SASL_WRAPPING
[ignore] Sockbuf_IO_Desc *sbiod; /* lowlevel state for LDAP wrapping */
#endif /* HAVE_LDAP_SASL_WRAPPING */
[ignore] TALLOC_CTX *mem_ctx;
[ignore] void *wrap_private_data;
ads_ldap_buf_in in;
ads_ldap_buf_out out;
} ads_saslwrap;
typedef [nopull,nopush] struct {
[ignore] ldap *ld;
sockaddr_storage ss; /* the ip of the active connection, if any */
time_t last_attempt; /* last attempt to reconnect, monotonic clock */
int port;
} ads_ldap;
typedef [public,nopull,nopush] struct {
/* info needed to find the server */
ads_server server;
/* info needed to authenticate */
ads_auth auth;
/* info derived from the servers config */
ads_config config;
#ifdef HAVE_LDAP
ads_saslwrap ldap_wrap_data;
/* info about the current LDAP connection */
ads_ldap ldap;
#endif /* HAVE_LDAP */
} ads_struct;
}
|