mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
minor improvements
This commit is contained in:
parent
ff0df4b6aa
commit
2919bc09ac
@ -112,7 +112,10 @@ slapacl( int argc, char **argv )
|
||||
if ( access == ACL_INVALID_ACCESS ) {
|
||||
fprintf( stderr, "unknown access \"%s\" for attribute \"%s\"\n",
|
||||
accessstr, argv[0] );
|
||||
continue;
|
||||
if ( continuemode ) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,10 +123,13 @@ slapacl( int argc, char **argv )
|
||||
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",
|
||||
|
@ -130,9 +130,11 @@ slapauth( int argc, char **argv )
|
||||
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;
|
||||
@ -142,7 +144,7 @@ slapauth( int argc, char **argv )
|
||||
op.o_tmpfree( authzID.bv_val, op.o_tmpmemctx );
|
||||
BER_BVZERO( &authzID );
|
||||
|
||||
if ( rc ) {
|
||||
if ( rc && !continuemode ) {
|
||||
goto destroy;
|
||||
}
|
||||
}
|
||||
@ -157,7 +159,7 @@ slapauth( int argc, char **argv )
|
||||
|
||||
rc = do_check( &conn, &op, &id );
|
||||
|
||||
if ( rc ) {
|
||||
if ( rc && !continuemode ) {
|
||||
goto destroy;
|
||||
}
|
||||
}
|
||||
|
@ -37,7 +37,7 @@
|
||||
int
|
||||
slapdn( int argc, char **argv )
|
||||
{
|
||||
int rc = EXIT_SUCCESS;
|
||||
int rc = 0;
|
||||
const char *progname = "slapdn";
|
||||
|
||||
#ifdef NEW_LOGGING
|
||||
@ -59,7 +59,10 @@ slapdn( int argc, char **argv )
|
||||
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"
|
||||
@ -69,7 +72,6 @@ slapdn( int argc, char **argv )
|
||||
ndn.bv_val, pdn.bv_val );
|
||||
ch_free( ndn.bv_val );
|
||||
ch_free( pdn.bv_val );
|
||||
rc = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user