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 struct cli_credentials
;
10 struct ads_reconnect_state
;
12 #include "libads/ads_status.h"
14 #include "librpc/gen_ndr/ads.h"
18 struct ads_saslwrap_ops
{
20 ADS_STATUS (*wrap
)(struct ads_saslwrap
*, uint8_t *buf
, uint32_t len
);
21 ADS_STATUS (*unwrap
)(struct ads_saslwrap
*);
22 void (*disconnect
)(struct ads_saslwrap
*);
25 struct ads_reconnect_state
{
26 NTSTATUS (*fn
)(struct ads_struct
*ads
,
29 struct cli_credentials
**creds
);
33 typedef struct ads_struct ADS_STRUCT
;
36 typedef LDAPMod
**ADS_MODLIST
;
38 typedef void **ADS_MODLIST
;
41 /* time between reconnect attempts */
42 #define ADS_RECONNECT_TIME 5
44 /* ldap control oids */
45 #define ADS_PAGE_CTL_OID "1.2.840.113556.1.4.319"
46 #define ADS_NO_REFERRALS_OID "1.2.840.113556.1.4.1339"
47 #define ADS_SERVER_SORT_OID "1.2.840.113556.1.4.473"
48 #define ADS_PERMIT_MODIFY_OID "1.2.840.113556.1.4.1413"
49 #define ADS_ASQ_OID "1.2.840.113556.1.4.1504"
50 #define ADS_EXTENDED_DN_OID "1.2.840.113556.1.4.529"
51 #define ADS_SD_FLAGS_OID "1.2.840.113556.1.4.801"
53 /* ldap bitwise searches */
54 #define ADS_LDAP_MATCHING_RULE_BIT_AND "1.2.840.113556.1.4.803"
55 #define ADS_LDAP_MATCHING_RULE_BIT_OR "1.2.840.113556.1.4.804"
57 #define ADS_PINGS 0x0000FFFF /* Ping response */
59 enum ads_extended_dn_flags
{
60 ADS_EXTENDED_DN_HEX_STRING
= 0,
61 ADS_EXTENDED_DN_STRING
= 1 /* not supported on win2k */
64 /* this is probably not very well suited to pass other controls generically but
65 * is good enough for the extended dn control where it is only used for atm */
73 #include "libads/ads_proto.h"
76 #include "libads/ads_ldap_protos.h"
79 #include "libads/kerberos_proto.h"
81 #define ADS_TALLOC_CONST_FREE(PTR) do { talloc_free(discard_const(PTR)); PTR = NULL; } while (0);
83 #endif /* _INCLUDE_ADS_H_ */