From: Kurt Zeilenga Date: Thu, 20 Dec 2001 02:54:48 +0000 (+0000) Subject: ITS#1497 slap/ldappasswd strncmp bug fix X-Git-Tag: OPENLDAP_REL_ENG_2_0_19~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0187ec69b6c3910ea423ec54655b3d038c26f1cd;p=thirdparty%2Fopenldap.git ITS#1497 slap/ldappasswd strncmp bug fix --- diff --git a/CHANGES b/CHANGES index 310c9fe9e4..0bc5319406 100644 --- a/CHANGES +++ b/CHANGES @@ -1,15 +1,19 @@ OpenLDAP 2.0 Change Log OpenLDAP 2.0.19 Engineering - Fixed -lldap cacertfile bug (ITS#1406) Fixed back-ldbm not filter indexing (ITS#1405) Fixed back-passwd e_ndn bug (ITS#1467) Fixed back-ldap undef ad bug (ITS#1367) Fixed slapd suffix "" bugs (ITS#1430) Fixed slapd zero length replace bug (ITS#1364) Fixed slapd teletex string printables bug (ITS#1419) + Fixed slapd unallocated sockets bug (ITS#1415) Fixed slapd undefined present filter bug (ITS#1439) - Fixed lber realloc bug (ITS#1410) + Fixed -lldap cacertfile bug (ITS#1406) + Fixed -lldap ldap_url_seach_s bug (ITS#1429) + Fixed -lldap unbind free bug (ITS#1442) + Fixed -llber realloc bug (ITS#1410) + Fixed ldappasswd/slappasswd strncmp bug (ITS#1497) Fixed various memory leaks Updated slapd emfile/enfile handling Build environment diff --git a/clients/tools/ldappasswd.c b/clients/tools/ldappasswd.c index 8d254aabed..b60b9d9cfd 100644 --- a/clients/tools/ldappasswd.c +++ b/clients/tools/ldappasswd.c @@ -510,7 +510,7 @@ main( int argc, char *argv[] ) ckoldpw = getpassphrase("Re-enter old password: "); if( oldpw== NULL || ckoldpw == NULL || - strncmp( oldpw, ckoldpw, strlen(oldpw) )) + strcmp( oldpw, ckoldpw )) { fprintf( stderr, "passwords do not match\n" ); return EXIT_FAILURE; @@ -524,7 +524,7 @@ main( int argc, char *argv[] ) cknewpw = getpassphrase("Re-enter new password: "); if( newpw== NULL || cknewpw == NULL || - strncmp( newpw, cknewpw, strlen(newpw) )) + strcmp( newpw, cknewpw )) { fprintf( stderr, "passwords do not match\n" ); return EXIT_FAILURE; diff --git a/servers/slapd/schema/core.schema b/servers/slapd/schema/core.schema index 64b43c1683..908aec2b09 100644 --- a/servers/slapd/schema/core.schema +++ b/servers/slapd/schema/core.schema @@ -597,9 +597,9 @@ attributetype ( 1.3.6.1.4.1.4203.1.3.2 # Experimental ( subject to change ) # this really shouldn't be published! -#attributetype ( 1.3.6.1.4.1.4203.666.1.5 -# NAME 'OpenLDAPaci' -# DESC 'OpenLDAP access control information' -# EQUALITY OpenLDAPaciMatch -# SYNTAX 1.3.6.1.4.1.4203.666.2.1 -# USAGE directoryOperation ) +attributetype ( 1.3.6.1.4.1.4203.666.1.5 + NAME 'OpenLDAPaci' + DESC 'OpenLDAP access control information' + EQUALITY OpenLDAPaciMatch + SYNTAX 1.3.6.1.4.1.4203.666.2.1 + USAGE directoryOperation ) diff --git a/servers/slapd/tools/slappasswd.c b/servers/slapd/tools/slappasswd.c index 98d859a32e..0e16351908 100644 --- a/servers/slapd/tools/slappasswd.c +++ b/servers/slapd/tools/slappasswd.c @@ -42,12 +42,10 @@ usage(const char *s) int main( int argc, char *argv[] ) { - int rc; char *scheme = "{SSHA}"; char *newpw = NULL; int i; - int version = -1; struct berval passwd; struct berval *hash = NULL; @@ -97,7 +95,7 @@ main( int argc, char *argv[] ) newpw = strdup(getpassphrase("New password: ")); cknewpw = getpassphrase("Re-enter new password: "); - if( strncmp( newpw, cknewpw, strlen(newpw) )) { + if( strcmp( newpw, cknewpw )) { fprintf( stderr, "Password values do not match\n" ); return EXIT_FAILURE; }