Changeset 745 for trunk/server/source3/include/smbldap.h
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/include/smbldap.h
r414 r745 23 23 24 24 struct smbldap_state; 25 26 #include "smb_ldap.h" 25 27 26 28 #ifdef HAVE_LDAP … … 42 44 #define LDAP_OBJ_TRUST_PASSWORD "sambaTrustPassword" 43 45 #define LDAP_OBJ_TRUSTDOM_PASSWORD "sambaTrustedDomainPassword" 46 #define LDAP_OBJ_TRUSTED_DOMAIN "sambaTrustedDomain" 44 47 45 48 #define LDAP_OBJ_ACCOUNT "account" … … 136 139 const char** get_attr_list( TALLOC_CTX *mem_ctx, ATTRIB_MAP_ENTRY table[] ); 137 140 void smbldap_set_mod (LDAPMod *** modlist, int modop, const char *attribute, const char *value); 141 void smbldap_set_mod_blob(LDAPMod *** modlist, int modop, const char *attribute, const DATA_BLOB *newblob); 138 142 void smbldap_make_mod(LDAP *ldap_struct, LDAPMessage *existing, 139 143 LDAPMod ***mods, 140 144 const char *attribute, const char *newval); 145 void smbldap_make_mod_blob(LDAP *ldap_struct, LDAPMessage *existing, 146 LDAPMod ***mods, 147 const char *attribute, const DATA_BLOB *newblob); 141 148 bool smbldap_get_single_attribute (LDAP * ldap_struct, LDAPMessage * entry, 142 149 const char *attribute, char *value, … … 154 161 LDAP *ldap_struct; 155 162 pid_t pid; 156 time_t last_ping; 163 time_t last_ping; /* monotonic */ 157 164 /* retrive-once info */ 158 165 const char *uri; … … 167 174 unsigned int num_failures; 168 175 169 time_t last_use; 176 time_t last_use; /* monotonic */ 170 177 struct event_context *event_context; 171 178 struct timed_event *idle_event; 172 179 173 struct timeval last_rebind; 180 struct timeval last_rebind; /* monotonic */ 174 181 }; 175 182 176 183 /* struct used by both pdb_ldap.c and pdb_nds.c */ 184 185 struct ipasam_privates; 177 186 178 187 struct ldapsam_privates { … … 185 194 186 195 const char *domain_name; 187 DOM_SIDdomain_sid;196 struct dom_sid domain_sid; 188 197 189 198 /* configuration items */ … … 194 203 /* Is this NDS ldap? */ 195 204 int is_nds_ldap; 205 206 /* Is this IPA ldap? */ 207 int is_ipa_ldap; 208 struct ipasam_privates *ipasam_privates; 196 209 197 210 /* ldap server location parameter */ … … 205 218 206 219 /* Functions shared between pdb_ldap.c and pdb_nds.c. */ 220 struct pdb_methods; 207 221 NTSTATUS pdb_init_ldapsam_compat( struct pdb_methods **pdb_method, const char *location); 208 222 void private_data_free_fn(void **result); … … 232 246 char *smbldap_talloc_dn(TALLOC_CTX *mem_ctx, LDAP *ld, 233 247 LDAPMessage *entry); 234 235 236 #else 237 #define LDAP void 238 #define LDAPMod void 239 #define LDAP_CONST const 240 #define LDAPControl void 241 struct berval; 242 struct ldapsam_privates; 248 LDAP *priv2ld(struct ldapsam_privates *priv); 249 250 /* The following definitions come from lib/smbldap.c */ 251 252 int smb_ldap_start_tls(LDAP *ldap_struct, int version); 253 int smb_ldap_setup_full_conn(LDAP **ldap_struct, const char *uri); 254 int smbldap_search(struct smbldap_state *ldap_state, 255 const char *base, int scope, const char *filter, 256 const char *attrs[], int attrsonly, 257 LDAPMessage **res); 258 int smbldap_search_paged(struct smbldap_state *ldap_state, 259 const char *base, int scope, const char *filter, 260 const char **attrs, int attrsonly, int pagesize, 261 LDAPMessage **res, void **cookie); 262 int smbldap_modify(struct smbldap_state *ldap_state, const char *dn, LDAPMod *attrs[]); 263 int smbldap_add(struct smbldap_state *ldap_state, const char *dn, LDAPMod *attrs[]); 264 int smbldap_delete(struct smbldap_state *ldap_state, const char *dn); 265 int smbldap_extended_operation(struct smbldap_state *ldap_state, 266 LDAP_CONST char *reqoid, struct berval *reqdata, 267 LDAPControl **serverctrls, LDAPControl **clientctrls, 268 char **retoidp, struct berval **retdatap); 269 int smbldap_search_suffix (struct smbldap_state *ldap_state, 270 const char *filter, const char **search_attr, 271 LDAPMessage ** result); 272 void smbldap_free_struct(struct smbldap_state **ldap_state) ; 273 NTSTATUS smbldap_init(TALLOC_CTX *mem_ctx, struct event_context *event_ctx, 274 const char *location, 275 struct smbldap_state **smbldap_state); 276 bool smbldap_has_control(LDAP *ld, const char *control); 277 bool smbldap_has_extension(LDAP *ld, const char *extension); 278 bool smbldap_has_naming_context(LDAP *ld, const char *naming_context); 279 bool smbldap_set_creds(struct smbldap_state *ldap_state, bool anon, const char *dn, const char *secret); 280 281 /* The following definitions come from lib/smbldap_util.c */ 282 283 NTSTATUS smbldap_search_domain_info(struct smbldap_state *ldap_state, 284 LDAPMessage ** result, const char *domain_name, 285 bool try_add); 286 243 287 #endif /* HAVE_LDAP */ 244 288 … … 247 291 #define LDAP_PAGE_SIZE 1024 248 292 293 #define ADS_PAGE_CTL_OID "1.2.840.113556.1.4.319" 294 295 /* 296 * Work around versions of the LDAP client libs that don't have the OIDs 297 * defined, or have them defined under the old name. 298 * This functionality is really a factor of the server, not the client 299 * 300 */ 301 302 #if defined(LDAP_EXOP_X_MODIFY_PASSWD) && !defined(LDAP_EXOP_MODIFY_PASSWD) 303 #define LDAP_EXOP_MODIFY_PASSWD LDAP_EXOP_X_MODIFY_PASSWD 304 #elif !defined(LDAP_EXOP_MODIFY_PASSWD) 305 #define LDAP_EXOP_MODIFY_PASSWD "1.3.6.1.4.1.4203.1.11.1" 306 #endif 307 308 #if defined(LDAP_EXOP_X_MODIFY_PASSWD_ID) && !defined(LDAP_EXOP_MODIFY_PASSWD_ID) 309 #define LDAP_TAG_EXOP_MODIFY_PASSWD_ID LDAP_EXOP_X_MODIFY_PASSWD_ID 310 #elif !defined(LDAP_EXOP_MODIFY_PASSWD_ID) 311 #define LDAP_TAG_EXOP_MODIFY_PASSWD_ID ((ber_tag_t) 0x80U) 312 #endif 313 314 #if defined(LDAP_EXOP_X_MODIFY_PASSWD_NEW) && !defined(LDAP_EXOP_MODIFY_PASSWD_NEW) 315 #define LDAP_TAG_EXOP_MODIFY_PASSWD_NEW LDAP_EXOP_X_MODIFY_PASSWD_NEW 316 #elif !defined(LDAP_EXOP_MODIFY_PASSWD_NEW) 317 #define LDAP_TAG_EXOP_MODIFY_PASSWD_NEW ((ber_tag_t) 0x82U) 318 #endif 319 249 320 #endif /* _SMBLDAP_H */
Note:
See TracChangeset
for help on using the changeset viewer.