summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
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;