summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authoraschrijver <aschrijver@cvs.openbsd.org>2009-01-29 11:43:32 +0000
committeraschrijver <aschrijver@cvs.openbsd.org>2009-01-29 11:43:32 +0000
commita808bb676372db0da9ec61d7050b82b6b0bf6c6f (patch)
treeb7436d8fc66281c5596d7000d00e4990aee49dda /usr.sbin
parent6ea241210d9127aef51998139f83d4cfd74e6ade (diff)
Make anonymous binds work properly.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ypldap/aldap.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/ypldap/aldap.c b/usr.sbin/ypldap/aldap.c
index 71f19cf19b9..2c9d47408af 100644
--- a/usr.sbin/ypldap/aldap.c
+++ b/usr.sbin/ypldap/aldap.c
@@ -1,5 +1,5 @@
-/* $Id: aldap.c,v 1.18 2009/01/28 00:53:29 aschrijver Exp $ */
-/* $OpenBSD: aldap.c,v 1.18 2009/01/28 00:53:29 aschrijver Exp $ */
+/* $Id: aldap.c,v 1.19 2009/01/29 11:43:31 aschrijver Exp $ */
+/* $OpenBSD: aldap.c,v 1.19 2009/01/29 11:43:31 aschrijver Exp $ */
/*
* Copyright (c) 2008 Alexander Schrijver <aschrijver@openbsd.org>
@@ -79,6 +79,11 @@ aldap_bind(struct aldap *ldap, char *binddn, char *bindcred)
struct ber_element *root = NULL, *elm;
int error;
+ if (binddn == NULL)
+ binddn = "";
+ if (bindcred == NULL)
+ bindcred = "";
+
if ((root = ber_add_sequence(NULL)) == NULL)
goto fail;