From: Kurt Zeilenga Date: Wed, 16 Sep 1998 04:58:26 +0000 (+0000) Subject: Apply bound_dn patch from main. X-Git-Tag: OPENLDAP_REL_ENG_1_0_2~16 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b8564071469e1c51272919585d14671236198e4f;p=openldap Apply bound_dn patch from main. --- diff --git a/clients/ud/auth.c b/clients/ud/auth.c index be4727695b..97be3f545c 100644 --- a/clients/ud/auth.c +++ b/clients/ud/auth.c @@ -13,16 +13,18 @@ #include #include #include +#include #include -#include -#include -#include -#include "ud.h" #ifdef KERBEROS #include #include #endif +#include +#include +#include +#include "ud.h" + extern LDAP *ld; /* our LDAP descriptor */ extern int verbose; /* verbosity indicator */ extern char *mygetpass(); /* getpass() passwds are too short */ @@ -251,7 +253,7 @@ int implicit; else ldap_perror(ld, "ldap_bind_s" ); (void) ldap_bind_s(ld, default_bind_object, - (char *) UD_PASSWD, LDAP_AUTH_SIMPLE); + (char *) UD_BIND_CRED, LDAP_AUTH_SIMPLE); if (default_bind_object == NULL) set_bound_dn(NULL); else @@ -423,5 +425,5 @@ char *s; if (bound_dn != NULL) Free(bound_dn); - bound_dn = strdup(s); + bound_dn = (s == NULL) ? NULL : strdup(s); }