From e6dc9d18890bfd7b5914b597de4c1b6a701847e2 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 11 Oct 2000 04:56:08 +0000 Subject: [PATCH] Update ldappasswd binddn bug, man page and error reporting --- clients/tools/ldappasswd.c | 4 +++- doc/man/man1/ldappasswd.1 | 4 +--- servers/slapd/back-ldbm/passwd.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/clients/tools/ldappasswd.c b/clients/tools/ldappasswd.c index 2c9f5e868a..b0cdfb6dea 100644 --- a/clients/tools/ldappasswd.c +++ b/clients/tools/ldappasswd.c @@ -533,7 +533,9 @@ main( int argc, char *argv[] ) if (want_bindpw && passwd.bv_val == NULL ) { /* handle bind password */ - fprintf( stderr, "Bind DN: %s\n", binddn ); + if( binddn != NULL ) { + fprintf( stderr, "Bind DN: %s\n", binddn ); + } passwd.bv_val = strdup( getpassphrase("Enter bind password: ")); passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0; } diff --git a/doc/man/man1/ldappasswd.1 b/doc/man/man1/ldappasswd.1 index 2d40106bc2..b37e3df503 100644 --- a/doc/man/man1/ldappasswd.1 +++ b/doc/man/man1/ldappasswd.1 @@ -13,7 +13,7 @@ ldappasswd \- change the password of an LDAP entry [\c .BR \-C ] [\c -.BI \-D \ binddn\fR +.BI \-D \ binddn\fR] [\c .BI \-d \ debuglevel\fR] [\c @@ -86,8 +86,6 @@ Use simple authentication instead of SASL. .TP .BI \-D \ binddn Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory. -This flag is not optional. The user DN will be used if the -bind DN is not provided. .TP .BI \-d \ debuglevel Set the LDAP debugging level to \fIdebuglevel\fP. diff --git a/servers/slapd/back-ldbm/passwd.c b/servers/slapd/back-ldbm/passwd.c index f104252151..2acb3d8532 100644 --- a/servers/slapd/back-ldbm/passwd.c +++ b/servers/slapd/back-ldbm/passwd.c @@ -88,7 +88,7 @@ ldbm_back_exop_passwd( if( e == NULL ) { *text = "could not locate authorization entry"; - rc = LDAP_OPERATIONS_ERROR; + rc = LDAP_NO_SUCH_OBJECT; goto done; } -- 2.39.5