Misc updates from HEAD

This commit is contained in:
Kurt Zeilenga 2002-06-06 04:16:03 +00:00
parent fb56c41fdf
commit 175399c2bb
3 changed files with 33 additions and 14 deletions

10
CHANGES
View File

@ -1,11 +1,17 @@
OpenLDAP 2.0 Change Log
OpenLDAP 2.0.24 Engineering
Fixed slapd max incoming macro bug (ITS#1828)
Fixed slapd acl group/dnaddr bug (ITS#1607)
Fixed ber_bvstrdup() empty string ("") bug (ITS#1662)
Fixed slapd connection management bug (ITS#1655)
Fixed slapd PF_lOCAL typo (ITS#1660)
Fixed slurpd tls init bug (ITS#1613)
Fixed back-ldbm dn normalization bug in onelevel searches (ITS#1654)
Fixed back-ldbm modrdn root dn check (ITS#1761)
Fixed replog logging without replica (ITS#1335)
Fixed back-ldbm idl overrun bug (ITS1570)
Fixed slapd replog logging without replica (ITS#1335)
Fixed ber_bvstrdup() empty string ("") bug (ITS#1662)
Fixed ldapsearch filter bug (ITS#1649)
Documentation
Updated release documents

View File

@ -892,7 +892,7 @@ static int dosearch(
struct timeval *timeout,
int sizelimit )
{
char filter[ BUFSIZ ];
char *filter;
int rc;
int nresponses;
int nentries;
@ -903,6 +903,12 @@ static int dosearch(
ber_int_t msgid;
if( filtpatt != NULL ) {
filter = malloc( strlen( filtpatt ) + strlen( value ) );
if( filter == NULL ) {
perror( "malloc" );
return EXIT_FAILURE;
}
sprintf( filter, filtpatt, value );
if ( verbose ) {
@ -914,7 +920,7 @@ static int dosearch(
}
} else {
sprintf( filter, "%s", value );
filter = value;
}
if ( not ) {
@ -924,6 +930,10 @@ static int dosearch(
rc = ldap_search_ext( ld, base, scope, filter, attrs, attrsonly,
sctrls, cctrls, timeout, sizelimit, &msgid );
if ( filtpatt != NULL ) {
free( filter );
}
if( rc != LDAP_SUCCESS ) {
fprintf( stderr, "%s: ldap_search_ext: %s (%d)\n",
prog, ldap_err2string( rc ), rc );

View File

@ -10,9 +10,6 @@
#include <ac/time.h>
#include <ac/unistd.h>
#ifdef HAVE_WINCRYPT_H
#include <wincrypt.h>
#endif
#ifdef HAVE_PROCESS_H
#include <process.h>
#endif
@ -39,21 +36,27 @@ int lutil_entropy( unsigned char *buf, ber_len_t nbytes )
if( nbytes == 0 ) return 0;
#ifdef URANDOM_DEVICE
#define URANDOM_NREADS 4
/* Linux and *BSD offer a urandom device */
{
int rc, fd;
int rc, fd, n=0;
fd = open( URANDOM_DEVICE, O_RDONLY );
if( fd < 0 ) return -1;
rc = read( fd, buf, nbytes );
do {
rc = read( fd, buf, nbytes );
if( rc <= 0 ) break;
buf+=rc;
nbytes-=rc;
if( ++n >= URANDOM_NREADS ) break;
} while( nbytes > 0 );
close(fd);
/* should return nbytes */
if( rc < nbytes ) return -1;
return 0;
return nbytes > 0 ? -1 : 0;
}
#elif PROV_RSA_FULL
{