summaryrefslogtreecommitdiff
path: root/gnu/usr.sbin/sendmail/include/sm/ldap.h
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-09-11 18:55:53 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-09-11 18:55:53 +0000
commit4643c616c81fb1198b29c3eaff4d697392c8dc4b (patch)
tree4afa26a5f1a2ef0e47061eb08b6d339bc7e8dad1 /gnu/usr.sbin/sendmail/include/sm/ldap.h
parent8afe339a41c898cc4a2d42d03d115b16f2053bad (diff)
sendmail 8.12.0 with $Id tags converted to $Sendmail
Diffstat (limited to 'gnu/usr.sbin/sendmail/include/sm/ldap.h')
-rw-r--r--gnu/usr.sbin/sendmail/include/sm/ldap.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/gnu/usr.sbin/sendmail/include/sm/ldap.h b/gnu/usr.sbin/sendmail/include/sm/ldap.h
new file mode 100644
index 00000000000..062e957df4e
--- /dev/null
+++ b/gnu/usr.sbin/sendmail/include/sm/ldap.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2001 Sendmail, 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.
+ *
+ * $Sendmail: ldap.h,v 1.4 2001/04/18 07:06:52 gshapiro Exp $
+ */
+
+#ifndef SM_LDAP_H
+# define SM_LDAP_H
+
+# include <sm/conf.h>
+
+# ifndef LDAPMAP_MAX_ATTR
+# define LDAPMAP_MAX_ATTR 64
+# endif /* ! LDAPMAP_MAX_ATTR */
+# ifndef LDAPMAP_MAX_FILTER
+# define LDAPMAP_MAX_FILTER 1024
+# endif /* ! LDAPMAP_MAX_FILTER */
+# ifndef LDAPMAP_MAX_PASSWD
+# define LDAPMAP_MAX_PASSWD 256
+# endif /* ! LDAPMAP_MAX_PASSWD */
+
+# if LDAPMAP
+struct sm_ldap_struct
+{
+ /* needed for ldap_open or ldap_init */
+ char *ldap_host;
+ int ldap_port;
+ pid_t ldap_pid;
+
+ /* options set in ld struct before ldap_bind_s */
+ int ldap_deref;
+ time_t ldap_timelimit;
+ int ldap_sizelimit;
+ int ldap_options;
+
+ /* args for ldap_bind_s */
+ LDAP *ldap_ld;
+ char *ldap_binddn;
+ char *ldap_secret;
+ int ldap_method;
+
+ /* args for ldap_search */
+ char *ldap_base;
+ int ldap_scope;
+ char *ldap_filter;
+ char *ldap_attr[LDAPMAP_MAX_ATTR + 1];
+ bool ldap_attrsonly;
+
+ /* args for ldap_result */
+ struct timeval ldap_timeout;
+ LDAPMessage *ldap_res;
+
+ /* ldapmap_lookup options */
+ char ldap_attrsep;
+
+ /* Linked list of maps sharing the same LDAP binding */
+ void *ldap_next;
+};
+
+typedef struct sm_ldap_struct SM_LDAP_STRUCT;
+
+/* functions */
+extern void sm_ldap_clear __P((SM_LDAP_STRUCT *));
+extern bool sm_ldap_start __P((char *, SM_LDAP_STRUCT *));
+extern int sm_ldap_search __P((SM_LDAP_STRUCT *, char *));
+extern void sm_ldap_setopts __P((LDAP *, SM_LDAP_STRUCT *));
+extern int sm_ldap_geterrno __P((LDAP *));
+extern void sm_ldap_close __P((SM_LDAP_STRUCT *));
+# endif /* LDAPMAP */
+
+#endif /* ! SM_LDAP_H */