example: Remove outdated config files from tridge
[Samba.git] / source3 / include / ads.h
blob6c9e57b9ed0ca8796e576b9c6ec83f9f09d01a3e
1 #ifndef _INCLUDE_ADS_H_
2 #define _INCLUDE_ADS_H_
3 /*
4 header for ads (active directory) library routines
6 basically this is a wrapper around ldap
7 */
9 #include "libads/ads_status.h"
10 #include "smb_ldap.h"
11 #include "librpc/gen_ndr/ads.h"
13 struct ads_saslwrap;
15 struct ads_saslwrap_ops {
16 const char *name;
17 ADS_STATUS (*wrap)(struct ads_saslwrap *, uint8_t *buf, uint32_t len);
18 ADS_STATUS (*unwrap)(struct ads_saslwrap *);
19 void (*disconnect)(struct ads_saslwrap *);
22 typedef struct ads_struct ADS_STRUCT;
24 #ifdef HAVE_ADS
25 typedef LDAPMod **ADS_MODLIST;
26 #else
27 typedef void **ADS_MODLIST;
28 #endif
30 /* time between reconnect attempts */
31 #define ADS_RECONNECT_TIME 5
33 /* ldap control oids */
34 #define ADS_PAGE_CTL_OID "1.2.840.113556.1.4.319"
35 #define ADS_NO_REFERRALS_OID "1.2.840.113556.1.4.1339"
36 #define ADS_SERVER_SORT_OID "1.2.840.113556.1.4.473"
37 #define ADS_PERMIT_MODIFY_OID "1.2.840.113556.1.4.1413"
38 #define ADS_ASQ_OID "1.2.840.113556.1.4.1504"
39 #define ADS_EXTENDED_DN_OID "1.2.840.113556.1.4.529"
40 #define ADS_SD_FLAGS_OID "1.2.840.113556.1.4.801"
42 /* ldap bitwise searches */
43 #define ADS_LDAP_MATCHING_RULE_BIT_AND "1.2.840.113556.1.4.803"
44 #define ADS_LDAP_MATCHING_RULE_BIT_OR "1.2.840.113556.1.4.804"
46 #define ADS_PINGS 0x0000FFFF /* Ping response */
48 enum ads_extended_dn_flags {
49 ADS_EXTENDED_DN_HEX_STRING = 0,
50 ADS_EXTENDED_DN_STRING = 1 /* not supported on win2k */
53 /* this is probably not very well suited to pass other controls generically but
54 * is good enough for the extended dn control where it is only used for atm */
56 typedef struct {
57 const char *control;
58 int val;
59 int critical;
60 } ads_control;
62 #include "libads/ads_proto.h"
64 #ifdef HAVE_LDAP
65 #include "libads/ads_ldap_protos.h"
66 #endif
68 #include "libads/kerberos_proto.h"
70 #define ADS_TALLOC_CONST_FREE(PTR) do { talloc_free(discard_const(PTR)); PTR = NULL; } while (0);
72 #endif /* _INCLUDE_ADS_H_ */