/*
* Copyright (c) 2001-2003, 2005-2007 Proofpoint, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: ldap.h,v 1.35 2013-11-22 20:51:31 ca Exp $
*/
#ifndef SM_LDAP_H
# define SM_LDAP_H
/*
** NOTE: These should be changed from LDAPMAP_* to SM_LDAP_*
** in the next major release (8.x+1) of sendmail.
*/
# ifndef LDAPMAP_MAX_ATTR
# endif /* ! LDAPMAP_MAX_ATTR */
# ifndef LDAPMAP_MAX_FILTER
# endif /* ! LDAPMAP_MAX_FILTER */
# ifndef LDAPMAP_MAX_PASSWD
# endif /* ! LDAPMAP_MAX_PASSWD */
# if LDAPMAP
/* maximum number of arguments in a map lookup, see sendmail.h: MAX_MAP_ARGS */
/* error codes from sm_ldap_search*() */
/* Attribute types */
# define SM_LDAP_ATTR_OBJCLASS 0
/* sm_ldap_results() flags */
struct sm_ldap_struct
{
/* needed for ldap_open or ldap_init */
char *ldap_uri;
char *ldap_host;
int ldap_port;
int ldap_version;
/* options set in ld struct before ldap_bind_s */
int ldap_deref;
int ldap_sizelimit;
int ldap_options;
/* args for ldap_bind_s */
char *ldap_binddn;
char *ldap_secret;
int ldap_method;
/* args for ldap_search */
char *ldap_base;
int ldap_scope;
char *ldap_filter;
bool ldap_attrsonly;
bool ldap_multi_args;
/* args for ldap_result */
/* ldapmap_lookup options */
char ldap_attrsep;
int ldap_networktmo;
# endif /* _FFR_LDAP_NETWORK_TIMEOUT */
/* Linked list of maps sharing the same LDAP binding */
void *ldap_next;
};
struct sm_ldap_recurse_entry
{
char *lr_search;
int lr_type;
char **lr_attrs;
bool lr_done;
};
struct sm_ldap_recurse_list
{
int lrl_size;
int lrl_cnt;
};
/* functions */
SM_RPOOL_T *, char **, int *, int *,
SM_LDAP_RECURSE_LIST *));
/* Portability defines */
# if !SM_CONF_LDAP_MEMFREE
# define ldap_memfree(x) ((void) 0)
# endif /* !SM_CONF_LDAP_MEMFREE */
# endif /* LDAPMAP */
#endif /* ! SM_LDAP_H */