This commit is contained in:
Pierangelo Masarati 2004-07-12 22:33:44 +00:00
parent 2954a90483
commit f4a428d060
4 changed files with 8 additions and 7 deletions

View File

@ -23,7 +23,6 @@
#include "slap.h"
#if SLAPD_OVER_CHAIN == SLAPD_MOD_STATIC
extern int chain_init();
#endif

View File

@ -667,11 +667,13 @@ rwm_send_entry( Operation *op, SlapReply *rs )
* - attributes that are requested
* - no values if attrsonly is set
*/
e = entry_dup( e );
if ( e == NULL ) {
rc = LDAP_NO_MEMORY;
goto fail;
}
rs->sr_flags |= ( REP_ENTRY_MODIFIABLE | REP_ENTRY_MUSTBEFREED );
}
@ -1013,12 +1015,12 @@ rwm_config(
int rc = 0;
char *argv0 = NULL;
if ( strncasecmp( argv[ 0 ], "rwm-", sizeof( "rwm-" ) - 1 ) == 0 ) {
if ( strncasecmp( argv[ 0 ], "rwm-", STRLENOF( "rwm-" ) ) == 0 ) {
argv0 = argv[ 0 ];
argv[ 0 ] = &argv0[ sizeof( "rwm-" ) - 1 ];
argv[ 0 ] = &argv0[ STRLENOF( "rwm-" ) ];
}
if ( strncasecmp( argv[0], "rewrite", sizeof("rewrite") - 1 ) == 0 ) {
if ( strncasecmp( argv[0], "rewrite", STRLENOF("rewrite") ) == 0 ) {
rc = rwm_rw_config( be, fname, lineno, argc, argv );
} else if ( strcasecmp( argv[0], "map" ) == 0 ) {

View File

@ -270,13 +270,13 @@ rwm_suffix_massage_patternize( const char *s )
len = strlen( s );
res = ch_calloc( sizeof( char ), len + sizeof( "%1" ) );
res = ch_calloc( sizeof( char ), len + STRLENOF( "%1" ) + 1 );
if ( res == NULL ) {
return NULL;
}
strcpy( res, "%1" );
strcpy( res + sizeof( "%1" ) - 1, s );
strcpy( res + STRLENOF( "%1" ), s );
return res;
}

View File

@ -78,7 +78,7 @@ rwm_map_init( struct ldapmap *lm, struct ldapmapping **m )
mapping = (struct ldapmapping *)ch_calloc( 2,
sizeof( struct ldapmapping ) );
if ( mapping == NULL ) {
return;
return LDAP_NO_MEMORY;
}
rc = slap_str2ad( "objectClass", &mapping->m_src_ad, &text );