if ( access == ACL_INVALID_ACCESS ) {
fprintf( stderr, "unknown access \"%s\" for attribute \"%s\"\n",
accessstr, argv[0] );
- continue;
+ if ( continuemode ) {
+ continue;
+ }
+ break;
}
}
if ( rc != LDAP_SUCCESS ) {
fprintf( stderr, "slap_str2ad(%s) failed %d (%s)\n",
argv[0], rc, ldap_err2string( rc ) );
- continue;
+ if ( continuemode ) {
+ continue;
+ }
+ break;
}
- rc = access_allowed_mask( &op, &e, desc, &val, access,
+ (void)access_allowed_mask( &op, &e, desc, &val, access,
NULL, &mask );
fprintf( stderr, "%s%s%s: %s\n",
fprintf( stderr, "authzID: <%s> check failed %d (%s)\n",
authzID.bv_val, rc,
ldap_err2string( rc ) );
- rc = 1;
+ rc = -1;
BER_BVZERO( &authzID );
- goto destroy;
+ if ( !continuemode ) {
+ goto destroy;
+ }
}
authzID = authzdn;
op.o_tmpfree( authzID.bv_val, op.o_tmpmemctx );
BER_BVZERO( &authzID );
- if ( rc ) {
+ if ( rc && !continuemode ) {
goto destroy;
}
}
rc = do_check( &conn, &op, &id );
- if ( rc ) {
+ if ( rc && !continuemode ) {
goto destroy;
}
}
int
slapdn( int argc, char **argv )
{
- int rc = EXIT_SUCCESS;
+ int rc = 0;
const char *progname = "slapdn";
#ifdef NEW_LOGGING
fprintf( stderr, "DN: <%s> check failed %d (%s)\n",
dn.bv_val, rc,
ldap_err2string( rc ) );
- rc = 1;
+ if ( !continuemode ) {
+ rc = -1;
+ break;
+ }
} else {
fprintf( stderr, "DN: <%s> check succeeded\n"
ndn.bv_val, pdn.bv_val );
ch_free( ndn.bv_val );
ch_free( pdn.bv_val );
- rc = 0;
}
}