1 #ifndef _INCLUDE_ADS_H_
2 #define _INCLUDE_ADS_H_
4 header for ads (active directory) library routines
6 basically this is a wrapper around ldap
9 #include "libads/ads_status.h"
11 #include "librpc/gen_ndr/ads.h"
15 struct ads_saslwrap_ops
{
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
;
25 typedef LDAPMod
**ADS_MODLIST
;
27 typedef void **ADS_MODLIST
;
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 */
62 #include "libads/ads_proto.h"
65 #include "libads/ads_ldap_protos.h"
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_ */