mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-04-18 15:20:35 +08:00
Misc updates from HEAD
This commit is contained in:
parent
fb56c41fdf
commit
175399c2bb
10
CHANGES
10
CHANGES
@ -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
|
||||
|
||||
|
@ -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 );
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user