summaryrefslogtreecommitdiff
path: root/usr.sbin/ypldap/aldap.h
diff options
context:
space:
mode:
authoraschrijver <aschrijver@cvs.openbsd.org>2009-01-27 11:33:23 +0000
committeraschrijver <aschrijver@cvs.openbsd.org>2009-01-27 11:33:23 +0000
commitb2b2a64cb741bd2ad69ff21d3ae8f8f4087e1ac6 (patch)
tree527f891da601d55df2de6072bc3ea60ecbc1f821 /usr.sbin/ypldap/aldap.h
parentad43ed82e1e6195b69a5cafb0fde7b721aed318a (diff)
Add correct error handling to the aldap API.
Use the error handling in the ldapclient. with help from pyr@
Diffstat (limited to 'usr.sbin/ypldap/aldap.h')
-rw-r--r--usr.sbin/ypldap/aldap.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/ypldap/aldap.h b/usr.sbin/ypldap/aldap.h
index f2b96122f96..35d81dbd3cd 100644
--- a/usr.sbin/ypldap/aldap.h
+++ b/usr.sbin/ypldap/aldap.h
@@ -1,5 +1,5 @@
-/* $Id: aldap.h,v 1.5 2009/01/26 21:56:15 pyr Exp $ */
-/* $OpenBSD: aldap.h,v 1.5 2009/01/26 21:56:15 pyr Exp $ */
+/* $Id: aldap.h,v 1.6 2009/01/27 11:33:22 aschrijver Exp $ */
+/* $OpenBSD: aldap.h,v 1.6 2009/01/27 11:33:22 aschrijver Exp $ */
/*
* Copyright (c) 2008 Alexander Schrijver <aschrijver@openbsd.org>
@@ -25,6 +25,11 @@
#define LDAP_PORT 389
struct aldap {
+#define ALDAP_ERR_SUCCESS 0
+#define ALDAP_ERR_PARSER_ERROR 1
+#define ALDAP_ERR_INVALID_FILTER 2
+#define ALDAP_ERR_OPERATION_FAILED 3
+ u_int8_t err;
int msgid;
struct ber ber;
};
@@ -183,6 +188,7 @@ void aldap_freemsg(struct aldap_message *);
int aldap_bind(struct aldap *, char *, char *);
int aldap_unbind(struct aldap *);
int aldap_search(struct aldap *, char *, enum scope, char *, char **, int, int, int);
+int aldap_get_errno(struct aldap *, const char **);
int aldap_get_resultcode(struct aldap_message *);
char *aldap_get_dn(struct aldap_message *);