2 header for ads (active directory) library routines
4 basically this is a wrapper around ldap
11 char *ldap_server_name;
24 char *shortServerName;
30 char *defaultPriority;
34 char *operatingSystem;
35 char *operatingSystemHotfix;
36 char *operatingSystemServicePack;
37 char *operatingSystemVersion;
38 char *physicalLocationObject;
40 char *printAttributes;
44 char *printDuplexSupported;
47 char *printKeepPrintedJobs;
49 char *printMACAddress;
51 char *printMaxResolutionSupported;
52 char *printMaxXExtent;
53 char *printMaxYExtent;
54 char **printMediaReady;
55 char **printMediaSupported;
57 char *printMinXExtent;
58 char *printMinYExtent;
59 char *printNetworkAddress;
62 char **printOrientationsSupported;
64 char *printPagesPerMinute;
67 char *printSeparatorFile;
68 char **printShareName;
70 char *printStaplingSupported;
76 /* there are 4 possible types of errors the ads subsystem can produce */
77 enum ads_error_type {ADS_ERROR_KRB5, ADS_ERROR_GSS,
78 ADS_ERROR_LDAP, ADS_ERROR_SYSTEM};
81 enum ads_error_type error_type;
83 /* For error_type = ADS_ERROR_GSS minor_status describe GSS API error */
84 /* Where rc represents major_status of GSS API error */
88 /* macros to simplify error returning */
89 #define ADS_ERROR(rc) ads_build_error(ADS_ERROR_LDAP, rc, 0);
90 #define ADS_ERROR_SYSTEM(rc) ads_build_error(ADS_ERROR_SYSTEM, rc, 0);
91 #define ADS_ERROR_KRB5(rc) ads_build_error(ADS_ERROR_KRB5, rc, 0);
92 #define ADS_ERROR_GSS(rc, minor) ads_build_error(ADS_ERROR_GSS, rc, minor);
94 #define ADS_ERR_OK(status) ((status).rc == 0)
95 #define ADS_SUCCESS ADS_ERROR(0)
97 /* time between reconnect attempts */
98 #define ADS_RECONNECT_TIME 5
100 /* timeout on searches */
101 #define ADS_SEARCH_TIMEOUT 10
103 #define UF_DONT_EXPIRE_PASSWD 0x10000
104 #define UF_MNS_LOGON_ACCOUNT 0x20000
105 #define UF_SMARTCARD_REQUIRED 0x40000
106 #define UF_TRUSTED_FOR_DELEGATION 0x80000
107 #define UF_NOT_DELEGATED 0x100000
108 #define UF_USE_DES_KEY_ONLY 0x200000
109 #define UF_DONT_REQUIRE_PREAUTH 0x400000
111 #define UF_TEMP_DUPLICATE_ACCOUNT 0x0100
112 #define UF_NORMAL_ACCOUNT 0x0200
113 #define UF_INTERDOMAIN_TRUST_ACCOUNT 0x0800
114 #define UF_WORKSTATION_TRUST_ACCOUNT 0x1000
115 #define UF_SERVER_TRUST_ACCOUNT 0x2000
118 #define ATYPE_GROUP 0x10000000
119 #define ATYPE_USER 0x30000000