{
if ( si->si_authz != NULL ) {
snprintf( c->cr_msg, sizeof( c->cr_msg ),
- "\"idassert-authzFrom <authz>\": "
+ "\"%s <authz>\": "
"\"%s\" conflicts with existing authz rules",
- c->argv[ 1 ] );
+ c->argv[ 0 ], c->argv[ 1 ] );
Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 );
return 1;
}
} else if ( ( si->si_flags & LDAP_BACK_AUTH_AUTHZ_ALL ) ) {
snprintf( c->cr_msg, sizeof( c->cr_msg ),
- "\"idassert-authzFrom <authz>\": "
- "\"<authz>\" conflicts with \"*\"" );
+ "\"%s <authz>\": "
+ "\"<authz>\" conflicts with \"*\"", c->argv[0] );
Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 );
return 1;
}
rc = authzNormalize( 0, NULL, NULL, &in, &bv, NULL );
if ( rc != LDAP_SUCCESS ) {
snprintf( c->cr_msg, sizeof( c->cr_msg ),
- "\"idassert-authzFrom <authz>\": "
- "invalid syntax" );
+ "\"%s <authz>\": "
+ "invalid syntax", c->argv[0] );
Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 );
return 1;
}
rc = authzNormalize( 0, NULL, NULL, &in, &bv, NULL );
if ( rc != LDAP_SUCCESS ) {
snprintf( c->cr_msg, sizeof( c->cr_msg ),
- "\"idassert-passThru <authz>\": "
- "invalid syntax" );
+ "\"%s <authz>\": "
+ "invalid syntax", c->argv[0] );
Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 );
return 1;
}
j = verb_to_mask( argvi, idassert_mode );
if ( BER_BVISNULL( &idassert_mode[ j ].word ) ) {
snprintf( c->cr_msg, sizeof( c->cr_msg ),
- "\"idassert-bind <args>\": "
+ "\"%s <args>\": "
"unknown mode \"%s\"",
- argvi );
+ c->argv[0], argvi );
Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 );
return 1;
}
if ( strcasecmp( argvi, "native" ) == 0 ) {
if ( si->si_bc.sb_method != LDAP_AUTH_SASL ) {
snprintf( c->cr_msg, sizeof( c->cr_msg ),
- "\"idassert-bind <args>\": "
+ "\"%s <args>\": "
"authz=\"native\" incompatible "
- "with auth method" );
+ "with auth method", c->argv[0] );
Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 );
return 1;
}
} else {
snprintf( c->cr_msg, sizeof( c->cr_msg ),
- "\"idassert-bind <args>\": "
+ "\"%s <args>\": "
"unknown authz \"%s\"",
- argvi );
+ c->argv[0], argvi );
Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 );
return 1;
}
if ( flags == NULL ) {
snprintf( c->cr_msg, sizeof( c->cr_msg ),
- "\"idassert-bind <args>\": "
+ "\"%s <args>\": "
"unable to parse flags \"%s\"",
- argvi );
+ c->argv[0], argvi );
Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 );
return 1;
}
} else if ( strcasecmp( flags[ j ], "obsolete-proxy-authz" ) == 0 ) {
if ( si->si_flags & LDAP_BACK_AUTH_OBSOLETE_ENCODING_WORKAROUND ) {
- Debug( LDAP_DEBUG_ANY,
- "%s: \"obsolete-proxy-authz\" flag "
- "in \"idassert-mode <args>\" "
- "incompatible with previously issued \"obsolete-encoding-workaround\" flag.\n",
- c->log, 0, 0 );
+ snprintf( c->cr_msg, sizeof( c->cr_msg ),
+ "\"%s <args>\": "
+ "\"obsolete-proxy-authz\" flag "
+ "incompatible with previously issued \"obsolete-encoding-workaround\" flag.",
+ c->argv[0] );
+ Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 );
err = 1;
break;
} else if ( strcasecmp( flags[ j ], "obsolete-encoding-workaround" ) == 0 ) {
if ( si->si_flags & LDAP_BACK_AUTH_OBSOLETE_PROXY_AUTHZ ) {
- Debug( LDAP_DEBUG_ANY,
- "%s: \"obsolete-encoding-workaround\" flag "
- "in \"idassert-mode <args>\" "
- "incompatible with previously issued \"obsolete-proxy-authz\" flag.\n",
- c->log, 0, 0 );
+ snprintf( c->cr_msg, sizeof( c->cr_msg ),
+ "\"%s <args>\": "
+ "\"obsolete-encoding-workaround\" flag "
+ "incompatible with previously issued \"obsolete-proxy-authz\" flag.",
+ c->argv[0] );
+ Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 );
err = 1;
break;
} else {
snprintf( c->cr_msg, sizeof( c->cr_msg ),
- "\"idassert-bind <args>\": "
+ "\"%s <args>\": "
"unknown flag \"%s\"",
- flags[ j ] );
+ c->argv[0], flags[ j ] );
Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 );
err = 1;
break;
} else if ( bindconf_parse( c->argv[ i ], &si->si_bc ) ) {
snprintf( c->cr_msg, sizeof( c->cr_msg ),
- "\"idassert-bind <args>\": "
+ "\"%s <args>\": "
"unable to parse field \"%s\"",
- c->argv[ i ] );
+ c->argv[0], c->argv[ i ] );
Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 );
return 1;
}
|| BER_BVISNULL( &si->si_bc.sb_cred ) )
{
snprintf( c->cr_msg, sizeof( c->cr_msg ),
- "\"idassert-bind <args>\": "
- "SIMPLE needs \"binddn\" and \"credentials\"" );
+ "\"%s <args>\": "
+ "SIMPLE needs \"binddn\" and \"credentials\"", c->argv[0] );
Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 );
return 1;
}
!(si->si_flags & LDAP_BACK_AUTH_DN_MASK) )
{
snprintf( c->cr_msg, sizeof( c->cr_msg ),
- "\"idassert-bind <args>\": "
- "SASL needs \"binddn\" or either \"dn-authzid\" or \"dn-whoami\" in flags" );
+ "\"%s <args>\": "
+ "SASL needs \"binddn\" or either \"dn-authzid\" or \"dn-whoami\" in flags",
+ c->argv[0] );
Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 );
return 1;
}