int rc, notfound;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY, "conn: %d do_abandon\n", conn->c_connid));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY, "conn: %d do_abandon\n", conn->c_connid));
#else
Debug( LDAP_DEBUG_TRACE, "do_abandon\n", 0, 0, 0 );
#endif
if ( ber_scanf( op->o_ber, "i", &id ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "conn: %d do_abandon: ber_scanf failed\n",
- conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "conn: %d do_abandon: ber_scanf failed\n",
+ conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "do_abandon: ber_scanf failed\n", 0, 0 ,0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_abandon: conn: %d id=%ld\n", conn->c_connid, (long) id ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
+ "do_abandon: conn: %d id=%ld\n", conn->c_connid, (long) id ));
#else
Debug( LDAP_DEBUG_ARGS, "do_abandon: id=%ld\n", (long) id, 0 ,0 );
#endif
if( id <= 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_abandon: conn: %d bad msgid %ld\n", conn->c_connid, (long) id ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_abandon: conn: %d bad msgid %ld\n", conn->c_connid, (long) id ));
#else
Debug( LDAP_DEBUG_ANY,
"do_abandon: bad msgid %ld\n", (long) id, 0, 0 );
ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "do_abandon: conn: %d op=%ld %sfound\n",
- conn->c_connid, (long)id, notfound ? "not " : "" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "do_abandon: conn: %d op=%ld %sfound\n",
+ conn->c_connid, (long)id, notfound ? "not " : "" ));
#else
Debug( LDAP_DEBUG_TRACE, "do_abandon: op=%ld %sfound\n",
(long) id, notfound ? "not " : "", 0 );
const char *attr = desc ? desc->ad_cname->bv_val : NULL;
- regmatch_t matches[MAXREMATCHES];
+ regmatch_t matches[MAXREMATCHES];
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_ENTRY,
- "access_allowed: conn %d %s access to \"%s\" \"%s\" requested\n",
- conn->c_connid, access2str( access ), e->e_dn, attr ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_ENTRY,
+ "access_allowed: conn %d %s access to \"%s\" \"%s\" requested\n",
+ conn->c_connid, access2str( access ), e->e_dn, attr ));
#else
Debug( LDAP_DEBUG_ACL,
"=> access_allowed: %s access to \"%s\" \"%s\" requested\n",
/* grant database root access */
if ( be != NULL && be_isroot( be, op->o_ndn ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
- "access_allowed: conn %d root access granted\n",
- conn->c_connid));
+ LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
+ "access_allowed: conn %d root access granted\n",
+ conn->c_connid));
#else
Debug( LDAP_DEBUG_ACL,
"<= root access granted\n",
&& desc != slap_schema.si_ad_children )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "access_allowed: conn %d NoUserMod Operational attribute: %s access granted\n",
- conn->c_connid, attr ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "access_allowed: conn %d NoUserMod Operational attribute: %s access granted\n",
+ conn->c_connid, attr ));
#else
- Debug( LDAP_DEBUG_ACL, "NoUserMod Operational attribute:"
+ Debug( LDAP_DEBUG_ACL, "NoUserMod Operational attribute:"
" %s access granted\n",
attr, 0, 0 );
#endif
/* use backend default access if no backend acls */
if( be != NULL && be->be_acl == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "access_allowed: conn %d backend default %s access %s to \"%s\"\n",
- conn->c_connid, access2str( access ),
- be->be_dfltaccess >= access ? "granted" : "denied", op->o_dn ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "access_allowed: conn %d backend default %s access %s to \"%s\"\n",
+ conn->c_connid, access2str( access ),
+ be->be_dfltaccess >= access ? "granted" : "denied", op->o_dn ));
#else
Debug( LDAP_DEBUG_ACL,
"=> access_allowed: backend default %s access %s to \"%s\"\n",
/* use global default access if no global acls */
} else if ( be == NULL && global_acl == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "access_allowed: conn %d global default %s access %s to \"%s\"\n",
- conn->c_connid, access2str( access ),
- global_default_access >= access ? "granted" : "denied", op->o_dn ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "access_allowed: conn %d global default %s access %s to \"%s\"\n",
+ conn->c_connid, access2str( access ),
+ global_default_access >= access ? "granted" : "denied", op->o_dn ));
#else
Debug( LDAP_DEBUG_ACL,
"=> access_allowed: global default %s access %s to \"%s\"\n",
for (i = 0; i < MAXREMATCHES && matches[i].rm_so > 0; i++) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "access_allowed: conn %d match[%d]: %d %d ",
- conn->c_connid, i, (int)matches[i].rm_so, (int)matches[i].rm_eo ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "access_allowed: conn %d match[%d]: %d %d ",
+ conn->c_connid, i, (int)matches[i].rm_so, (int)matches[i].rm_eo ));
#else
Debug( LDAP_DEBUG_ACL, "=> match[%d]: %d %d ", i,
(int)matches[i].rm_so, (int)matches[i].rm_eo );
}
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_ARGS, "\n" ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_ARGS, "\n" ));
#else
Debug( LDAP_DEBUG_ARGS, "\n", 0, 0, 0 );
#endif
if ( ACL_IS_INVALID( mask ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "access_allowed: conn %d \"%s\" (%s) invalid!\n",
- conn->c_connid, e->e_dn, attr ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "access_allowed: conn %d \"%s\" (%s) invalid!\n",
+ conn->c_connid, e->e_dn, attr ));
#else
Debug( LDAP_DEBUG_ACL,
"=> access_allowed: \"%s\" (%s) invalid!\n",
} else if ( control == ACL_BREAK ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "access_allowed: conn %d no more rules\n", conn->c_connid ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "access_allowed: conn %d no more rules\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ACL,
"=> access_allowed: no more rules\n", 0, 0, 0);
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_ENTRY,
- "access_allowed: conn %d %s access %s by %s\n",
- access2str( access ),
- ACL_GRANT( mask, access ) ? "granted" : "denied",
- accessmask2str( mask, accessmaskbuf ) ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_ENTRY,
+ "access_allowed: conn %d %s access %s by %s\n",
+ access2str( access ),
+ ACL_GRANT( mask, access ) ? "granted" : "denied",
+ accessmask2str( mask, accessmaskbuf ) ));
#else
Debug( LDAP_DEBUG_ACL,
"=> access_allowed: %s access %s by %s\n",
if (a->acl_dn_pat != NULL) {
if ( a->acl_dn_style == ACL_STYLE_REGEX ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_get: dnpat [%d] %s nsub: %d\n",
- *count, a->acl_dn_pat, (int) a->acl_dn_re.re_nsub ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "acl_get: dnpat [%d] %s nsub: %d\n",
+ *count, a->acl_dn_pat, (int) a->acl_dn_re.re_nsub ));
#else
Debug( LDAP_DEBUG_ACL, "=> dnpat: [%d] %s nsub: %d\n",
*count, a->acl_dn_pat, (int) a->acl_dn_re.re_nsub );
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_get: dn [%d] %s\n",
- *count, a->acl_dn_pat ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "acl_get: dn [%d] %s\n",
+ *count, a->acl_dn_pat ));
#else
Debug( LDAP_DEBUG_ACL, "=> dn: [%d] %s\n",
*count, a->acl_dn_pat, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_get: [%d] matched\n",
- *count ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "acl_get: [%d] matched\n",
+ *count ));
#else
Debug( LDAP_DEBUG_ACL, "=> acl_get: [%d] matched\n",
*count, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_get: [%d] check attr %s\n",
- *count, attr ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "acl_get: [%d] check attr %s\n",
+ *count, attr ));
#else
- Debug( LDAP_DEBUG_ACL, "=> acl_get: [%d] check attr %s\n",
- *count, attr, 0);
+ Debug( LDAP_DEBUG_ACL, "=> acl_get: [%d] check attr %s\n",
+ *count, attr, 0);
#endif
if ( attr == NULL || a->acl_attrs == NULL ||
ad_inlist( desc, a->acl_attrs ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_get: [%d] acl %s attr: %s\n",
- *count, e->e_dn, attr ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "acl_get: [%d] acl %s attr: %s\n",
+ *count, e->e_dn, attr ));
#else
Debug( LDAP_DEBUG_ACL,
"<= acl_get: [%d] acl %s attr: %s\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_ENTRY,
- "acl_get: done.\n" ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_ENTRY,
+ "acl_get: done.\n" ));
#else
Debug( LDAP_DEBUG_ACL, "<= acl_get: done.\n", 0, 0, 0 );
#endif
assert( mask != NULL );
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_ENTRY,
- "acl_mask: conn %d access to entry \"%s\", attr \"%s\" requested\n",
- conn->c_connid, e->e_dn, attr ));
-
- LDAP_LOG(( "acl", LDAP_LEVEL_ARGS,
- " to %s by \"%s\", (%s) \n",
- val ? "value" : "all values",
- op->o_ndn ? op->o_ndn : "",
- accessmask2str( *mask, accessmaskbuf ) ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_ENTRY,
+ "acl_mask: conn %d access to entry \"%s\", attr \"%s\" requested\n",
+ conn->c_connid, e->e_dn, attr ));
+
+ LDAP_LOG(( "acl", LDAP_LEVEL_ARGS,
+ " to %s by \"%s\", (%s) \n",
+ val ? "value" : "all values",
+ op->o_ndn ? op->o_ndn : "",
+ accessmask2str( *mask, accessmaskbuf ) ));
#else
Debug( LDAP_DEBUG_ACL,
"=> acl_mask: access to entry \"%s\", attr \"%s\" requested\n",
/* AND <who> clauses */
if ( b->a_dn_pat != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_mask: conn %d check a_dn_pat: %s\n",
- conn->c_connid, b->a_dn_pat ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "acl_mask: conn %d check a_dn_pat: %s\n",
+ conn->c_connid, b->a_dn_pat ));
#else
Debug( LDAP_DEBUG_ACL, "<= check a_dn_pat: %s\n",
b->a_dn_pat, 0, 0);
if ( b->a_sockurl_pat != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_mask: conn %d check a_sockurl_pat: %s\n",
- conn->c_connid, b->a_sockurl_pat ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "acl_mask: conn %d check a_sockurl_pat: %s\n",
+ conn->c_connid, b->a_sockurl_pat ));
#else
Debug( LDAP_DEBUG_ACL, "<= check a_sockurl_pat: %s\n",
b->a_sockurl_pat, 0, 0 );
if ( b->a_domain_pat != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_mask: conn %d check a_domain_pat: %s\n",
- conn->c_connid, b->a_domain_pat ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "acl_mask: conn %d check a_domain_pat: %s\n",
+ conn->c_connid, b->a_domain_pat ));
#else
Debug( LDAP_DEBUG_ACL, "<= check a_domain_pat: %s\n",
b->a_domain_pat, 0, 0 );
if ( b->a_peername_pat != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_mask: conn %d check a_perrname_path: %s\n",
- conn->c_connid, b->a_peername_pat ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "acl_mask: conn %d check a_perrname_path: %s\n",
+ conn->c_connid, b->a_peername_pat ));
#else
Debug( LDAP_DEBUG_ACL, "<= check a_peername_path: %s\n",
b->a_peername_pat, 0, 0 );
if ( b->a_sockname_pat != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_mask: conn %d check a_sockname_path: %s\n",
- conn->c_connid, b->a_sockname_pat ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "acl_mask: conn %d check a_sockname_path: %s\n",
+ conn->c_connid, b->a_sockname_pat ));
#else
Debug( LDAP_DEBUG_ACL, "<= check a_sockname_path: %s\n",
b->a_sockname_pat, 0, 0 );
const char *desc = b->a_dn_at->ad_cname->bv_val;
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_mask: conn %d check a_dn_pat: %s\n",
- conn->c_connid, desc ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "acl_mask: conn %d check a_dn_pat: %s\n",
+ conn->c_connid, desc ));
#else
Debug( LDAP_DEBUG_ACL, "<= check a_dn_at: %s\n",
desc, 0, 0);
if ( b->a_authz.sai_ssf ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_mask: conn %d check a_authz.sai_ssf: ACL %u > OP %u\n",
- conn->c_connid, b->a_authz.sai_ssf, op->o_ssf ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "acl_mask: conn %d check a_authz.sai_ssf: ACL %u > OP %u\n",
+ conn->c_connid, b->a_authz.sai_ssf, op->o_ssf ));
#else
Debug( LDAP_DEBUG_ACL, "<= check a_authz.sai_ssf: ACL %u > OP %u\n",
b->a_authz.sai_ssf, op->o_ssf, 0 );
if ( b->a_authz.sai_transport_ssf ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_mask: conn %d check a_authz.sai_transport_ssf: ACL %u > OP %u\n",
- conn->c_connid, b->a_authz.sai_transport_ssf, op->o_transport_ssf ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "acl_mask: conn %d check a_authz.sai_transport_ssf: ACL %u > OP %u\n",
+ conn->c_connid, b->a_authz.sai_transport_ssf, op->o_transport_ssf ));
#else
Debug( LDAP_DEBUG_ACL,
"<= check a_authz.sai_transport_ssf: ACL %u > OP %u\n",
if ( b->a_authz.sai_tls_ssf ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_mask: conn %d check a_authz.sai_tls_ssf: ACL %u > OP %u\n",
- conn->c_connid, b->a_authz.sai_tls_ssf, op->o_tls_ssf ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "acl_mask: conn %d check a_authz.sai_tls_ssf: ACL %u > OP %u\n",
+ conn->c_connid, b->a_authz.sai_tls_ssf, op->o_tls_ssf ));
#else
Debug( LDAP_DEBUG_ACL,
"<= check a_authz.sai_tls_ssf: ACL %u > OP %u\n",
if ( b->a_authz.sai_sasl_ssf ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_mask: conn %d check a_authz.sai_sasl_ssf: ACL %u > OP %u\n",
- conn->c_connid, b->a_authz.sai_sasl_ssf, op->o_sasl_ssf ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "acl_mask: conn %d check a_authz.sai_sasl_ssf: ACL %u > OP %u\n",
+ conn->c_connid, b->a_authz.sai_sasl_ssf, op->o_sasl_ssf ));
#else
Debug( LDAP_DEBUG_ACL,
"<= check a_authz.sai_sasl_ssf: ACL %u > OP %u\n",
b->a_authz.sai_sasl_ssf, op->o_sasl_ssf, 0 );
#endif
- if ( b->a_authz.sai_sasl_ssf > op->o_sasl_ssf ) {
+ if ( b->a_authz.sai_sasl_ssf > op->o_sasl_ssf ) {
continue;
}
}
* by clauses that return grant/deny pairs. Right now, it does either
* additive or subtractive rights, but not both at the same time. So,
* we need to combine the grant/deny pair into a single rights mask in
- * a smart way: if either grant or deny is "empty", then we use the
+ * a smart way: if either grant or deny is "empty", then we use the
* opposite as is, otherwise we remove any denied rights from the grant
* rights mask and construct an additive mask.
*/
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_RESULTS,
- "acl_mask: conn %d [%d] applying %s (%s)\n",
- conn->c_connid, i, accessmask2str( modmask, accessmaskbuf),
- b->a_type == ACL_CONTINUE ? "continue" : b->a_type == ACL_BREAK
- ? "break" : "stop" ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_RESULTS,
+ "acl_mask: conn %d [%d] applying %s (%s)\n",
+ conn->c_connid, i, accessmask2str( modmask, accessmaskbuf),
+ b->a_type == ACL_CONTINUE ? "continue" : b->a_type == ACL_BREAK
+ ? "break" : "stop" ));
#else
Debug( LDAP_DEBUG_ACL,
"<= acl_mask: [%d] applying %s (%s)\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL1,
- "acl_mask: conn %d [%d] mask: %s\n",
- conn->c_connid, i, accessmask2str( *mask, accessmaskbuf) ));
+ LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL1,
+ "acl_mask: conn %d [%d] mask: %s\n",
+ conn->c_connid, i, accessmask2str( *mask, accessmaskbuf) ));
#else
Debug( LDAP_DEBUG_ACL,
"<= acl_mask: [%d] mask: %s\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "aci", LDAP_LEVEL_RESULTS,
- "acl_mask: conn %d no more <who> clauses, returning %d (stop)\n",
- conn->c_connid, accessmask2str( *mask, accessmaskbuf) ));
+ LDAP_LOG(( "aci", LDAP_LEVEL_RESULTS,
+ "acl_mask: conn %d no more <who> clauses, returning %d (stop)\n",
+ conn->c_connid, accessmask2str( *mask, accessmaskbuf) ));
#else
Debug( LDAP_DEBUG_ACL,
"<= acl_mask: no more <who> clauses, returning %s (stop)\n",
/* short circuit root database access */
if ( be_isroot( be, op->o_ndn ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_check_modlist: conn %d access granted to root user\n",
- conn->c_connid ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ "acl_check_modlist: conn %d access granted to root user\n",
+ conn->c_connid ));
#else
Debug( LDAP_DEBUG_ACL,
"<= acl_access_allowed: granted to database root\n",
/* use backend default access if no backend acls */
if( be != NULL && be->be_acl == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL1,
- "acl_check_modlist: conn %d backend default %s access %s to \"%s\"\n",
- conn->c_connid, access2str( ACL_WRITE ),
- be->be_dfltaccess >= ACL_WRITE ? "granted" : "denied", op->o_dn ));
+ LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL1,
+ "acl_check_modlist: conn %d backend default %s access %s to \"%s\"\n",
+ conn->c_connid, access2str( ACL_WRITE ),
+ be->be_dfltaccess >= ACL_WRITE ? "granted" : "denied", op->o_dn ));
#else
Debug( LDAP_DEBUG_ACL,
"=> access_allowed: backend default %s access %s to \"%s\"\n",
/* use global default access if no global acls */
} else if ( be == NULL && global_acl == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL1,
- "acl_check_modlist: conn %d global default %s access %s to \"%s\"\n",
- conn->c_connid, access2str( ACL_WRITE ),
- global_default_access >= ACL_WRITE ? "granted" : "denied", op->o_dn ));
+ LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL1,
+ "acl_check_modlist: conn %d global default %s access %s to \"%s\"\n",
+ conn->c_connid, access2str( ACL_WRITE ),
+ global_default_access >= ACL_WRITE ? "granted" : "denied", op->o_dn ));
#else
Debug( LDAP_DEBUG_ACL,
"=> access_allowed: global default %s access %s to \"%s\"\n",
*/
if ( is_at_no_user_mod( mlist->sml_desc->ad_type ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL1,
- "acl_check_modlist: conn %d no-user-mod %s: modify access granted\n",
- conn->c_connid, mlist->sml_desc->ad_cname->bv_val ));
+ LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL1,
+ "acl_check_modlist: conn %d no-user-mod %s: modify access granted\n",
+ conn->c_connid, mlist->sml_desc->ad_cname->bv_val ));
#else
- Debug( LDAP_DEBUG_ACL, "acl: no-user-mod %s:"
+ Debug( LDAP_DEBUG_ACL, "acl: no-user-mod %s:"
" modify access granted\n",
mlist->sml_desc->ad_cname->bv_val, 0, 0 );
#endif
aci_set_gather (void *cookie, char *name, char *attr)
{
struct {
- Backend *be;
- Entry *e;
- Connection *conn;
- Operation *op;
+ Backend *be;
+ Entry *e;
+ Connection *conn;
+ Operation *op;
} *cp = (void *)cookie;
struct berval **bvals = NULL;
char **vals = NULL;
char *set = NULL;
int rc = 0;
struct {
- Backend *be;
- Entry *e;
- Connection *conn;
- Operation *op;
+ Backend *be;
+ Entry *e;
+ Connection *conn;
+ Operation *op;
} cookie;
if (setref == 0) {
char *match,
regmatch_t *matches)
{
- int size;
+ int size;
char *sp;
char *dp;
- int flag;
+ int flag;
size = 0;
newbuf[0] = '\0';
*dp++ = '$';
size++;
} else if (*sp >= '0' && *sp <= '9' ) {
- int n;
- int i;
- int l;
+ int n;
+ int i;
+ int l;
n = *sp - '0';
*dp = '\0';
*dp = '\0';
#ifdef NEW_LOGGING
- LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL1,
- "string_expand: pattern = %s\n", pat ));
- LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL1,
- "string_expand: expanded = %s\n", newbuf ));
+ LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL1,
+ "string_expand: pattern = %s\n", pat ));
+ LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL1,
+ "string_expand: expanded = %s\n", newbuf ));
#else
Debug( LDAP_DEBUG_TRACE, "=> string_expand: pattern: %s\n", pat, 0, 0 );
Debug( LDAP_DEBUG_TRACE, "=> string_expand: expanded: %s\n", newbuf, 0, 0 );
regerror(rc, &re, error, sizeof(error));
#ifdef NEW_LOGGING
- LDAP_LOG(( "aci", LDAP_LEVEL_ERR,
- "regex_matches: compile( \"%s\", \"%s\") failed %s\n",
- pat, str, error ));
+ LDAP_LOG(( "aci", LDAP_LEVEL_ERR,
+ "regex_matches: compile( \"%s\", \"%s\") failed %s\n",
+ pat, str, error ));
#else
Debug( LDAP_DEBUG_TRACE,
"compile( \"%s\", \"%s\") failed %s\n",
regfree( &re );
#ifdef NEW_LOGGING
- LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL2,
- "regex_matches: string: %s\n", str ));
- LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL2,
- "regex_matches: rc: %d %s\n",
- rc, rc ? "matches" : "no matches" ));
+ LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL2,
+ "regex_matches: string: %s\n", str ));
+ LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL2,
+ "regex_matches: rc: %d %s\n",
+ rc, rc ? "matches" : "no matches" ));
#else
Debug( LDAP_DEBUG_TRACE,
- "=> regex_matches: string: %s\n", str, 0, 0 );
+ "=> regex_matches: string: %s\n", str, 0, 0 );
Debug( LDAP_DEBUG_TRACE,
"=> regex_matches: rc: %d %s\n",
rc, !rc ? "matches" : "no matches", 0 );
int manageDSAit;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "do_add: conn %d enter\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "do_add: conn %d enter\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_TRACE, "do_add\n", 0, 0, 0 );
#endif
/* get the name */
if ( ber_scanf( ber, "{a", /*}*/ &dn ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_add: conn %d ber_scanf failed\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_add: conn %d ber_scanf failed\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "do_add: ber_scanf failed\n", 0, 0, 0 );
#endif
if ( dn_normalize( ndn ) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_add: conn %d invalid dn (%s)\n", conn->c_connid, dn ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_add: conn %d invalid dn (%s)\n", conn->c_connid, dn ));
#else
Debug( LDAP_DEBUG_ANY, "do_add: invalid dn (%s)\n", dn, 0, 0 );
#endif
e->e_private = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_add: conn %d ndn (%s)\n", conn->c_connid, e->e_ndn ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
+ "do_add: conn %d ndn (%s)\n", conn->c_connid, e->e_ndn ));
#else
Debug( LDAP_DEBUG_ARGS, "do_add: ndn (%s)\n", e->e_ndn, 0, 0 );
#endif
if ( rc == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_add: conn %d decoding error \n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_add: conn %d decoding error \n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "do_add: decoding error\n", 0, 0, 0 );
#endif
if ( mod->ml_bvalues == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_add: conn %d no values for type %s\n",
- conn->c_connid, mod->ml_type ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "do_add: conn %d no values for type %s\n",
+ conn->c_connid, mod->ml_type ));
#else
Debug( LDAP_DEBUG_ANY, "no values for type %s\n",
mod->ml_type, 0, 0 );
if ( ber_scanf( ber, /*{*/ "}") == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_add: conn %d ber_scanf failed\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_add: conn %d ber_scanf failed\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "do_add: ber_scanf failed\n", 0, 0, 0 );
#endif
if( (rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_add: conn %d get_ctrls failed\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "do_add: conn %d get_ctrls failed\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "do_add: get_ctrls failed\n", 0, 0, 0 );
#endif
}
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_add: conn %d no backend support\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "do_add: conn %d no backend support\n", conn->c_connid ));
#else
- Debug( LDAP_DEBUG_ARGS, " do_add: no backend support\n", 0, 0, 0 );
+ Debug( LDAP_DEBUG_ARGS, " do_add: no backend support\n", 0, 0, 0 );
#endif
- send_ldap_result( conn, op, rc = LDAP_UNWILLING_TO_PERFORM,
- NULL, "operation not supported within namingContext", NULL, NULL );
+ send_ldap_result( conn, op, rc = LDAP_UNWILLING_TO_PERFORM,
+ NULL, "operation not supported within namingContext", NULL, NULL );
}
done:
if( rc == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "get_ava: ber_scanf failure\n" ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
+ "get_ava: ber_scanf failure\n" ));
#else
Debug( LDAP_DEBUG_ANY, " get_ava ber_scanf\n", 0, 0, 0 );
#endif
if((nBackendInfo != 0) || (backendInfo != NULL)) {
/* already initialized */
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "backend_init: backend already initialized\n" ));
+ LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
+ "backend_init: backend already initialized\n" ));
#else
Debug( LDAP_DEBUG_ANY,
"backend_init: already initialized.\n", 0, 0, 0 );
if(rc != 0) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "backend_init: initialized for type \"%s\"\n",
- binfo[nBackendInfo].bi_type ));
+ LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
+ "backend_init: initialized for type \"%s\"\n",
+ binfo[nBackendInfo].bi_type ));
#else
Debug( LDAP_DEBUG_ANY,
"backend_init: initialized for type \"%s\"\n",
if( ! ( nBackendDB > 0 ) ) {
/* no databases */
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "backend_startup: %d databases to startup. \n",
- nBackendDB ));
+ LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
+ "backend_startup: %d databases to startup. \n",
+ nBackendDB ));
#else
Debug( LDAP_DEBUG_ANY,
"backend_startup: %d databases to startup.\n",
if(be != NULL) {
/* startup a specific backend database */
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "backend_startup: starting \"%s\"\n",
- be->be_suffix[0] ));
+ LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
+ "backend_startup: starting \"%s\"\n",
+ be->be_suffix[0] ));
#else
Debug( LDAP_DEBUG_TRACE,
"backend_startup: starting \"%s\"\n",
if(rc != 0) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "backend_startup: bi_open failed!\n" ));
+ LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
+ "backend_startup: bi_open failed!\n" ));
#else
Debug( LDAP_DEBUG_ANY,
"backend_startup: bi_open failed!\n",
if(rc != 0) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "backend_startup: bi_db_open failed!\n" ));
+ LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
+ "backend_startup: bi_db_open failed!\n" ));
#else
Debug( LDAP_DEBUG_ANY,
"backend_startup: bi_db_open failed!\n",
if(rc != 0) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "backend_startup: bi_open %d failed!\n", i ));
+ LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
+ "backend_startup: bi_open %d failed!\n", i ));
#else
Debug( LDAP_DEBUG_ANY,
"backend_startup: bi_open %d failed!\n",
if(rc != 0) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "backend_startup: bi_db_open %d failed!\n", i ));
+ LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
+ "backend_startup: bi_db_open %d failed!\n", i ));
#else
Debug( LDAP_DEBUG_ANY,
"backend_startup: bi_db_open %d failed!\n",
if(rc != 0) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_NOTICE,
- "backend_shutdown: bi_close %s failed!\n",
- backendDB[i].be_type ));
+ LDAP_LOG(( "backend", LDAP_LEVEL_NOTICE,
+ "backend_shutdown: bi_close %s failed!\n",
+ backendDB[i].be_type ));
#else
Debug( LDAP_DEBUG_ANY,
"backend_close: bi_close %s failed!\n",
Backend *be;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY, "do_bind: conn %d\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY, "do_bind: conn %d\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_TRACE, "do_bind\n", 0, 0, 0 );
#endif
* }
*
* SaslCredentials ::= SEQUENCE {
- * mechanism LDAPString,
- * credentials OCTET STRING OPTIONAL
+ * mechanism LDAPString,
+ * credentials OCTET STRING OPTIONAL
* }
*/
if ( tag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_bind: conn %d ber_scanf failed\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_bind: conn %d ber_scanf failed\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "bind: ber_scanf failed\n", 0, 0, 0 );
#endif
if ( tag == LBER_ERROR ) {
send_ldap_disconnect( conn, op,
LDAP_PROTOCOL_ERROR,
- "decoding error" );
+ "decoding error" );
rc = SLAPD_DISCONNECT;
goto cleanup;
}
if( (rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_bind: conn %d get_ctrls failed\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "do_bind: conn %d get_ctrls failed\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "do_bind: get_ctrls failed\n", 0, 0, 0 );
#endif
if ( dn_normalize( ndn ) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_bind: conn %d invalid dn (%s)\n", conn->c_connid, dn ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "do_bind: conn %d invalid dn (%s)\n", conn->c_connid, dn ));
#else
Debug( LDAP_DEBUG_ANY, "bind: invalid dn (%s)\n", dn, 0, 0 );
#endif
if( method == LDAP_AUTH_SASL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "do_sasl_bind: conn %d dn (%s) mech %s\n", conn->c_connid,
- dn, mech ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
+ "do_sasl_bind: conn %d dn (%s) mech %s\n", conn->c_connid,
+ dn, mech ));
#else
Debug( LDAP_DEBUG_TRACE, "do_sasl_bind: dn (%s) mech %s\n",
dn, mech, NULL );
#endif
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "do_bind: conn %d version=%ld dn=\"%s\" method=%ld\n",
- conn->c_connid, (unsigned long) version, dn, (unsigned long)method ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
+ "do_bind: conn %d version=%ld dn=\"%s\" method=%ld\n",
+ conn->c_connid, (unsigned long) version, dn, (unsigned long)method ));
#else
Debug( LDAP_DEBUG_TRACE, "do_bind: version=%ld dn=\"%s\" method=%ld\n",
(unsigned long) version, dn, (unsigned long) method );
#endif
}
- Statslog( LDAP_DEBUG_STATS, "conn=%ld op=%d BIND dn=\"%s\" method=%ld\n",
+ Statslog( LDAP_DEBUG_STATS, "conn=%ld op=%d BIND dn=\"%s\" method=%ld\n",
op->o_connid, op->o_opid, ndn, (unsigned long) method, 0 );
if ( version < LDAP_VERSION_MIN || version > LDAP_VERSION_MAX ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_bind: conn %d unknown version = %ld\n",
- conn->c_connid, (unsigned long)version ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "do_bind: conn %d unknown version = %ld\n",
+ conn->c_connid, (unsigned long)version ));
#else
Debug( LDAP_DEBUG_ANY, "do_bind: unknown version=%ld\n",
(unsigned long) version, 0, 0 );
if ( version < LDAP_VERSION3 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_bind: conn %d sasl with LDAPv%ld\n",
- conn->c_connid, (unsigned long)version ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "do_bind: conn %d sasl with LDAPv%ld\n",
+ conn->c_connid, (unsigned long)version ));
#else
Debug( LDAP_DEBUG_ANY, "do_bind: sasl with LDAPv%ld\n",
(unsigned long) version, 0, 0 );
if( mech == NULL || *mech == '\0' ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_bind: conn %d no SASL mechanism provided\n",
- conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "do_bind: conn %d no SASL mechanism provided\n",
+ conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY,
"do_bind: no sasl mechanism provided\n",
send_ldap_result( conn, op, rc,
NULL, text, NULL, NULL );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "do_bind: conn %d v%d anonymous bind\n",
- conn->c_connid, version ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
+ "do_bind: conn %d v%d anonymous bind\n",
+ conn->c_connid, version ));
#else
Debug( LDAP_DEBUG_TRACE, "do_bind: v%d anonymous bind\n",
- version, 0, 0 );
+ version, 0, 0 );
#endif
goto cleanup;
send_ldap_result( conn, op, rc,
NULL, text, NULL, NULL );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_bind: conn %d v%d simple bind(%s) disallowed\n",
- conn->c_connid, version, ndn ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "do_bind: conn %d v%d simple bind(%s) disallowed\n",
+ conn->c_connid, version, ndn ));
#else
Debug( LDAP_DEBUG_TRACE,
"do_bind: v%d simple bind(%s) disallowed\n",
- version, ndn, 0 );
+ version, ndn, 0 );
#endif
goto cleanup;
}
send_ldap_result( conn, op, rc,
NULL, text, NULL, NULL );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "do_bind: conn %d v%d Kerberos V4 bind\n",
- conn->c_connid, version ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
+ "do_bind: conn %d v%d Kerberos V4 bind\n",
+ conn->c_connid, version ));
#else
Debug( LDAP_DEBUG_TRACE, "do_bind: v%d Kerberos V4 bind\n",
version, 0, 0 );
send_ldap_result( conn, op, rc,
NULL, text, NULL, NULL );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_bind: conn %d v%d unknown authentication method (%d)\n",
- conn->c_connid, version, method ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "do_bind: conn %d v%d unknown authentication method (%d)\n",
+ conn->c_connid, version, method ));
#else
Debug( LDAP_DEBUG_TRACE,
"do_bind: v%d unknown authentication method (%d)\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "do_bind: conn %d v%d bind: \"%s\" to \"%s\" \n",
- conn->c_connid, version, conn->c_cdn, conn->c_dn ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
+ "do_bind: conn %d v%d bind: \"%s\" to \"%s\" \n",
+ conn->c_connid, version, conn->c_cdn, conn->c_dn ));
#else
Debug( LDAP_DEBUG_TRACE, "do_bind: v%d bind: \"%s\" to \"%s\"\n",
- version, conn->c_cdn, conn->c_dn );
+ version, conn->c_cdn, conn->c_dn );
#endif
ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
if ( (new = (void *) ber_memalloc( size )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "ch_malloc: allocation of %lu bytes failed\n",
- (long)size ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "ch_malloc: allocation of %lu bytes failed\n",
+ (long)size ));
#else
Debug( LDAP_DEBUG_ANY, "ch_malloc of %lu bytes failed\n",
(long) size, 0, 0 );
if ( (new = (void *) ber_memrealloc( block, size )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "ch_realloc: reallocation of %lu bytes failed\n", (long)size ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "ch_realloc: reallocation of %lu bytes failed\n", (long)size ));
#else
Debug( LDAP_DEBUG_ANY, "ch_realloc of %lu bytes failed\n",
(long) size, 0, 0 );
if ( (new = (void *) ber_memcalloc( nelem, size )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "ch_calloc: allocation of %lu elements of %lu bytes faild\n",
- (long)nelem, (long)size ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "ch_calloc: allocation of %lu elements of %lu bytes faild\n",
+ (long)nelem, (long)size ));
#else
Debug( LDAP_DEBUG_ANY, "ch_calloc of %lu elems of %lu bytes failed\n",
(long) nelem, (long) size, 0 );
if ( (new = ber_strdup( string )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "chr_strdup: duplication of \"%s\" failed\n", string ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "chr_strdup: duplication of \"%s\" failed\n", string ));
#else
Debug( LDAP_DEBUG_ANY, "ch_strdup(%s) failed\n", string, 0, 0 );
#endif
value.bv_val = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "do_compare: conn %d\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "do_compare: conn %d\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_TRACE, "do_compare\n", 0, 0, 0 );
#endif
if ( ber_scanf( op->o_ber, "{a" /*}*/, &dn ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_compare: conn %d ber_scanf failed\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_compare: conn %d ber_scanf failed\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "ber_scanf failed\n", 0, 0, 0 );
#endif
if ( ber_scanf( op->o_ber, "{oo}", &desc, &value ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_compare: conn %d get ava failed\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_compare: conn %d get ava failed\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "do_compare: get ava failed\n", 0, 0, 0 );
#endif
if ( ber_scanf( op->o_ber, /*{*/ "}" ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_compare: conn %d ber_scanf failed\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_compare: conn %d ber_scanf failed\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "ber_scanf failed\n", 0, 0, 0 );
#endif
if( ( rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_compare: conn %d get_ctrls failed\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "do_compare: conn %d get_ctrls failed\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "do_compare: get_ctrls failed\n", 0, 0, 0 );
#endif
if( dn_normalize( ndn ) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_compare: conn %d invalid dn (%s)\n",
- conn->c_connid, dn ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "do_compare: conn %d invalid dn (%s)\n",
+ conn->c_connid, dn ));
#else
Debug( LDAP_DEBUG_ANY, "do_compare: invalid dn (%s)\n", dn, 0, 0 );
#endif
if( ndn == '\0' ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "do_compare: conn %d compare to root DSE!\n",
- conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
+ "do_compare: conn %d compare to root DSE!\n",
+ conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "do_compare: root dse!\n", 0, 0, 0 );
#endif
ava.aa_value = nvalue;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_compare: conn %d dn (%s) attr(%s) value (%s)\n",
- conn->c_connid, dn, ava.aa_desc->ad_cname->bv_val,
- ava.aa_value->bv_val ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
+ "do_compare: conn %d dn (%s) attr(%s) value (%s)\n",
+ conn->c_connid, dn, ava.aa_desc->ad_cname->bv_val,
+ ava.aa_value->bv_val ));
#else
Debug( LDAP_DEBUG_ARGS, "do_compare: dn (%s) attr (%s) value (%s)\n",
dn, ava.aa_desc->ad_cname->bv_val, ava.aa_value->bv_val );
if( connections != NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "connections_init: already initialized.\n" ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "connections_init: already initialized.\n" ));
#else
Debug( LDAP_DEBUG_ANY, "connections_init: already initialized.\n",
0, 0, 0 );
if( connections == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connections_init: allocation (%d * %ld) of connection array failed\n",
- dtblsize, (long) sizeof(Connection) ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "connections_init: allocation (%d * %ld) of connection array failed\n",
+ dtblsize, (long) sizeof(Connection) ));
#else
Debug( LDAP_DEBUG_ANY,
"connections_init: allocation (%d*%ld) of connection array failed\n",
if( connections == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "connections_destroy: nothing to destroy.\n"));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "connections_destroy: nothing to destroy.\n"));
#else
Debug( LDAP_DEBUG_ANY, "connections_destroy: nothing to destroy.\n",
0, 0, 0 );
int connindex;
Connection* c;
- for( c = connection_first( &connindex );
+ for( c = connection_first( &connindex );
c != NULL;
c = connection_next( c, &connindex ) )
{
Connection *c;
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ENTRY,
- "connection_get: socket %ld\n", (long)s ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ENTRY,
+ "connection_get: socket %ld\n", (long)s ));
#else
Debug( LDAP_DEBUG_ARGS,
"connection_get(%ld)\n",
assert( sd == AC_SOCKET_INVALID );
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ARGS,
- "connection_get: connection %d not used\n", s ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ARGS,
+ "connection_get: connection %d not used\n", s ));
#else
Debug( LDAP_DEBUG_TRACE,
"connection_get(%d): connection not used\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_RESULTS,
- "connection_get: get for %d got connid %ld\n",s, c->c_connid ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_RESULTS,
+ "connection_get: get for %d got connid %ld\n",s, c->c_connid ));
#else
Debug( LDAP_DEBUG_TRACE,
"connection_get(%d): got connid=%ld\n",
assert( c->c_conn_state != SLAP_C_INVALID );
assert( sd != AC_SOCKET_INVALID );
- c->c_activitytime = slap_get_time();
+ c->c_activitytime = slap_get_time();
}
return c;
if( s == AC_SOCKET_INVALID ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "connection_init: init of socket %ld invalid.\n", (long)s ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "connection_init: init of socket %ld invalid.\n", (long)s ));
#else
- Debug( LDAP_DEBUG_ANY,
- "connection_init(%ld): invalid.\n",
- (long) s, 0, 0 );
+ Debug( LDAP_DEBUG_ANY,
+ "connection_init(%ld): invalid.\n",
+ (long) s, 0, 0 );
#endif
return -1;
}
c = NULL;
- for( i=0; i < dtblsize; i++) {
- ber_socket_t sd;
+ for( i=0; i < dtblsize; i++) {
+ ber_socket_t sd;
- if( connections[i].c_struct_state == SLAP_C_UNINITIALIZED ) {
- assert( connections[i].c_sb == 0 );
- c = &connections[i];
- break;
- }
+ if( connections[i].c_struct_state == SLAP_C_UNINITIALIZED ) {
+ assert( connections[i].c_sb == 0 );
+ c = &connections[i];
+ break;
+ }
sd = AC_SOCKET_INVALID;
if (connections[i].c_sb != NULL)
- ber_sockbuf_ctrl( connections[i].c_sb, LBER_SB_OPT_GET_FD, &sd );
+ ber_sockbuf_ctrl( connections[i].c_sb, LBER_SB_OPT_GET_FD, &sd );
- if( connections[i].c_struct_state == SLAP_C_UNUSED ) {
- assert( sd == AC_SOCKET_INVALID );
- c = &connections[i];
- break;
- }
-
- assert( connections[i].c_struct_state == SLAP_C_USED );
- assert( connections[i].c_conn_state != SLAP_C_INVALID );
- assert( sd != AC_SOCKET_INVALID );
- }
-
- if( c == NULL ) {
+ if( connections[i].c_struct_state == SLAP_C_UNUSED ) {
+ assert( sd == AC_SOCKET_INVALID );
+ c = &connections[i];
+ break;
+ }
+
+ assert( connections[i].c_struct_state == SLAP_C_USED );
+ assert( connections[i].c_conn_state != SLAP_C_INVALID );
+ assert( sd != AC_SOCKET_INVALID );
+ }
+
+ if( c == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "connection_init: skt %d connection table full (%d/%d)\n",
- s, i, dtblsize ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "connection_init: skt %d connection table full (%d/%d)\n",
+ s, i, dtblsize ));
#else
- Debug( LDAP_DEBUG_ANY,
+ Debug( LDAP_DEBUG_ANY,
"connection_init(%d): connection table full (%d/%d)\n",
s, i, dtblsize);
#endif
- ldap_pvt_thread_mutex_unlock( &connections_mutex );
- return -1;
- }
+ ldap_pvt_thread_mutex_unlock( &connections_mutex );
+ return -1;
+ }
}
#endif
if( c->c_struct_state == SLAP_C_UNINITIALIZED ) {
c->c_authmech = NULL;
- c->c_dn = NULL;
- c->c_cdn = NULL;
+ c->c_dn = NULL;
+ c->c_cdn = NULL;
c->c_listener_url = NULL;
c->c_peer_domain = NULL;
- c->c_peer_name = NULL;
- c->c_sock_name = NULL;
+ c->c_peer_name = NULL;
+ c->c_sock_name = NULL;
- c->c_ops = NULL;
- c->c_pending_ops = NULL;
+ c->c_ops = NULL;
+ c->c_pending_ops = NULL;
c->c_sasl_bind_mech = NULL;
c->c_sasl_context = NULL;
c->c_sasl_extra = NULL;
- c->c_sb = ber_sockbuf_alloc( );
+ c->c_sb = ber_sockbuf_alloc( );
c->c_currentber = NULL;
- /* should check status of thread calls */
- ldap_pvt_thread_mutex_init( &c->c_mutex );
- ldap_pvt_thread_mutex_init( &c->c_write_mutex );
- ldap_pvt_thread_cond_init( &c->c_write_cv );
+ /* should check status of thread calls */
+ ldap_pvt_thread_mutex_init( &c->c_mutex );
+ ldap_pvt_thread_mutex_init( &c->c_write_mutex );
+ ldap_pvt_thread_cond_init( &c->c_write_cv );
- c->c_struct_state = SLAP_C_UNUSED;
+ c->c_struct_state = SLAP_C_UNUSED;
}
ldap_pvt_thread_mutex_lock( &c->c_mutex );
c /* non-NULL */ ) < 0 )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "connection_init: conn %d set nonblocking failed\n",
- c->c_connid ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "connection_init: conn %d set nonblocking failed\n",
+ c->c_connid ));
#else
Debug( LDAP_DEBUG_ANY,
"connection_init(%d, %s): set nonblocking failed\n",
}
if(c->c_dn != NULL) {
- free(c->c_dn);
- c->c_dn = NULL;
+ free(c->c_dn);
+ c->c_dn = NULL;
}
if(c->c_cdn != NULL) {
c->c_connid, sd, 0, 0, 0 );
}
- ber_sockbuf_free( c->c_sb );
+ ber_sockbuf_free( c->c_sb );
c->c_sb = ber_sockbuf_alloc( );
c->c_conn_state = SLAP_C_INVALID;
ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_GET_FD, &sd );
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "connection_closing: conn %d readying socket %d for close.\n",
- c->c_connid, sd ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
+ "connection_closing: conn %d readying socket %d for close.\n",
+ c->c_connid, sd ));
#else
Debug( LDAP_DEBUG_TRACE,
"connection_closing: readying conn=%ld sd=%d for close\n",
ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_GET_FD, &sd );
if( c->c_ops != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "connection_close: conn %d deferring sd %d\n",
- c->c_connid, sd ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
+ "connection_close: conn %d deferring sd %d\n",
+ c->c_connid, sd ));
#else
Debug( LDAP_DEBUG_TRACE,
"connection_close: deferring conn=%ld sd=%d\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_RESULTS,
- "connection_close: conn %d sd %d\n",
- c->c_connid, sd ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_RESULTS,
+ "connection_close: conn %d sd %d\n",
+ c->c_connid, sd ));
#else
Debug( LDAP_DEBUG_TRACE, "connection_close: conn=%ld sd=%d\n",
c->c_connid, sd, 0 );
if( conn->c_sasl_bind_in_progress && tag != LDAP_REQ_BIND ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connection_operation: conn %d SASL bind in progress (tag=%ld).\n",
- conn->c_connid, (long)tag ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "connection_operation: conn %d SASL bind in progress (tag=%ld).\n",
+ conn->c_connid, (long)tag ));
#else
Debug( LDAP_DEBUG_ANY, "connection_operation: "
"error: SASL bind in progress (tag=%ld).\n",
default:
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "connection_operation: conn %d unknown LDAP request 0x%lx\n",
- conn->c_connid, tag ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "connection_operation: conn %d unknown LDAP request 0x%lx\n",
+ conn->c_connid, tag ));
#else
Debug( LDAP_DEBUG_ANY, "unknown LDAP request 0x%lx\n",
tag, 0, 0 );
if( c == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "connection_read: sock %ld no connection\n",
- (long)s ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "connection_read: sock %ld no connection\n",
+ (long)s ));
#else
Debug( LDAP_DEBUG_ANY,
"connection_read(%ld): no connection!\n",
if( c->c_conn_state == SLAP_C_CLOSING ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "connection_read: conn %d connection closing, ignoring input\n",
- c->c_connid));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "connection_read: conn %d connection closing, ignoring input\n",
+ c->c_connid));
#else
Debug( LDAP_DEBUG_TRACE,
"connection_read(%d): closing, ignoring input for id=%ld\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "connection_read: conn %d checking for input.\n", c->c_connid ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
+ "connection_read: conn %d checking for input.\n", c->c_connid ));
#else
Debug( LDAP_DEBUG_TRACE,
"connection_read(%d): checking for input on id=%ld\n",
fd_set rfd;
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connection_read: conn %d TLS accept error, error %d\n",
- c->c_connid, rc ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "connection_read: conn %d TLS accept error, error %d\n",
+ c->c_connid, rc ));
#else
Debug( LDAP_DEBUG_TRACE,
"connection_read(%d): TLS accept error "
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connection_read: conn %d SASL install error %d, closing\n",
- c->c_connid, rc ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "connection_read: conn %d SASL install error %d, closing\n",
+ c->c_connid, rc ));
#else
Debug( LDAP_DEBUG_TRACE,
"connection_read(%d): SASL install error "
if( rc < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connection_read: conn %d input error %d, closing.\n",
- c->c_connid, rc ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "connection_read: conn %d input error %d, closing.\n",
+ c->c_connid, rc ));
#else
Debug( LDAP_DEBUG_TRACE,
"connection_read(%d): input error=%d id=%ld, closing.\n",
if ( conn->c_currentber == NULL && (conn->c_currentber = ber_alloc())
== NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connection_input: conn %d ber_alloc failed.\n", conn->c_connid ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "connection_input: conn %d ber_alloc failed.\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "ber_alloc failed\n", 0, 0, 0 );
#endif
ber_sockbuf_ctrl( conn->c_sb, LBER_SB_OPT_GET_FD, &sd );
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connection_input: conn %d ber_get_next failed, errno %d (%s).\n",
- conn->c_connid, err, sock_errstr(err) ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "connection_input: conn %d ber_get_next failed, errno %d (%s).\n",
+ conn->c_connid, err, sock_errstr(err) ));
#else
Debug( LDAP_DEBUG_TRACE,
"ber_get_next on fd %d failed errno=%d (%s)\n",
if ( (tag = ber_get_int( ber, &msgid )) != LDAP_TAG_MSGID ) {
/* log, close and send error */
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connection_input: conn %d ber_get_int returns 0x%lx.\n",
- conn->c_connid, tag ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "connection_input: conn %d ber_get_int returns 0x%lx.\n",
+ conn->c_connid, tag ));
#else
Debug( LDAP_DEBUG_ANY, "ber_get_int returns 0x%lx\n", tag, 0,
0 );
if ( (tag = ber_peek_tag( ber, &len )) == LBER_ERROR ) {
/* log, close and send error */
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connection_input: conn %d ber_peek_tag returns 0x%lx.\n",
- conn->c_connid, tag ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "connection_input: conn %d ber_peek_tag returns 0x%lx.\n",
+ conn->c_connid, tag ));
#else
Debug( LDAP_DEBUG_ANY, "ber_peek_tag returns 0x%lx\n", tag, 0,
0 );
|| conn->c_conn_state == SLAP_C_CLOSING )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "connection_input: conn %d deferring operation\n",
- conn->c_connid ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "connection_input: conn %d deferring operation\n",
+ conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "deferring operation\n", 0, 0, 0 );
#endif
if( rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "connection_resched: conn %d reaquiring locks.\n",
- conn->c_connid ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
+ "connection_resched: conn %d reaquiring locks.\n",
+ conn->c_connid ));
#else
Debug( LDAP_DEBUG_TRACE,
"connection_resched: reaquiring locks conn=%ld sd=%d\n",
if( conn->c_conn_state != SLAP_C_CLOSING ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "connection_resched: conn %d closed by other thread.\n",
- conn->c_connid ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "connection_resched: conn %d closed by other thread.\n",
+ conn->c_connid ));
#else
Debug( LDAP_DEBUG_TRACE, "connection_resched: "
"closed by other thread conn=%ld sd=%d\n",
#endif
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "connection_resched: conn %d attempting closing.\n",
- conn->c_connid ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
+ "connection_resched: conn %d attempting closing.\n",
+ conn->c_connid ));
#else
Debug( LDAP_DEBUG_TRACE, "connection_resched: "
"attempting closing conn=%ld sd=%d\n",
if ( status != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connection_op_activate: conn %d thread pool submit failed.\n",
- conn->c_connid ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "connection_op_activate: conn %d thread pool submit failed.\n",
+ conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY,
"ldap_pvt_thread_pool_submit failed (%d)\n", status, 0, 0 );
if( c == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connection_write: sock %ld no connection!\n",(long)s));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "connection_write: sock %ld no connection!\n",(long)s));
#else
Debug( LDAP_DEBUG_ANY,
"connection_write(%ld): no connection!\n",
c->c_n_write++;
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "connection_write conn %d waking output.\n",
- c->c_connid ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
+ "connection_write conn %d waking output.\n",
+ c->c_connid ));
#else
Debug( LDAP_DEBUG_TRACE,
"connection_write(%d): waking output for id=%ld\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "get_ctrls: conn %d\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "get_ctrls: conn %d\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_TRACE, "=> get_ctrls\n", 0, 0, 0 );
#endif
if( tag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "get_ctrls: conn %d get OID failed.\n",
- conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "get_ctrls: conn %d get OID failed.\n",
+ conn->c_connid ));
#else
Debug( LDAP_DEBUG_TRACE, "=> get_ctrls: get oid failed.\n",
0, 0, 0 );
if( tag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "get_ctrls: conn %d get crit failed.\n",
- conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "get_ctrls: conn %d get crit failed.\n",
+ conn->c_connid ));
#else
Debug( LDAP_DEBUG_TRACE, "=> get_ctrls: get crit failed.\n",
0, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "get_ctrls: conn %d oid=\"%s\" (%scritical)\n",
- conn->c_connid, tctrl->ldctl_oid,
- tctrl->ldctl_iscritical ? "" : "non" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "get_ctrls: conn %d oid=\"%s\" (%scritical)\n",
+ conn->c_connid, tctrl->ldctl_oid,
+ tctrl->ldctl_iscritical ? "" : "non" ));
#else
Debug( LDAP_DEBUG_TRACE, "=> get_ctrls: oid=\"%s\" (%scritical)\n",
tctrl->ldctl_oid,
if( tag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "get_ctrls: conn %d get value failed.\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "get_ctrls: conn %d get value failed.\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_TRACE, "=> get_ctrls: get value failed.\n",
0, 0, 0 );
return_results:
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_RESULTS,
- "get_ctrls: conn %s %d %d %s\n",
- conn->c_connid, nctrls, rc, errmsg ? errmsg : "" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_RESULTS,
+ "get_ctrls: conn %s %d %d %s\n",
+ conn->c_connid, nctrls, rc, errmsg ? errmsg : "" ));
#else
Debug( LDAP_DEBUG_TRACE, "<= get_ctrls: %d %d %s\n",
nctrls, rc, errmsg ? errmsg : "");
FD_SET( s, &slap_daemon.sd_readers );
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "slapd_add: added %ld%s%s\n",
- (long)s,
- FD_ISSET(s, &slap_daemon.sd_readers) ? "r" : "",
- FD_ISSET(s, &slap_daemon.sd_writers) ? "w" : "" ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
+ "slapd_add: added %ld%s%s\n",
+ (long)s,
+ FD_ISSET(s, &slap_daemon.sd_readers) ? "r" : "",
+ FD_ISSET(s, &slap_daemon.sd_writers) ? "w" : "" ));
#else
Debug( LDAP_DEBUG_CONNS, "daemon: added %ld%s%s\n",
(long) s,
ldap_pvt_thread_mutex_lock( &slap_daemon.sd_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "slapd_remove: removing %ld%s%s\n",
- (long) s,
- FD_ISSET(s, &slap_daemon.sd_readers) ? "r" : "",
- FD_ISSET(s, &slap_daemon.sd_writers) ? "w" : "" ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
+ "slapd_remove: removing %ld%s%s\n",
+ (long) s,
+ FD_ISSET(s, &slap_daemon.sd_readers) ? "r" : "",
+ FD_ISSET(s, &slap_daemon.sd_writers) ? "w" : "" ));
#else
Debug( LDAP_DEBUG_CONNS, "daemon: removing %ld%s%s\n",
(long) s,
static void slapd_close(ber_socket_t s) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "slapd_close: closing %ld\n", (long)s ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
+ "slapd_close: closing %ld\n", (long)s ));
#else
Debug( LDAP_DEBUG_CONNS, "daemon: closing %ld\n",
(long) s, 0, 0 );
/* host specifies a service in this case */
if (err = getaddrinfo(NULL, host, &hints, &res)) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_get_listener_addresses: getaddrinfo failed: %s\n",
- AC_GAI_STRERROR(err) ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "slap_get_listener_addresses: getaddrinfo failed: %s\n",
+ AC_GAI_STRERROR(err) ));
#else
Debug( LDAP_DEBUG_ANY, "daemon: getaddrinfo failed: %s\n",
AC_GAI_STRERROR(err), 0, 0);
hints.ai_family = AF_UNSPEC;
if (err = getaddrinfo(host, serv, &hints, &res)) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_get_listener_addresses: getaddrinfo failed: %s\n",
- AC_GAI_STRERROR(err) ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "slap_get_listener_addresses: getaddrinfo failed: %s\n",
+ AC_GAI_STRERROR(err) ));
#else
Debug( LDAP_DEBUG_ANY, "daemon: getaddrinfo failed: %s\n",
AC_GAI_STRERROR(err), 0, 0);
if ( strlen(host) >
(sizeof(((struct sockaddr_un *)*sal)->sun_path) - 1) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_get_listener_addresses: domain socket path (%s) too long in URL\n",
- host ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "slap_get_listener_addresses: domain socket path (%s) too long in URL\n",
+ host ));
#else
Debug( LDAP_DEBUG_ANY,
"daemon: domain socket path (%s) too long in URL",
struct hostent *he = gethostbyname( host );
if( he == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_get_listener_addresses: invalid host %s\n",
- host ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "slap_get_listener_addresses: invalid host %s\n",
+ host ));
#else
Debug( LDAP_DEBUG_ANY,
"daemon: invalid host %s", host, 0, 0);
if( rc != LDAP_URL_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slap_open_listener: listen URL \"%s\" parse error %d\n",
- url, rc ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "slap_open_listener: listen URL \"%s\" parse error %d\n",
+ url, rc ));
#else
Debug( LDAP_DEBUG_ANY,
"daemon: listen URL \"%s\" parse error=%d\n",
#ifndef HAVE_TLS
if( ldap_pvt_url_scheme2tls( lud->lud_scheme ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_open_listener: TLS is not supported (%s)\n",
- url ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "slap_open_listener: TLS is not supported (%s)\n",
+ url ));
#else
Debug( LDAP_DEBUG_ANY,
"daemon: TLS not supported (%s)\n",
#else
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_open_listener: URL scheme is not supported: %s\n",
- url ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "slap_open_listener: URL scheme is not supported: %s\n",
+ url ));
#else
Debug( LDAP_DEBUG_ANY, "daemon: URL scheme not supported: %s",
url, 0, 0);
if ( l.sl_sd == AC_SOCKET_INVALID ) {
int err = sock_errno();
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slap_open_listener: socket() failed errno=%d (%s)\n",
- err, sock_errstr(err) ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "slap_open_listener: socket() failed errno=%d (%s)\n",
+ err, sock_errstr(err) ));
#else
Debug( LDAP_DEBUG_ANY,
"daemon: socket() failed errno=%d (%s)\n", err,
#ifndef HAVE_WINSOCK
if ( l.sl_sd >= dtblsize ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slap_open_listener: listener descriptor %ld is too great %ld\n",
- (long)l.sl_sd, (long)dtblsize ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "slap_open_listener: listener descriptor %ld is too great %ld\n",
+ (long)l.sl_sd, (long)dtblsize ));
#else
Debug( LDAP_DEBUG_ANY,
"daemon: listener descriptor %ld is too great %ld\n",
if ( rc == AC_SOCKET_ERROR ) {
int err = sock_errno();
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_open_listener: setsockopt( %ld, SO_REUSEADDR ) failed errno %d (%s)\n",
- (long)l.sl_sd, err, sock_errstr(err) ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "slap_open_listener: setsockopt( %ld, SO_REUSEADDR ) failed errno %d (%s)\n",
+ (long)l.sl_sd, err, sock_errstr(err) ));
#else
Debug( LDAP_DEBUG_ANY,
"slapd(%ld): setsockopt(SO_REUSEADDR) failed errno=%d (%s)\n",
break;
err = sock_errno();
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_open_listener: bind(%ld) failed errno=%d (%s)\n",
- (long)l.sl_sd, err, sock_errstr(err) ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "slap_open_listener: bind(%ld) failed errno=%d (%s)\n",
+ (long)l.sl_sd, err, sock_errstr(err) ));
#else
Debug( LDAP_DEBUG_ANY, "daemon: bind(%ld) failed errno=%d (%s)\n",
(long) l.sl_sd, err, sock_errstr(err) );
if ( *sal == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_open_listener: bind(%ld) failed.\n", (long)l.sl_sd ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "slap_open_listener: bind(%ld) failed.\n", (long)l.sl_sd ));
#else
Debug( LDAP_DEBUG_ANY, "daemon: bind(%ld) failed\n",
(long) l.sl_sd, 0, 0 );
if ( chmod( addr, S_IRWXU ) < 0 ) {
int err = sock_errno();
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_open_listener: fchmod(%ld) failed errno=%d (%s)\n",
- (long)l.sl_sd, err, sock_errstr(err) ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "slap_open_listener: fchmod(%ld) failed errno=%d (%s)\n",
+ (long)l.sl_sd, err, sock_errstr(err) ));
#else
Debug( LDAP_DEBUG_ANY, "daemon: fchmod(%ld) failed errno=%d (%s)",
(long) l.sl_sd, err, sock_errstr(err) );
default:
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_open_listener: unsupported address family (%d)\n",
- (int)(*sal)->sa_family ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "slap_open_listener: unsupported address family (%d)\n",
+ (int)(*sal)->sa_family ));
#else
Debug( LDAP_DEBUG_ANY, "daemon: unsupported address family (%d)\n",
(int) (*sal)->sa_family, 0, 0 );
*li = l;
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_RESULTS,
- "slap_open_listener: daemon initialzed %s\n", l.sl_url ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_RESULTS,
+ "slap_open_listener: daemon initialzed %s\n", l.sl_url ));
#else
Debug( LDAP_DEBUG_TRACE, "daemon: initialized %s\n",
l.sl_url, 0, 0 );
char **u;
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ARGS,
- "slapd_daemon_init: %s\n",
- urls ? urls : "<null>" ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ARGS,
+ "slapd_daemon_init: %s\n",
+ urls ? urls : "<null>" ));
#else
Debug( LDAP_DEBUG_ARGS, "daemon_init: %s\n",
urls ? urls : "<null>", 0, 0 );
*/
if( (rc = lutil_pair( wake_sds )) < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slap_daemon_init: lutil_pair() failed rc=%d\n", rc ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "slap_daemon_init: lutil_pair() failed rc=%d\n", rc ));
#else
Debug( LDAP_DEBUG_ANY,
"daemon: lutil_pair() failed rc=%d\n", rc, 0, 0 );
if( u == NULL || u[0] == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slap_daemon_init: no urls (%s) provided.\n", urls ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "slap_daemon_init: no urls (%s) provided.\n", urls ));
#else
Debug( LDAP_DEBUG_ANY, "daemon_init: no urls (%s) provided.\n",
urls, 0, 0 );
for( i=0; u[i] != NULL; i++ ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "slap_daemon_init: listen on %s\n.", u[i] ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
+ "slap_daemon_init: listen on %s\n.", u[i] ));
#else
Debug( LDAP_DEBUG_TRACE, "daemon_init: listen on %s\n",
u[i], 0, 0 );
if( i == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_daemon_init: no listeners to open (%s)\n", urls ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "slap_daemon_init: no listeners to open (%s)\n", urls ));
#else
Debug( LDAP_DEBUG_ANY, "daemon_init: no listeners to open (%s)\n",
urls, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_daemon_init: %d listeners to open...\n", i ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "slap_daemon_init: %d listeners to open...\n", i ));
#else
Debug( LDAP_DEBUG_TRACE, "daemon_init: %d listeners to open...\n",
i, 0, 0 );
slap_listeners[i] = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "slap_daemon_init: %d listeners opened\n", i ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
+ "slap_daemon_init: %d listeners opened\n", i ));
#else
Debug( LDAP_DEBUG_TRACE, "daemon_init: %d listeners opened\n",
i, 0, 0 );
if ( listen( slap_listeners[l]->sl_sd, SLAPD_LISTEN ) == -1 ) {
int err = sock_errno();
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slapd_daemon_task: listen( %s, 5 ) failed errno=%d (%s)\n",
- slap_listeners[l]->sl_url, err, sock_errstr(err) ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "slapd_daemon_task: listen( %s, 5 ) failed errno=%d (%s)\n",
+ slap_listeners[l]->sl_url, err, sock_errstr(err) ));
#else
Debug( LDAP_DEBUG_ANY,
"daemon: listen(%s, 5) failed errno=%d (%s)\n",
Sockaddr from;
#if defined(SLAPD_RLOOKUPS)
- struct hostent *hp;
+ struct hostent *hp;
#endif
struct timeval zero;
struct timeval *tvp;
continue;
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "slapd_daemon_task: select: listen=%d active_threads=%d tvp=%s\n",
- slap_listeners[l]->sl_sd, at, tvp == NULL ? "NULL" : "zero" ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
+ "slapd_daemon_task: select: listen=%d active_threads=%d tvp=%s\n",
+ slap_listeners[l]->sl_sd, at, tvp == NULL ? "NULL" : "zero" ));
#else
Debug( LDAP_DEBUG_CONNS,
"daemon: select: listen=%d active_threads=%d tvp=%s\n",
if( err != EINTR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slapd_daemon_task: select failed (%d): %s\n",
- err, sock_errstr(err) ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "slapd_daemon_task: select failed (%d): %s\n",
+ err, sock_errstr(err) ));
#else
Debug( LDAP_DEBUG_CONNS,
"daemon: select failed (%d): %s\n",
case 0: /* timeout - let threads run */
ebadf = 0;
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
- "slapd_daemon_task: select timeout - yielding\n" ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
+ "slapd_daemon_task: select timeout - yielding\n" ));
#else
Debug( LDAP_DEBUG_CONNS, "daemon: select timeout - yielding\n",
0, 0, 0 );
#endif
- ldap_pvt_thread_yield();
+ ldap_pvt_thread_yield();
continue;
default: /* something happened - deal with it */
ebadf = 0;
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
- "slapd_daemon_task: activity on %d descriptors\n", ns ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
+ "slapd_daemon_task: activity on %d descriptors\n", ns ));
#else
Debug( LDAP_DEBUG_CONNS, "daemon: activity on %d descriptors\n",
ns, 0, 0 );
if ( s == AC_SOCKET_INVALID ) {
int err = sock_errno();
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slapd_daemon_task: accept(%ld) failed errno=%d (%s)\n",
- (long)slap_listeners[l]->sl_sd, err, sock_errstr(err) ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "slapd_daemon_task: accept(%ld) failed errno=%d (%s)\n",
+ (long)slap_listeners[l]->sl_sd, err, sock_errstr(err) ));
#else
Debug( LDAP_DEBUG_ANY,
"daemon: accept(%ld) failed errno=%d (%s)\n",
/* make sure descriptor number isn't too great */
if ( s >= dtblsize ) {
#ifdef NEW_LGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slapd_daemon_task: %ld beyond descriptor table size %ld\n",
- (long)s, (long)dtblsize ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "slapd_daemon_task: %ld beyond descriptor table size %ld\n",
+ (long)s, (long)dtblsize ));
#else
Debug( LDAP_DEBUG_ANY,
"daemon: %ld beyond descriptor table size %ld\n",
if ( rc == AC_SOCKET_ERROR ) {
int err = sock_errno();
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slapd_daemon_task: setsockopt( %ld, SO_KEEPALIVE) failed errno=%d (%s)\n",
- (long)s, err, sock_errstr(err) ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "slapd_daemon_task: setsockopt( %ld, SO_KEEPALIVE) failed errno=%d (%s)\n",
+ (long)s, err, sock_errstr(err) ));
#else
Debug( LDAP_DEBUG_ANY,
"slapd(%ld): setsockopt(SO_KEEPALIVE) failed "
if ( rc == AC_SOCKET_ERROR ) {
int err = sock_errno();
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slapd_daemon_task: setsockopt( %ld, TCP_NODELAY) failed errno=%d (%s)\n",
- (long)s, err, sock_errstr(err) ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "slapd_daemon_task: setsockopt( %ld, TCP_NODELAY) failed errno=%d (%s)\n",
+ (long)s, err, sock_errstr(err) ));
#else
Debug( LDAP_DEBUG_ANY,
"slapd(%ld): setsockopt(TCP_NODELAY) failed "
#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "slapd_daemon_task: new connection on %ld\n", (long)s ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
+ "slapd_daemon_task: new connection on %ld\n", (long)s ));
#else
Debug( LDAP_DEBUG_CONNS, "daemon: new connection on %ld\n",
(long) s, 0, 0 );
if( id < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slapd_daemon_task: connection_init(%ld, %s, %s) failed.\n",
- (long)s, peername, slap_listeners[l]->sl_name ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ "slapd_daemon_task: connection_init(%ld, %s, %s) failed.\n",
+ (long)s, peername, slap_listeners[l]->sl_name ));
#else
Debug( LDAP_DEBUG_ANY,
"daemon: connection_init(%ld, %s, %s) failed.\n",
#ifdef LDAP_DEBUG
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
- "slapd_daemon_task: activity on " ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
+ "slapd_daemon_task: activity on " ));
#else
Debug( LDAP_DEBUG_CONNS, "daemon: activity on:", 0, 0, 0 );
#endif
#ifdef HAVE_WINSOCK
for ( i = 0; i < readfds.fd_count; i++ ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
- " %d%s", readfs.fd_array[i], "r", 0 );
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
+ " %d%s", readfs.fd_array[i], "r", 0 );
#else
Debug( LDAP_DEBUG_CONNS, " %d%s",
readfds.fd_array[i], "r", 0 );
}
for ( i = 0; i < writefds.fd_count; i++ ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
- " %d%s", writefds.fd_array[i], "w" ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
+ " %d%s", writefds.fd_array[i], "w" ));
#else
Debug( LDAP_DEBUG_CONNS, " %d%s",
writefds.fd_array[i], "w", 0 );
w = FD_ISSET( i, &writefds );
if ( r || w ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
- " %d%s%s", i,
- r ? "r" : "", w ? "w" : "" ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
+ " %d%s%s", i,
+ r ? "r" : "", w ? "w" : "" ));
#else
Debug( LDAP_DEBUG_CONNS, " %d%s%s", i,
r ? "r" : "", w ? "w" : "" );
}
#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2, "\n" ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2, "\n" ));
#else
Debug( LDAP_DEBUG_CONNS, "\n", 0, 0, 0 );
#endif
continue;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
- "slapd_daemon_task: write active on %d\n", wd ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
+ "slapd_daemon_task: write active on %d\n", wd ));
#else
Debug( LDAP_DEBUG_CONNS,
"daemon: write active on %d\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
- "slapd_daemon_task: read activity on %d\n", rd ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
+ "slapd_daemon_task: read activity on %d\n", rd ));
#else
Debug ( LDAP_DEBUG_CONNS,
"daemon: read activity on %d\n", rd, 0, 0 );
if( slapd_shutdown > 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
- "slapd_daemon_task: shutdown requested and initiated.\n"));
+ LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
+ "slapd_daemon_task: shutdown requested and initiated.\n"));
#else
Debug( LDAP_DEBUG_TRACE,
"daemon: shutdown requested and initiated.\n",
} else if ( slapd_shutdown < 0 ) {
#ifdef HAVE_NT_SERVICE_MANAGER
if (slapd_shutdown == -1)
+ {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
- "slapd_daemon_task: shutdown initiated by Service Manager.\n"));
+ LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
+ "slapd_daemon_task: shutdown initiated by Service Manager.\n"));
#else
- Debug( LDAP_DEBUG_TRACE,
- "daemon: shutdown initiated by Service Manager.\n",
- 0, 0, 0);
+ Debug( LDAP_DEBUG_TRACE,
+ "daemon: shutdown initiated by Service Manager.\n",
+ 0, 0, 0);
#endif
+ }
else
#endif
+ {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
- "slapd_daemon_task: abnormal condition, shutdown initiated.\n" ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
+ "slapd_daemon_task: abnormal condition, shutdown initiated.\n" ));
#else
- Debug( LDAP_DEBUG_TRACE,
- "daemon: abnormal condition, shutdown initiated.\n",
- 0, 0, 0 );
+ Debug( LDAP_DEBUG_TRACE,
+ "daemon: abnormal condition, shutdown initiated.\n",
+ 0, 0, 0 );
#endif
+ }
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
- "slapd_daemon_task: no active streams, shutdown initiated.\n" ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
+ "slapd_daemon_task: no active streams, shutdown initiated.\n" ));
#else
Debug( LDAP_DEBUG_TRACE,
- "daemon: no active streams, shutdown initiated.\n",
- 0, 0, 0 );
+ "daemon: no active streams, shutdown initiated.\n",
+ 0, 0, 0 );
#endif
}
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
- "slapd_daemon_task: shutdown waiting for %d threads to terminate.\n",
- ldap_pvt_thread_pool_backload(&connection_pool) ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
+ "slapd_daemon_task: shutdown waiting for %d threads to terminate.\n",
+ ldap_pvt_thread_pool_backload(&connection_pool) ));
#else
Debug( LDAP_DEBUG_ANY,
"slapd shutdown: waiting for %d threads to terminate\n",
if ( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slapd_daemon: listener ldap_pvt_thread_create failed (%d).\n", rc ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ "slapd_daemon: listener ldap_pvt_thread_create failed (%d).\n", rc ));
#else
Debug( LDAP_DEBUG_ANY,
- "listener ldap_pvt_thread_create failed (%d)\n", rc, 0, 0 );
+ "listener ldap_pvt_thread_create failed (%d)\n", rc, 0, 0 );
#endif
return rc;
}
/* wait for the listener thread to complete */
ldap_pvt_thread_join( listener_tid, (void *) NULL );
- }
+ }
#else
/* experimental code */
slapd_daemon_task( NULL );
err = WSAStartup( wVersionRequested, &wsaData );
if ( err != 0 ) {
/* Tell the user that we couldn't find a usable */
- /* WinSock DLL. */
+ /* WinSock DLL. */
return -1;
}
/* Confirm that the WinSock DLL supports 2.0.*/
/* Note that if the DLL supports versions greater */
/* than 2.0 in addition to 2.0, it will still return */
- /* 2.0 in wVersion since that is the version we */
- /* requested. */
+ /* 2.0 in wVersion since that is the version we */
+ /* requested. */
if ( LOBYTE( wsaData.wVersion ) != 2 ||
HIBYTE( wsaData.wVersion ) != 0 )
{
/* Tell the user that we couldn't find a usable */
- /* WinSock DLL. */
+ /* WinSock DLL. */
WSACleanup();
return -1;
}
slap_sig_shutdown( int sig )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
- "slap_sig_shutdown: signal %d\n", sig ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
+ "slap_sig_shutdown: signal %d\n", sig ));
#else
Debug(LDAP_DEBUG_TRACE, "slap_sig_shutdown: signal %d\n", sig, 0, 0);
#endif
#if HAVE_NT_SERVICE_MANAGER && SIGBREAK
if (is_NT_Service && sig == SIGBREAK)
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
- "slap_sig_shutdown: SIGBREAK ignored.\n" ));
+ LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
+ "slap_sig_shutdown: SIGBREAK ignored.\n" ));
#else
Debug(LDAP_DEBUG_TRACE, "slap_sig_shutdown: SIGBREAK ignored.\n",
0, 0, 0);
int manageDSAit;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "do_delete: conn %d\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "do_delete: conn %d\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_TRACE, "do_delete\n", 0, 0, 0 );
#endif
if ( ber_scanf( op->o_ber, "a", &dn ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_delete: conn: %d ber_scanf failed\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_delete: conn: %d ber_scanf failed\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "ber_scanf failed\n", 0, 0, 0 );
#endif
if( ( rc = get_ctrls( conn, op, 1 ) ) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "oepration", LDAP_LEVEL_ERR,
- "do_delete: conn %d get_ctrls failed\n", conn->c_connid ));
+ LDAP_LOG(( "oepration", LDAP_LEVEL_ERR,
+ "do_delete: conn %d get_ctrls failed\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "do_delete: get_ctrls failed\n", 0, 0, 0 );
#endif
if( dn_normalize( ndn ) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_delete: conn %d invalid dn (%s).\n", conn->c_connid, dn ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_delete: conn %d invalid dn (%s).\n", conn->c_connid, dn ));
#else
Debug( LDAP_DEBUG_ANY, "do_delete: invalid dn (%s)\n", dn, 0, 0 );
#endif
if( ndn == '\0' ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_delete: conn %d Attempt to delete root DSE.\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "do_delete: conn %d Attempt to delete root DSE.\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "do_delete: root dse!\n", 0, 0, 0 );
#endif
default:
dn = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "dn_validate: unknown state %d for dn \"%s\".\n",
- state, dn_in ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "dn_validate: unknown state %d for dn \"%s\".\n",
+ state, dn_in ));
#else
Debug( LDAP_DEBUG_ANY,
"dn_validate - unknown state %d\n", state, 0, 0 );
/*
* dn_normalize - put dn into a canonical form suitable for storing
- * in a hash database. this involves normalizing the case as well as
- * the format. the dn is normalized in place as well as returned if valid.
+ * in a hash database. this involves normalizing the case as well as
+ * the format. the dn is normalized in place as well as returned if valid.
*/
char *
#include "slap.h"
-static unsigned char *ebuf; /* buf returned by entry2str */
+static unsigned char *ebuf; /* buf returned by entry2str */
static unsigned char *ecur; /* pointer to end of currently used ebuf */
-static int emaxsize;/* max size of ebuf */
+static int emaxsize;/* max size of ebuf */
int entry_destroy(void)
{
*/
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "str2entry: \"%s\"\n", s ? s : "NULL" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
+ "str2entry: \"%s\"\n", s ? s : "NULL" ));
#else
Debug( LDAP_DEBUG_TRACE, "=> str2entry\n",
s ? s : "NULL", 0, 0 );
if( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "str2entry: entry allocation failed.\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "str2entry: entry allocation failed.\n" ));
#else
Debug( LDAP_DEBUG_ANY,
"<= str2entry NULL (entry allocation failed)\n",
if ( ldif_parse_line( s, &type, &value.bv_val, &value.bv_len ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "str2entry: NULL (parse_line)\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
+ "str2entry: NULL (parse_line)\n" ));
#else
Debug( LDAP_DEBUG_TRACE,
"<= str2entry NULL (parse_line)\n", 0, 0, 0 );
if ( e->e_dn != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "str2entry: entry %ld has multiple dns \"%s\" and \"%s\" (second ignored)\n",
- e->e_id, e->e_dn, value.bv_val != NULL ? value.bv_val : "" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
+ "str2entry: entry %ld has multiple dns \"%s\" and \"%s\" (second ignored)\n",
+ e->e_id, e->e_dn, value.bv_val != NULL ? value.bv_val : "" ));
#else
Debug( LDAP_DEBUG_ANY,
"str2entry: entry %ld has multiple dns \"%s\" and \"%s\" (second ignored)\n",
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "str2entry: str2ad(%s): %s\n", type, text ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
+ "str2entry: str2ad(%s): %s\n", type, text ));
#else
Debug( slapMode & SLAP_TOOL_MODE
? LDAP_DEBUG_ANY : LDAP_DEBUG_TRACE,
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "str2entry: str2undef_ad(%s): %s\n", type, text ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
+ "str2entry: str2undef_ad(%s): %s\n", type, text ));
#else
Debug( LDAP_DEBUG_ANY,
"<= str2entry: str2undef_ad(%s): %s\n",
if( !validate ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "str2entry: no validator for syntax %s\n",
- ad->ad_type->sat_syntax->ssyn_oid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "str2entry: no validator for syntax %s\n",
+ ad->ad_type->sat_syntax->ssyn_oid ));
#else
Debug( LDAP_DEBUG_ANY,
"str2entry: no validator for syntax %s\n",
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "str2entry: invalid value for syntax %s\n",
- ad->ad_type->sat_syntax->ssyn_oid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "str2entry: invalid value for syntax %s\n",
+ ad->ad_type->sat_syntax->ssyn_oid ));
#else
Debug( LDAP_DEBUG_ANY,
"str2entry: invalid value for syntax %s\n",
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "str2entry: NULL (attr_merge)\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
+ "str2entry: NULL (attr_merge)\n" ));
#else
Debug( LDAP_DEBUG_ANY,
"<= str2entry NULL (attr_merge)\n", 0, 0, 0 );
/* check to make sure there was a dn: line */
if ( e->e_dn == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "str2entry: entry %ld has no dn.\n", e->e_id ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "str2entry: entry %ld has no dn.\n", e->e_id ));
#else
Debug( LDAP_DEBUG_ANY, "str2entry: entry %ld has no dn\n",
e->e_id, 0, 0 );
(void) dn_normalize( e->e_ndn );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL2,
- "str2entry(%s) -> 0x%lx\n", e->e_dn, (unsigned long)e ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL2,
+ "str2entry(%s) -> 0x%lx\n", e->e_dn, (unsigned long)e ));
#else
Debug(LDAP_DEBUG_TRACE, "<= str2entry(%s) -> 0x%lx\n",
e->e_dn, (unsigned long) e, 0 );
*
* the Entry has three entry points (ways to find things):
*
- * by entry e.g., if you already have an entry from the cache
+ * by entry e.g., if you already have an entry from the cache
* and want to delete it. (really by entry ptr)
* by dn e.g., when looking for the base object of a search
* by id e.g., for search candidates
ber = ber_init( bv );
if( ber == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "entry_decode: ber_init failed\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "entry_decode: ber_init failed\n" ));
#else
Debug( LDAP_DEBUG_ANY,
"<= entry_decode: ber_init failed\n",
if( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "entry_decode: entry allocation failed.\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "entry_decode: entry allocation failed.\n" ));
#else
Debug( LDAP_DEBUG_ANY,
"<= entry_decode: entry allocation failed\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL2,
- "entry_decode: \"%s\"\n", e->e_dn ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL2,
+ "entry_decode: \"%s\"\n", e->e_dn ));
#else
Debug( LDAP_DEBUG_TRACE,
"entry_decode: \"%s\"\n",
if ( tag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "entry_decode: decoding error (%s)\n", e->e_dn ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "entry_decode: decoding error (%s)\n", e->e_dn ));
#else
Debug( LDAP_DEBUG_ANY, "entry_decode: decoding error\n", 0, 0, 0 );
#endif
if ( vals == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "entry_decode: no values for type %s\n", type ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "entry_decode: no values for type %s\n", type ));
#else
Debug( LDAP_DEBUG_ANY, "entry_decode: no values for type %s\n",
type, 0, 0 );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "entry_decode: str2ad(%s): %s\n", type, text ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "entry_decode: str2ad(%s): %s\n", type, text ));
#else
Debug( LDAP_DEBUG_TRACE,
"<= entry_decode: str2ad(%s): %s\n", type, text, 0 );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "entry_decode: str2undef_ad(%s): %s\n", type, text));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "entry_decode: str2undef_ad(%s): %s\n", type, text));
#else
Debug( LDAP_DEBUG_ANY,
"<= entry_decode: str2undef_ad(%s): %s\n",
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "entry_decode: attr_merge failed\n"));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "entry_decode: attr_merge failed\n"));
#else
Debug( LDAP_DEBUG_ANY,
"<= entry_decode: attr_merge failed\n", 0, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "entry_decode: %s\n", e->e_dn ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
+ "entry_decode: %s\n", e->e_dn ));
#else
Debug(LDAP_DEBUG_TRACE, "<= entry_decode(%s)\n",
e->e_dn, 0, 0 );
BerElement *ber;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "entry_encode: id: 0x%08lx \"%s\"\n",
- e->e_id, e->e_dn ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "entry_encode: id: 0x%08lx \"%s\"\n",
+ e->e_id, e->e_dn ));
#else
Debug( LDAP_DEBUG_TRACE, "=> entry_encode(0x%08lx): %s\n",
e->e_id, e->e_dn, 0 );
ber_free( ber, 1 );
if( rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "entry_encode: id=0x%08lx failed (%d)\n", e->e_id, rc ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "entry_encode: id=0x%08lx failed (%d)\n", e->e_id, rc ));
#else
Debug( LDAP_DEBUG_ANY, "=> entry_encode(0x%08lx): failed (%d)\n",
e->e_id, rc, 0 );
/*
* LDAPv3 Extended Operation Request
* ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
- * requestName [0] LDAPOID,
- * requestValue [1] OCTET STRING OPTIONAL
+ * requestName [0] LDAPOID,
+ * requestValue [1] OCTET STRING OPTIONAL
* }
*
* LDAPv3 Extended Operation Response
* ExtendedResponse ::= [APPLICATION 24] SEQUENCE {
* COMPONENTS OF LDAPResult,
- * responseName [10] LDAPOID OPTIONAL,
- * response [11] OCTET STRING OPTIONAL
+ * responseName [10] LDAPOID OPTIONAL,
+ * response [11] OCTET STRING OPTIONAL
* }
*
*/
extop_list_t *supp_ext_list = NULL;
/* this list of built-in extops is for extops that are not part
- * of backends or in external modules. essentially, this is
+ * of backends or in external modules. essentially, this is
* just a way to get built-in extops onto the extop list without
* having a separate init routine for each built-in extop.
*/
LDAPControl **rspctrls;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "do_extended: conn %s\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "do_extended: conn %d\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_TRACE, "do_extended\n", 0, 0, 0 );
#endif
if( op->o_protocol < LDAP_VERSION3 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_extended: protocol version (%d) too low.\n", op->o_protocol ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_extended: protocol version (%d) too low.\n", op->o_protocol ));
#else
Debug( LDAP_DEBUG_ANY, "do_extended: protocol version (%d) too low\n",
op->o_protocol, 0 ,0 );
if ( ber_scanf( op->o_ber, "{a" /*}*/, &reqoid ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_extended: conn %d ber_scanf failed\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_extended: conn %d ber_scanf failed\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "do_extended: ber_scanf failed\n", 0, 0 ,0 );
#endif
if( !(ext = find_extop(supp_ext_list, reqoid)) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_extended: conn %d unsupported operation \"%s\"\n",
- conn->c_connid, reqoid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_extended: conn %d unsupported operation \"%s\"\n",
+ conn->c_connid, reqoid ));
#else
Debug( LDAP_DEBUG_ANY, "do_extended: unsupported operation \"%s\"\n",
reqoid, 0 ,0 );
if( ber_peek_tag( op->o_ber, &len ) == LDAP_TAG_EXOP_REQ_VALUE ) {
if( ber_scanf( op->o_ber, "O", &reqdata ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_extended: conn %d ber_scanf failed\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_extended: conn %d ber_scanf failed\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "do_extended: ber_scanf failed\n", 0, 0 ,0 );
#endif
if( (rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_extended: conn %d get_ctrls failed\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_extended: conn %d get_ctrls failed\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ANY, "do_extended: get_ctrls failed\n", 0, 0 ,0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "do_extended: conn %d oid=%d\n.", conn->c_connid, reqoid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
+ "do_extended: conn %d oid=%d\n.", conn->c_connid, reqoid ));
#else
Debug( LDAP_DEBUG_ARGS, "do_extended: oid=%s\n", reqoid, 0 ,0 );
#endif
struct berval escaped;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY, "get_filter: conn %d\n",
- conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY, "get_filter: conn %d\n",
+ conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, "begin get_filter\n", 0, 0, 0 );
#endif
* }
*
* SubstringFilter ::= SEQUENCE {
- * type AttributeType,
+ * type AttributeType,
* SEQUENCE OF CHOICE {
- * initial [0] IA5String,
- * any [1] IA5String,
- * final [2] IA5String
+ * initial [0] IA5String,
+ * any [1] IA5String,
+ * final [2] IA5String
* }
* }
*
- * MatchingRuleAssertion ::= SEQUENCE {
- * matchingRule [1] MatchingRuleId OPTIONAL,
- * type [2] AttributeDescription OPTIONAL,
- * matchValue [3] AssertionValue,
- * dnAttributes [4] BOOLEAN DEFAULT FALSE
+ * MatchingRuleAssertion ::= SEQUENCE {
+ * matchingRule [1] MatchingRuleId OPTIONAL,
+ * type [2] AttributeDescription OPTIONAL,
+ * matchValue [3] AssertionValue,
+ * dnAttributes [4] BOOLEAN DEFAULT FALSE
* }
*
*/
switch ( f->f_choice ) {
case LDAP_FILTER_EQUALITY:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL2,
- "get_filter: conn %d EQUALITY\n", conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL2,
+ "get_filter: conn %d EQUALITY\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, "EQUALITY\n", 0, 0, 0 );
#endif
case LDAP_FILTER_SUBSTRINGS:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_filter: conn %d SUBSTRINGS\n", conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "get_filter: conn %d SUBSTRINGS\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, "SUBSTRINGS\n", 0, 0, 0 );
#endif
case LDAP_FILTER_GE:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_filter: conn %d GE\n", conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "get_filter: conn %d GE\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, "GE\n", 0, 0, 0 );
#endif
case LDAP_FILTER_LE:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_filter: conn %d LE\n", conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "get_filter: conn %d LE\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, "LE\n", 0, 0, 0 );
#endif
struct berval type;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_filter: conn %d PRESENT\n", conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "get_filter: conn %d PRESENT\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, "PRESENT\n", 0, 0, 0 );
#endif
case LDAP_FILTER_APPROX:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_filter: conn %d APPROX\n", conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "get_filter: conn %d APPROX\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, "APPROX\n", 0, 0, 0 );
#endif
case LDAP_FILTER_AND:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_filter: conn %d AND\n", conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "get_filter: conn %d AND\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, "AND\n", 0, 0, 0 );
#endif
case LDAP_FILTER_OR:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_filter: conn %d OR\n", conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "get_filter: conn %d OR\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, "OR\n", 0, 0, 0 );
#endif
case LDAP_FILTER_NOT:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_filter: conn %d NOT\n", conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "get_filter: conn %d NOT\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, "NOT\n", 0, 0, 0 );
#endif
case LDAP_FILTER_EXT:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_filter: conn %d EXTENSIBLE\n", conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "get_filter: conn %d EXTENSIBLE\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, "EXTENSIBLE\n", 0, 0, 0 );
#endif
default:
(void) ber_skip_tag( ber, &len );
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "get_filter: conn %d unknown filter type=%lu\n",
- conn->c_connid, f->f_choice ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
+ "get_filter: conn %d unknown filter type=%lu\n",
+ conn->c_connid, f->f_choice ));
#else
Debug( LDAP_DEBUG_ANY, "get_filter: unknown filter type=%lu\n",
f->f_choice, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL2,
- "get_filter: conn %d exit\n", conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL2,
+ "get_filter: conn %d exit\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, "end get_filter %d\n", err, 0, 0 );
#endif
char *last, *ftmp;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "get_filter_list: conn %d start\n", conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
+ "get_filter_list: conn %d start\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, "begin get_filter_list\n", 0, 0, 0 );
#endif
*new = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "get_filter_list: conn %d exit\n", conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
+ "get_filter_list: conn %d exit\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, "end get_filter_list\n", 0, 0, 0 );
#endif
*text = "error decoding filter";
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "get_substring_filter: conn %d begin\n", conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
+ "get_substring_filter: conn %d begin\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, "begin get_substring_filter\n", 0, 0, 0 );
#endif
rc = LDAP_PROTOCOL_ERROR;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "get_filter_substring: conn %d unknown substring choice=%ld\n",
- conn->c_connid, (long)tag ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
+ "get_filter_substring: conn %d unknown substring choice=%ld\n",
+ conn->c_connid, (long)tag ));
#else
Debug( LDAP_DEBUG_FILTER,
" unknown substring choice=%ld\n",
switch ( tag ) {
case LDAP_SUBSTRING_INITIAL:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_substring_filter: conn %d INITIAL\n",
- conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "get_substring_filter: conn %d INITIAL\n",
+ conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, " INITIAL\n", 0, 0, 0 );
#endif
case LDAP_SUBSTRING_ANY:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_substring_filter: conn %d ANY\n",
- conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "get_substring_filter: conn %d ANY\n",
+ conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, " ANY\n", 0, 0, 0 );
#endif
case LDAP_SUBSTRING_FINAL:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_substring_filter: conn %d FINAL\n",
- conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "get_substring_filter: conn %d FINAL\n",
+ conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, " FINAL\n", 0, 0, 0 );
#endif
default:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
- "get_substring_filter: conn %d unknown substring type %ld\n",
- conn->c_connid, (long)tag ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
+ "get_substring_filter: conn %d unknown substring type %ld\n",
+ conn->c_connid, (long)tag ));
#else
Debug( LDAP_DEBUG_FILTER,
" unknown substring type=%ld\n",
return_error:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
- "get_substring_filter: conn %d error %ld\n",
- conn->c_connid, (long)rc ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
+ "get_substring_filter: conn %d error %ld\n",
+ conn->c_connid, (long)rc ));
#else
Debug( LDAP_DEBUG_FILTER, " error=%ld\n",
(long) rc, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "get_substring_filter: conn %d exit\n", conn->c_connid ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
+ "get_substring_filter: conn %d exit\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_FILTER, "end get_substring_filter\n", 0, 0, 0 );
#endif
default:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "filter_free: unknown filter type %lu\n", f->f_choice ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
+ "filter_free: unknown filter type %lu\n", f->f_choice ));
#else
Debug( LDAP_DEBUG_ANY, "filter_free: unknown filter type=%lu\n",
f->f_choice, 0, 0 );
#ifdef NEW_LOGGING
LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "test_filter: begin\n" ));
+ "test_filter: begin\n" ));
#else
Debug( LDAP_DEBUG_FILTER, "=> test_filter\n", 0, 0, 0 );
#endif
switch ( f->f_choice ) {
case SLAPD_FILTER_COMPUTED:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_filter: COMPUTED %s (%d)\n",
- f->f_result == LDAP_COMPARE_FALSE ? "false" :
- f->f_result == LDAP_COMPARE_TRUE ? "true" :
- f->f_result == SLAPD_COMPARE_UNDEFINED ? "undefined" :
- "error",
- f->f_result ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "test_filter: COMPUTED %s (%d)\n",
+ f->f_result == LDAP_COMPARE_FALSE ? "false" :
+ f->f_result == LDAP_COMPARE_TRUE ? "true" :
+ f->f_result == SLAPD_COMPARE_UNDEFINED ? "undefined" :
+ "error",
+ f->f_result ));
#else
Debug( LDAP_DEBUG_FILTER, " COMPUTED %s (%d)\n",
f->f_result == LDAP_COMPARE_FALSE ? "false" :
case LDAP_FILTER_EQUALITY:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_filter: EQUALITY\n" ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "test_filter: EQUALITY\n" ));
#else
Debug( LDAP_DEBUG_FILTER, " EQUALITY\n", 0, 0, 0 );
#endif
case LDAP_FILTER_SUBSTRINGS:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_filter SUBSTRINGS\n" ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "test_filter SUBSTRINGS\n" ));
#else
Debug( LDAP_DEBUG_FILTER, " SUBSTRINGS\n", 0, 0, 0 );
#endif
case LDAP_FILTER_PRESENT:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_filter: PRESENT\n" ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "test_filter: PRESENT\n" ));
#else
Debug( LDAP_DEBUG_FILTER, " PRESENT\n", 0, 0, 0 );
#endif
case LDAP_FILTER_APPROX:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_filter: APPROX\n" ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "test_filter: APPROX\n" ));
#else
Debug( LDAP_DEBUG_FILTER, " APPROX\n", 0, 0, 0 );
#endif
case LDAP_FILTER_AND:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_filter: AND\n" ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "test_filter: AND\n" ));
#else
- Debug( LDAP_DEBUG_FILTER, " AND\n", 0, 0, 0 );
+ Debug( LDAP_DEBUG_FILTER, " AND\n", 0, 0, 0 );
#endif
rc = test_filter_and( be, conn, op, e, f->f_and );
case LDAP_FILTER_OR:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_filter: OR\n" ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "test_filter: OR\n" ));
#else
Debug( LDAP_DEBUG_FILTER, " OR\n", 0, 0, 0 );
#endif
case LDAP_FILTER_NOT:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_filter: NOT\n" ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "test_filter: NOT\n" ));
#else
Debug( LDAP_DEBUG_FILTER, " NOT\n", 0, 0, 0 );
#endif
#ifdef SLAPD_EXT_FILTERS
case LDAP_FILTER_EXT:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_filter: EXT\n" ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "test_filter: EXT\n" ));
#else
Debug( LDAP_DEBUG_FILTER, " EXT\n", 0, 0, 0 );
#endif
default:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
- "test_filter: unknown filter type %lu\n",
- f->f_choice ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
+ "test_filter: unknown filter type %lu\n",
+ f->f_choice ));
#else
Debug( LDAP_DEBUG_ANY, " unknown filter type %lu\n",
f->f_choice, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "test_filter: return=%d\n", rc ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
+ "test_filter: return=%d\n", rc ));
#else
Debug( LDAP_DEBUG_FILTER, "<= test_filter %d\n", rc, 0, 0 );
#endif
int rtn = LDAP_COMPARE_TRUE;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "test_filter_and: begin\n" ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
+ "test_filter_and: begin\n" ));
#else
Debug( LDAP_DEBUG_FILTER, "=> test_filter_and\n", 0, 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "test_filter_and: rc=%d\n", rtn ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
+ "test_filter_and: rc=%d\n", rtn ));
#else
Debug( LDAP_DEBUG_FILTER, "<= test_filter_and %d\n", rtn, 0, 0 );
#endif
int rtn = LDAP_COMPARE_FALSE;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "test_filter_or: begin\n" ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
+ "test_filter_or: begin\n" ));
#else
Debug( LDAP_DEBUG_FILTER, "=> test_filter_or\n", 0, 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "test_filter_or: result=%d\n", rtn ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
+ "test_filter_or: result=%d\n", rtn ));
#else
Debug( LDAP_DEBUG_FILTER, "<= test_filter_or %d\n", rtn, 0, 0 );
#endif
Attribute *a;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "test_substrings_filter: begin\n" ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
+ "test_substrings_filter: begin\n" ));
#else
Debug( LDAP_DEBUG_FILTER, "begin test_substrings_filter\n", 0, 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "test_substrings_filter: return FALSE\n" ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
+ "test_substrings_filter: return FALSE\n" ));
#else
Debug( LDAP_DEBUG_FILTER, "end test_substrings_filter 1\n", 0, 0, 0 );
#endif
if( slapMode != SLAP_UNDEFINED_MODE ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "init: %s init called twice (old=%d, new=%d)\n",
- name, slapMode, mode ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ "init: %s init called twice (old=%d, new=%d)\n",
+ name, slapMode, mode ));
#else
Debug( LDAP_DEBUG_ANY,
- "%s init: init called twice (old=%d, new=%d)\n",
- name, slapMode, mode );
+ "%s init: init called twice (old=%d, new=%d)\n",
+ name, slapMode, mode );
#endif
return 1;
case SLAP_SERVER_MODE:
case SLAP_TOOL_MODE:
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "init: %s initiation, initiated %s.\n",
- name, (mode & SLAP_MODE) == SLAP_TOOL_MODE ? "tool" : "server" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
+ "init: %s initiation, initiated %s.\n",
+ name, (mode & SLAP_MODE) == SLAP_TOOL_MODE ? "tool" : "server" ));
#else
Debug( LDAP_DEBUG_TRACE,
"%s init: initiated %s.\n", name,
default:
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "init: %s init, undefined mode (%d).\n", name, mode ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "init: %s init, undefined mode (%d).\n", name, mode ));
#else
Debug( LDAP_DEBUG_ANY,
- "%s init: undefined mode (%d).\n", name, mode, 0 );
+ "%s init: undefined mode (%d).\n", name, mode, 0 );
#endif
rc = 1;
int rc;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "slap_startup: %s started\n", slap_name ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ "slap_startup: %s started\n", slap_name ));
#else
Debug( LDAP_DEBUG_TRACE,
"%s startup: initiated.\n",
int rc;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "slap_shutdown: %s shutdown initiated.\n", slap_name));
+ LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ "slap_shutdown: %s shutdown initiated.\n", slap_name));
#else
Debug( LDAP_DEBUG_TRACE,
"%s shutdown: initiated\n",
int rc;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "slap_destroy: %s freeing system resources.\n",
- slap_name ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "slap_destroy: %s freeing system resources.\n",
+ slap_name ));
#else
Debug( LDAP_DEBUG_TRACE,
"%s shutdown: freeing system resources.\n",
strcat( buf, ".lock" );
if ( (*lfp = fopen( buf, "w" )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "lock_fopen: could not open lock file \"%s\".\n", buf ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "lock_fopen: could not open lock file \"%s\".\n", buf ));
#else
Debug( LDAP_DEBUG_ANY, "could not open \"%s\"\n", buf, 0, 0 );
#endif
/* open the log file */
if ( (fp = fopen( fname, type )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "lock_fopen: could not open log file \"%s\".\n", buf ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "lock_fopen: could not open log file \"%s\".\n", buf ));
#else
Debug( LDAP_DEBUG_ANY, "could not open \"%s\"\n", fname, 0, 0 );
#endif
#define DEFAULT_SYSLOG_USER LOG_LOCAL4
typedef struct _str2intDispatch {
- char *stringVal;
- int abbr;
- int intVal;
+ char *stringVal;
+ int abbr;
+ int intVal;
} STRDISP, *STRDISP_P;
/* table to compute syslog-options to integer */
-static STRDISP syslog_types[] = {
+static STRDISP syslog_types[] = {
{ "LOCAL0", sizeof("LOCAL0"), LOG_LOCAL0 },
{ "LOCAL1", sizeof("LOCAL1"), LOG_LOCAL1 },
{ "LOCAL2", sizeof("LOCAL2"), LOG_LOCAL2 },
static int cnvt_str2int( char *, STRDISP_P, int );
-#endif /* LOG_LOCAL4 */
+#endif /* LOG_LOCAL4 */
static void
char *sandbox = NULL;
#endif
#ifdef LOG_LOCAL4
- int syslogUser = DEFAULT_SYSLOG_USER;
+ int syslogUser = DEFAULT_SYSLOG_USER;
#endif
#ifdef HAVE_NT_SERVICE_MANAGER
#else
char *configfile = SLAPD_DEFAULT_CONFIGFILE;
#endif
- char *serverName = NULL;
- int serverMode = SLAP_SERVER_MODE;
+ char *serverName = NULL;
+ int serverMode = SLAP_SERVER_MODE;
#ifdef CSRIMALLOC
FILE *leakfile;
{
slap_debug = *i;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "main: new debug level from registry is: %d\n", slap_debug ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "main: new debug level from registry is: %d\n", slap_debug ));
#else
Debug( LDAP_DEBUG_ANY, "new debug level from registry is: %d\n", slap_debug, 0, 0 );
#endif
urls = ch_strdup(newUrls);
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "main: new urls from registry: %s\n", urls ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "main: new urls from registry: %s\n", urls ));
#else
Debug(LDAP_DEBUG_ANY, "new urls from registry: %s\n",
urls, 0, 0);
{
configfile = newConfigFile;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "main: new config file from registry is: %s\n", configfile ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "main: new config file from registry is: %s\n", configfile ));
#else
Debug ( LDAP_DEBUG_ANY, "new config file from registry is: %s\n", configfile, 0, 0 );
#endif
case 'h': /* listen URLs */
if ( urls != NULL ) free( urls );
urls = ch_strdup( optarg );
- break;
+ break;
case 'd': /* set debug level and 'do not detach' flag */
no_detach = 1;
}
#ifdef NEW_LOGGING
- lutil_log_initialize( argc, argv );
+ lutil_log_initialize( argc, argv );
#endif
lutil_set_debug_level( "slapd", slap_debug );
ldif_debug = slap_debug;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "%s", Versionstr ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "%s", Versionstr ));
#else
Debug( LDAP_DEBUG_TRACE, "%s", Versionstr, 0, 0 );
#endif
if ( schema_init( ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "main: schema initialization error\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ "main: schema initialization error\n" ));
#else
Debug( LDAP_DEBUG_ANY,
"schema initialization error\n",
if ( schema_prep( ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "main: schema prep error\n"));
+ LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ "main: schema prep error\n"));
#else
Debug( LDAP_DEBUG_ANY,
"schema prep error\n",
FILE *fp;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "main: slapd starting.\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "main: slapd starting.\n" ));
#else
Debug( LDAP_DEBUG_ANY, "slapd starting\n", 0, 0, 0 );
#endif
#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "main: slapd stopped.\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ "main: slapd stopped.\n" ));
#else
Debug( LDAP_DEBUG_ANY, "slapd stopped.\n", 0, 0, 0 );
#endif
static int
cnvt_str2int( char *stringVal, STRDISP_P dispatcher, int defaultVal )
{
- int retVal = defaultVal;
+ int retVal = defaultVal;
STRDISP_P disp;
for (disp = dispatcher; disp->stringVal; disp++) {
- if (!strncasecmp (stringVal, disp->stringVal, disp->abbr)) {
+ if (!strncasecmp (stringVal, disp->stringVal, disp->abbr)) {
- retVal = disp->intVal;
- break;
+ retVal = disp->intVal;
+ break;
- }
+ }
}
return (retVal);
}
-#endif /* LOG_LOCAL4 */
+#endif /* LOG_LOCAL4 */
int manageDSAit;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "do_modify: enter\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "do_modify: enter\n" ));
#else
Debug( LDAP_DEBUG_TRACE, "do_modify\n", 0, 0, 0 );
#endif
if ( ber_scanf( op->o_ber, "{a" /*}*/, &dn ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modify: ber_scanf failed\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_modify: ber_scanf failed\n" ));
#else
Debug( LDAP_DEBUG_ANY, "do_modify: ber_scanf failed\n", 0, 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_modify: dn (%s)\n", dn ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
+ "do_modify: dn (%s)\n", dn ));
#else
Debug( LDAP_DEBUG_ARGS, "do_modify: dn (%s)\n", dn, 0, 0 );
#endif
case LDAP_MOD_ADD:
if ( (*modtail)->ml_bvalues == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modify: modify/add operation (%ld) requires values\n",
- (long)mop ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_modify: modify/add operation (%ld) requires values\n",
+ (long)mop ));
#else
Debug( LDAP_DEBUG_ANY,
"do_modify: modify/add operation (%ld) requires values\n",
default: {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modify: invalid modify operation (%ld)\n",
- (long)mop ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_modify: invalid modify operation (%ld)\n",
+ (long)mop ));
#else
Debug( LDAP_DEBUG_ANY,
"do_modify: invalid modify operation (%ld)\n",
if( (rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modify: get_ctrls failed\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_modify: get_ctrls failed\n" ));
#else
Debug( LDAP_DEBUG_ANY, "do_modify: get_ctrls failed\n", 0, 0, 0 );
#endif
if( dn_normalize( ndn ) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modify: invalid dn (%s)\n", dn ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_modify: invalid dn (%s)\n", dn ));
#else
Debug( LDAP_DEBUG_ANY, "do_modify: invalid dn (%s)\n", dn, 0, 0 );
#endif
if( ndn == '\0' ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modify: attempt to modify root DSE.\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_modify: attempt to modify root DSE.\n" ));
#else
Debug( LDAP_DEBUG_ANY, "do_modify: root dse!\n", 0, 0, 0 );
#endif
#ifdef LDAP_DEBUG
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "do_modify: modifications:\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
+ "do_modify: modifications:\n" ));
#else
Debug( LDAP_DEBUG_ARGS, "modifications:\n", 0, 0, 0 );
#endif
for ( tmp = modlist; tmp != NULL; tmp = tmp->ml_next ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "\t%s: %s\n", tmp->ml_op == LDAP_MOD_ADD ?
- "add" : (tmp->ml_op == LDAP_MOD_DELETE ?
- "delete" : "replace"), tmp->ml_type ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
+ "\t%s: %s\n", tmp->ml_op == LDAP_MOD_ADD ?
+ "add" : (tmp->ml_op == LDAP_MOD_DELETE ?
+ "delete" : "replace"), tmp->ml_type ));
#else
Debug( LDAP_DEBUG_ARGS, "\t%s: %s\n",
tmp->ml_op == LDAP_MOD_ADD
if( !validate ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "modlist2mods: no validator for syntax %S\n",
- ad->ad_type->sat_syntax->ssyn_oid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "modlist2mods: no validator for syntax %S\n",
+ ad->ad_type->sat_syntax->ssyn_oid ));
#else
Debug( LDAP_DEBUG_TRACE,
"modlist2mods: no validator for syntax %s\n",
Backend *be;
/* Vars for LDAP v3 newSuperior support */
char *newSuperior = NULL;
- char *nnewSuperior = NULL;
+ char *nnewSuperior = NULL;
Backend *newSuperior_be = NULL;
ber_len_t length;
int rc;
int manageDSAit;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "do_modrdn: begin\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "do_modrdn: begin\n" ));
#else
Debug( LDAP_DEBUG_TRACE, "do_modrdn\n", 0, 0, 0 );
#endif
if ( ber_scanf( op->o_ber, "{aab", &dn, &newrdn, &deloldrdn )
== LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modrdn: ber_scanf failed\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_modrdn: ber_scanf failed\n" ));
#else
Debug( LDAP_DEBUG_ANY, "ber_scanf failed\n", 0, 0, 0 );
#endif
* newSuperior is present: report error.
*/
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modrdn: (v2) invalid field newSuperior.\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_modrdn: (v2) invalid field newSuperior.\n" ));
#else
Debug( LDAP_DEBUG_ANY,
"modrdn(v2): invalid field newSuperior!\n",
== LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modrdn: ber_scanf(\"a\") failed\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_modrdn: ber_scanf(\"a\") failed\n" ));
#else
Debug( LDAP_DEBUG_ANY, "ber_scanf(\"a\") failed\n",
0, 0, 0 );
if( dn_normalize( nnewSuperior ) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modrdn: invalid new superior (%s)\n", newSuperior ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_modrdn: invalid new superior (%s)\n", newSuperior ));
#else
Debug( LDAP_DEBUG_ANY, "do_modrdn: invalid new superior (%s)\n",
newSuperior, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_modrdn: dn (%s) newrdn (%s) newsuperior(%s)\n",
- dn, newrdn, newSuperior != NULL ? newSuperior : "" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
+ "do_modrdn: dn (%s) newrdn (%s) newsuperior(%s)\n",
+ dn, newrdn, newSuperior != NULL ? newSuperior : "" ));
#else
Debug( LDAP_DEBUG_ARGS,
"do_modrdn: dn (%s) newrdn (%s) newsuperior (%s)\n",
if ( ber_scanf( op->o_ber, /*{*/ "}") == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modrdn: ber_scanf failed\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_modrdn: ber_scanf failed\n" ));
#else
Debug( LDAP_DEBUG_ANY, "do_modrdn: ber_scanf failed\n", 0, 0, 0 );
#endif
if( (rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modrdn: get_ctrls failed\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_modrdn: get_ctrls failed\n" ));
#else
Debug( LDAP_DEBUG_ANY, "do_modrdn: get_ctrls failed\n", 0, 0, 0 );
#endif
- /* get_ctrls has sent results. Now clean up. */
+ /* get_ctrls has sent results. Now clean up. */
goto cleanup;
}
if( dn_normalize( ndn ) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modrdn: invalid dn (%s)\n", dn ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_modrdn: invalid dn (%s)\n", dn ));
#else
Debug( LDAP_DEBUG_ANY, "do_modrdn: invalid dn (%s)\n", dn, 0, 0 );
#endif
if( !rdn_validate( newrdn ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modrdn: invalid rdn (%s).\n", newrdn ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_modrdn: invalid rdn (%s).\n", newrdn ));
#else
Debug( LDAP_DEBUG_ANY, "do_modrdn: invalid rdn (%s)\n", newrdn, 0, 0 );
#endif
if( ndn == '\0' ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modrdn: attempt to modify root DSE.\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "do_modrdn: attempt to modify root DSE.\n" ));
#else
Debug( LDAP_DEBUG_ANY, "do_modrdn: root dse!\n", 0, 0, 0 );
#endif
#endif
) {
struct replog_moddn moddn;
- moddn.newrdn = newrdn;
+ moddn.newrdn = newrdn;
moddn.deloldrdn = deloldrdn;
moddn.newsup = newSuperior;
if (lt_dlinit()) {
const char *error = lt_dlerror();
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_CRIT,
- "module_init: lt_ldinit failed: %s\n", error ));
+ LDAP_LOG(( "module", LDAP_LEVEL_CRIT,
+ "module_init: lt_ldinit failed: %s\n", error ));
#else
Debug(LDAP_DEBUG_ANY, "lt_dlinit failed: %s\n", error, 0, 0);
#endif
if (lt_dlexit()) {
const char *error = lt_dlerror();
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_CRIT,
- "module_kill: lt_dlexit failed: %s\n", error ));
+ LDAP_LOG(( "module", LDAP_LEVEL_CRIT,
+ "module_kill: lt_dlexit failed: %s\n", error ));
#else
Debug(LDAP_DEBUG_ANY, "lt_dlexit failed: %s\n", error, 0, 0);
#endif
module = (module_loaded_t *)ch_calloc(1, sizeof(module_loaded_t));
if (module == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_CRIT,
- "module_load: (%s) out of memory.\n", file_name ));
+ LDAP_LOG(( "module", LDAP_LEVEL_CRIT,
+ "module_load: (%s) out of memory.\n", file_name ));
#else
Debug(LDAP_DEBUG_ANY, "module_load failed: (%s) out of memory\n", file_name,
0, 0);
if ((module->lib = lt_dlopen(file_name)) == NULL) {
error = lt_dlerror();
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_CRIT,
- "module_load: lt_dlopen failed: (%s) %s.\n",
- file_name, error ));
+ LDAP_LOG(( "module", LDAP_LEVEL_CRIT,
+ "module_load: lt_dlopen failed: (%s) %s.\n",
+ file_name, error ));
#else
Debug(LDAP_DEBUG_ANY, "lt_dlopen failed: (%s) %s\n", file_name,
error, 0);
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_INFO,
- "module_load: loaded module %s\n", file_name ));
+ LDAP_LOG(( "module", LDAP_LEVEL_INFO,
+ "module_load: loaded module %s\n", file_name ));
#else
Debug(LDAP_DEBUG_CONFIG, "loaded module %s\n", file_name, 0, 0);
#endif
if ((initialize = lt_dlsym(module->lib, "init_module")) == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_ERR,
- "module_load: module %s : no init_module() function found\n",
- file_name ));
+ LDAP_LOG(( "module", LDAP_LEVEL_ERR,
+ "module_load: module %s : no init_module() function found\n",
+ file_name ));
#else
Debug(LDAP_DEBUG_CONFIG, "module %s: no init_module() function found\n",
file_name, 0, 0);
rc = initialize(argc, argv);
if (rc == -1) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_ERR,
- "module_load: module %s init_module() failed\n", file_name));
+ LDAP_LOG(( "module", LDAP_LEVEL_ERR,
+ "module_load: module %s init_module() failed\n", file_name));
#else
Debug(LDAP_DEBUG_CONFIG, "module %s: init_module() failed\n",
file_name, 0, 0);
|| module_regtable[rc].proc == NULL)
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_ERR,
- "module_load: module %s: unknown registration type (%d).\n", file_name));
+ LDAP_LOG(( "module", LDAP_LEVEL_ERR,
+ "module_load: module %s: unknown registration type (%d).\n", file_name));
#else
Debug(LDAP_DEBUG_CONFIG, "module %s: unknown registration type (%d)\n",
file_name, rc, 0);
rc = (module_regtable[rc].proc)(module, file_name);
if (rc != 0) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_ERR,
- "module_load: module %s:%s could not be registered.\n",
- file_name, module_regtable[rc].type ));
+ LDAP_LOG(( "module", LDAP_LEVEL_ERR,
+ "module_load: module %s:%s could not be registered.\n",
+ file_name, module_regtable[rc].type ));
#else
Debug(LDAP_DEBUG_CONFIG, "module %s: %s module could not be registered\n",
file_name, module_regtable[rc].type, 0);
module_list = module;
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_INFO,
- "module_load: module %s:%s registered\n", file_name,
- module_regtable[rc].type ));
+ LDAP_LOG(( "module", LDAP_LEVEL_INFO,
+ "module_load: module %s:%s registered\n", file_name,
+ module_regtable[rc].type ));
#else
Debug(LDAP_DEBUG_CONFIG, "module %s: %s module registered\n",
file_name, module_regtable[rc].type, 0);
static int
mr_index_name_cmp(
- char *name,
+ char *name,
struct mindexrec *mir
)
{
struct mindexrec *mir = NULL;
if ( (mir = (struct mindexrec *) avl_find( mr_index, mrname,
- (AVL_CMP) mr_index_name_cmp )) != NULL ) {
+ (AVL_CMP) mr_index_name_cmp )) != NULL ) {
return( mir->mir_mr );
}
return( NULL );
if( usage == SLAP_MR_NONE ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "register_matching_rule: %s not usable\n", desc ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "register_matching_rule: %s not usable\n", desc ));
#else
Debug( LDAP_DEBUG_ANY, "register_matching_rule: not usable %s\n",
desc, 0, 0 );
if( amr == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "register_matching_rule: could not locate associated matching rule %s for %s\n",
- associated, desc ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "register_matching_rule: could not locate associated matching rule %s for %s\n",
+ associated, desc ));
#else
Debug( LDAP_DEBUG_ANY, "register_matching_rule: could not locate "
"associated matching rule %s for %s\n",
mr = ldap_str2matchingrule( desc, &code, &err, LDAP_SCHEMA_ALLOW_ALL);
if ( !mr ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "register_matching_rule: %s before %s in %s.\n",
- ldap_scherr2str(code), err, desc ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "register_matching_rule: %s before %s in %s.\n",
+ ldap_scherr2str(code), err, desc ));
#else
Debug( LDAP_DEBUG_ANY, "Error in register_matching_rule: %s before %s in %s\n",
ldap_scherr2str(code), err, desc );
if ( code ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "register_matching_rule: %s for %s in %s.\n",
- scherr2str(code), err, desc ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "register_matching_rule: %s for %s in %s.\n",
+ scherr2str(code), err, desc ));
#else
Debug( LDAP_DEBUG_ANY, "Error in register_matching_rule: %s for %s in %s\n",
scherr2str(code), err, desc );
if( rc == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "get_mra: ber_scanf (\"{t\") failure\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "get_mra: ber_scanf (\"{t\") failure\n" ));
#else
Debug( LDAP_DEBUG_ANY, " get_mra ber_scanf\n", 0, 0, 0 );
#endif
rc = ber_scanf( ber, "a", &ma->ma_rule_text );
if ( rc == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "get_mra: ber_scanf(\"a\") failure.\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "get_mra: ber_scanf(\"a\") failure.\n" ));
#else
Debug( LDAP_DEBUG_ANY, " get_mra ber_scanf for mr\n", 0, 0, 0 );
#endif
if( rc == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "get_mra: ber_scanf (\"t\") failure\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "get_mra: ber_scanf (\"t\") failure\n" ));
#else
Debug( LDAP_DEBUG_ANY, " get_mra ber_scanf\n", 0, 0, 0 );
#endif
rc = ber_scanf( ber, "o", &type );
if ( rc == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "get_mra: ber_scanf (\"o\") failure.\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "get_mra: ber_scanf (\"o\") failure.\n" ));
#else
Debug( LDAP_DEBUG_ANY, " get_mra ber_scanf for ad\n", 0, 0, 0 );
#endif
if( rc == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "get_mra: ber_scanf (\"t\") failure.\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "get_mra: ber_scanf (\"t\") failure.\n" ));
#else
Debug( LDAP_DEBUG_ANY, " get_mra ber_scanf\n", 0, 0, 0 );
#endif
if ( tag != LDAP_FILTER_EXT_VALUE ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "get_mra: ber_scanf missing value\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "get_mra: ber_scanf missing value\n" ));
#else
Debug( LDAP_DEBUG_ANY, " get_mra ber_scanf missing value\n", 0, 0, 0 );
#endif
if( rc == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "get_mra: ber_scanf (\"o\") failure.\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "get_mra: ber_scanf (\"o\") failure.\n" ));
#else
Debug( LDAP_DEBUG_ANY, " get_mra ber_scanf\n", 0, 0, 0 );
#endif
if( rc == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "get_mra: ber_scanf failure\n"));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "get_mra: ber_scanf failure\n"));
#else
Debug( LDAP_DEBUG_ANY, " get_mra ber_scanf\n", 0, 0, 0 );
#endif
if( attr == NULL ) {
/* no objectClass attribute */
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "is_entry_objectclass: dn(%s), oid (%s), no objectlcass attribute.\n",
- e->e_dn == NULL ? "" : e->e_dn, oc->soc_oclass.oc_oid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "is_entry_objectclass: dn(%s), oid (%s), no objectlcass attribute.\n",
+ e->e_dn == NULL ? "" : e->e_dn, oc->soc_oclass.oc_oid ));
#else
Debug( LDAP_DEBUG_ANY, "is_entry_objectclass(\"%s\", \"%s\") "
"no objectClass attribute\n",
if ( *tmp == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "slap_op_remove: can't find op %ld.\n",
- (long)op->o_msgid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "slap_op_remove: can't find op %ld.\n",
+ (long)op->o_msgid ));
#else
Debug( LDAP_DEBUG_ANY, "op_delete: can't find op %ld\n",
(long) op->o_msgid, 0, 0 );
if( ber == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "slap_passwd_parse: ber_init failed\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "slap_passwd_parse: ber_init failed\n" ));
#else
Debug( LDAP_DEBUG_TRACE, "slap_passwd_parse: ber_init failed\n",
0, 0, 0 );
if( tag == LDAP_TAG_EXOP_X_MODIFY_PASSWD_ID ) {
if( id == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "slap_passwd_parse: ID not allowed.\n"));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "slap_passwd_parse: ID not allowed.\n"));
#else
Debug( LDAP_DEBUG_TRACE, "slap_passwd_parse: ID not allowed.\n",
0, 0, 0 );
if( tag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "slap_passwd_parse: ID parse failed.\n"));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "slap_passwd_parse: ID parse failed.\n"));
#else
Debug( LDAP_DEBUG_TRACE, "slap_passwd_parse: ID parse failed.\n",
0, 0, 0 );
if( tag == LDAP_TAG_EXOP_X_MODIFY_PASSWD_OLD ) {
if( oldpass == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "slap_passwd_parse: OLD not allowed.\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "slap_passwd_parse: OLD not allowed.\n" ));
#else
Debug( LDAP_DEBUG_TRACE, "slap_passwd_parse: OLD not allowed.\n",
0, 0, 0 );
if( tag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "slap_passwd_parse: ID parse failed.\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "slap_passwd_parse: ID parse failed.\n" ));
#else
Debug( LDAP_DEBUG_TRACE, "slap_passwd_parse: ID parse failed.\n",
0, 0, 0 );
if( tag == LDAP_TAG_EXOP_X_MODIFY_PASSWD_NEW ) {
if( newpass == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "slap_passwd_parse: NEW not allowed.\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "slap_passwd_parse: NEW not allowed.\n" ));
#else
Debug( LDAP_DEBUG_TRACE, "slap_passwd_parse: NEW not allowed.\n",
0, 0, 0 );
if( tag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "slap_passwd_parse: OLD parse failed.\n"));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "slap_passwd_parse: OLD parse failed.\n"));
#else
Debug( LDAP_DEBUG_TRACE, "slap_passwd_parse: OLD parse failed.\n",
0, 0, 0 );
if( len != 0 ) {
decoding_error:
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "slap_passwd_parse: decoding error, len=%ld\n", (long)len ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "slap_passwd_parse: decoding error, len=%ld\n", (long)len ));
#else
Debug( LDAP_DEBUG_TRACE,
"slap_passwd_parse: decoding error, len=%ld\n",
assert( cred != NULL );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "slap_passwd_return: %ld\n",(long)cred->bv_len ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "slap_passwd_return: %ld\n",(long)cred->bv_len ));
#else
Debug( LDAP_DEBUG_TRACE, "slap_passwd_return: %ld\n",
(long) cred->bv_len, 0, 0 );
Attribute *a,
struct berval *cred )
{
- int i;
+ int i;
int result = 1;
#if defined( SLAPD_CRYPT ) || defined( SLAPD_SPASSWD )
struct berval * slap_passwd_generate( void )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "slap_passwd_generate: begin\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "slap_passwd_generate: begin\n" ));
#else
Debug( LDAP_DEBUG_TRACE, "slap_passwd_generate\n", 0, 0, 0 );
#endif
*/
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_ldap_ber: conn %d ber_flush failed err=%d (%s)\n",
- conn ? conn->c_connid : 0, err, sock_errstr(err) ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "send_ldap_ber: conn %d ber_flush failed err=%d (%s)\n",
+ conn ? conn->c_connid : 0, err, sock_errstr(err) ));
#else
Debug( LDAP_DEBUG_CONNS, "ber_flush failed errno=%d reason=\"%s\"\n",
err, sock_errstr(err), 0 );
ber = ber_alloc_t( LBER_USE_DER );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_ldap_response: conn %d msgid=%ld tag=%ld err=%ld\n",
- conn ? conn->c_connid : 0, (long)msgid, (long)tag, (long)err ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "send_ldap_response: conn %d msgid=%ld tag=%ld err=%ld\n",
+ conn ? conn->c_connid : 0, (long)msgid, (long)tag, (long)err ));
#else
Debug( LDAP_DEBUG_TRACE,
"send_ldap_response: msgid=%ld tag=%ld err=%ld\n",
if( ref ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "send_ldap_response: conn %d ref=\"%s\"\n",
- conn ? conn->c_connid : 0,
- ref[0] && ref[0]->bv_val ? ref[0]->bv_val : "NULL" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
+ "send_ldap_response: conn %d ref=\"%s\"\n",
+ conn ? conn->c_connid : 0,
+ ref[0] && ref[0]->bv_val ? ref[0]->bv_val : "NULL" ));
#else
Debug( LDAP_DEBUG_ARGS, "send_ldap_response: ref=\"%s\"\n",
ref[0] && ref[0]->bv_val ? ref[0]->bv_val : "NULL",
if ( ber == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_ldap_response: conn %d ber_alloc failed\n",
- conn ? conn->c_connid : 0 ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "send_ldap_response: conn %d ber_alloc failed\n",
+ conn ? conn->c_connid : 0 ));
#else
Debug( LDAP_DEBUG_ANY, "ber_alloc failed\n", 0, 0, 0 );
#endif
if ( rc == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_ldap_response: conn %d ber_printf failed\n",
- conn ? conn->c_connid : 0 ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "send_ldap_response: conn %d ber_printf failed\n",
+ conn ? conn->c_connid : 0 ));
#else
Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
#endif
if ( bytes < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_ldap_response: conn %d ber write failed\n",
- conn ? conn->c_connid : 0 ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "send_ldap_response: conn %d ber write failed\n",
+ conn ? conn->c_connid : 0 ));
#else
Debug( LDAP_DEBUG_ANY,
"send_ldap_response: ber write failed\n",
assert( LDAP_UNSOLICITED_ERROR( err ) );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_ldap_disconnect: conn %d %d:%s\n",
- conn ? conn->c_connid : 0, err, text ? text : "" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "send_ldap_disconnect: conn %d %d:%s\n",
+ conn ? conn->c_connid : 0, err, text ? text : "" ));
#else
Debug( LDAP_DEBUG_TRACE,
"send_ldap_disconnect %d:%s\n",
assert( !LDAP_API_ERROR( err ) );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_ldap_result : conn %ld op=%ld p=%d\n",
- (long)op->o_connid, (long)op->o_opid, op->o_protocol ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "send_ldap_result : conn %ld op=%ld p=%d\n",
+ (long)op->o_connid, (long)op->o_opid, op->o_protocol ));
#else
Debug( LDAP_DEBUG_TRACE,
"send_ldap_result: conn=%ld op=%ld p=%d\n",
#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "send_ldap_result: conn=%ld err=%d matched=\"%s\" text=\"%s\"\n",
- (long)op->o_connid, err, matched ? matched : "", text ? text : "" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
+ "send_ldap_result: conn=%ld err=%d matched=\"%s\" text=\"%s\"\n",
+ (long)op->o_connid, err, matched ? matched : "", text ? text : "" ));
#else
Debug( LDAP_DEBUG_ARGS,
"send_ldap_result: err=%d matched=\"%s\" text=\"%s\"\n",
- err, matched ? matched : "", text ? text : "" );
+ err, matched ? matched : "", text ? text : "" );
#endif
if( ref ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "send_ldap_result: referral=\"%s\"\n",
- ref[0] && ref[0]->bv_val ? ref[0]->bv_val : "NULL" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
+ "send_ldap_result: referral=\"%s\"\n",
+ ref[0] && ref[0]->bv_val ? ref[0]->bv_val : "NULL" ));
#else
Debug( LDAP_DEBUG_ARGS,
"send_ldap_result: referral=\"%s\"\n",
ber_int_t msgid;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_ldap_sasl: conn %d err=%ld len=%ld\n",
- op->o_connid, (long)err, cred ? cred->bv_len : -1 ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "send_ldap_sasl: conn %d err=%ld len=%ld\n",
+ op->o_connid, (long)err, cred ? cred->bv_len : -1 ));
#else
Debug( LDAP_DEBUG_TRACE, "send_ldap_sasl: err=%ld len=%ld\n",
(long) err, cred ? cred->bv_len : -1, NULL );
send_ldap_response( conn, op, tag, msgid,
err, matched, text, ref,
- NULL, NULL, cred, ctrls );
+ NULL, NULL, cred, ctrls );
}
void
ber_int_t msgid;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_ldap_extended: conn %d err=%ld oid=%s len=%ld\n",
- op->o_connid, (long)err, rspoid ? rspoid : "",
- rspdata != NULL ? (long)rspdata->bv_len : (long)0 ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "send_ldap_extended: conn %d err=%ld oid=%s len=%ld\n",
+ op->o_connid, (long)err, rspoid ? rspoid : "",
+ rspdata != NULL ? (long)rspdata->bv_len : (long)0 ));
#else
Debug( LDAP_DEBUG_TRACE,
"send_ldap_extended err=%ld oid=%s len=%ld\n",
assert( !LDAP_API_ERROR( err ) );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_search_result: conn %d err=%d matched=\"%s\"\n",
- op->o_connid, err, matched ? matched : "",
- text ? text : "" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "send_search_result: conn %d err=%d matched=\"%s\"\n",
+ op->o_connid, err, matched ? matched : "",
+ text ? text : "" ));
#else
Debug( LDAP_DEBUG_TRACE,
"send_search_result: err=%d matched=\"%s\" text=\"%s\"\n",
- err, matched ? matched : "", text ? text : "" );
+ err, matched ? matched : "", text ? text : "" );
#endif
BerElement *ber;
Attribute *a, *aa;
int i, rc=-1, bytes;
- char *edn;
+ char *edn;
int userattrs;
int opattrs;
AttributeDescription *ad_entry = slap_schema.si_ad_entry;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_search_entry: conn %d dn=\"%s\"%s\n",
- op->o_connid, e->e_dn,
- attrsonly ? " (attrsOnly)" : "" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "send_search_entry: conn %d dn=\"%s\"%s\n",
+ op->o_connid, e->e_dn,
+ attrsonly ? " (attrsOnly)" : "" ));
#else
Debug( LDAP_DEBUG_TRACE,
"=> send_search_entry: dn=\"%s\"%s\n",
ad_entry, NULL, ACL_READ ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
- "send_search_entry: conn %d access to entry (%s) not allowed\n",
- op->o_connid, e->e_dn ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
+ "send_search_entry: conn %d access to entry (%s) not allowed\n",
+ op->o_connid, e->e_dn ));
#else
Debug( LDAP_DEBUG_ACL,
"send_search_entry: access to entry not allowed\n",
if ( ber == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_entry: conn %d ber_alloc failed\n",
- op->o_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "send_search_entry: conn %d ber_alloc failed\n",
+ op->o_connid ));
#else
Debug( LDAP_DEBUG_ANY, "ber_alloc failed\n", 0, 0, 0 );
#endif
if ( rc == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_entry: conn %d ber_printf failed\n",
- op->o_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "send_search_entry: conn %d ber_printf failed\n",
+ op->o_connid ));
#else
Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
#endif
if ( ! access_allowed( be, conn, op, e, desc, NULL, ACL_READ ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
- "send_search_entry: conn %d access to attribute %s not allowed\n",
- op->o_connid, desc->ad_cname->bv_val ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
+ "send_search_entry: conn %d access to attribute %s not allowed\n",
+ op->o_connid, desc->ad_cname->bv_val ));
#else
Debug( LDAP_DEBUG_ACL, "acl: access to attribute %s not allowed\n",
desc->ad_cname->bv_val, 0, 0 );
if (( rc = ber_printf( ber, "{s[" /*]}*/ , type )) == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_entry: conn %d ber_printf failed\n",
- op->o_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "send_search_entry: conn %d ber_printf failed\n",
+ op->o_connid ));
#else
Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
#endif
desc, a->a_vals[i], ACL_READ ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
- "send_search_entry: conn %d access to attribute %s, value %d not allowed\n",
- op->o_connid, desc->ad_cname->bv_val, i ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
+ "send_search_entry: conn %d access to attribute %s, value %d not allowed\n",
+ op->o_connid, desc->ad_cname->bv_val, i ));
#else
Debug( LDAP_DEBUG_ACL,
"acl: access to attribute %s, value %d not allowed\n",
- desc->ad_cname->bv_val, i, 0 );
+ desc->ad_cname->bv_val, i, 0 );
#endif
continue;
if (( rc = ber_printf( ber, "O", a->a_vals[i] )) == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_entry: conn %d ber_printf failed.\n",
- op->o_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "send_search_entry: conn %d ber_printf failed.\n",
+ op->o_connid ));
#else
Debug( LDAP_DEBUG_ANY,
"ber_printf failed\n", 0, 0, 0 );
if (( rc = ber_printf( ber, /*{[*/ "]N}" )) == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_entry: conn %d ber_printf failed\n",
- op->o_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "send_search_entry: conn %d ber_printf failed\n",
+ op->o_connid ));
#else
Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
#endif
if ( ! access_allowed( be, conn, op, e, desc, NULL, ACL_READ ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
- "send_search_entry: conn %s access to attribute %s not allowed\n",
- op->o_connid, desc->ad_cname->bv_val ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
+ "send_search_entry: conn %s access to attribute %s not allowed\n",
+ op->o_connid, desc->ad_cname->bv_val ));
#else
Debug( LDAP_DEBUG_ACL, "acl: access to attribute %s not allowed\n",
desc->ad_cname->bv_val, 0, 0 );
rc = ber_printf( ber, "{s[" /*]}*/ , desc->ad_cname->bv_val );
if ( rc == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_entry: conn %d ber_printf failed\n",
- op->o_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "send_search_entry: conn %d ber_printf failed\n",
+ op->o_connid ));
#else
Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
#endif
desc, a->a_vals[i], ACL_READ ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
- "send_search_entry: conn %d access to %s, value %d not allowed\n",
- op->o_connid, desc->ad_cname->bv_val, i ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
+ "send_search_entry: conn %d access to %s, value %d not allowed\n",
+ op->o_connid, desc->ad_cname->bv_val, i ));
#else
Debug( LDAP_DEBUG_ACL,
"acl: access to attribute %s, value %d not allowed\n",
- desc->ad_cname->bv_val, i, 0 );
+ desc->ad_cname->bv_val, i, 0 );
#endif
continue;
if (( rc = ber_printf( ber, "O", a->a_vals[i] )) == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_entry: conn %d ber_printf failed\n",
- op->o_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "send_search_entry: conn %d ber_printf failed\n",
+ op->o_connid ));
#else
Debug( LDAP_DEBUG_ANY,
"ber_printf failed\n", 0, 0, 0 );
if (( rc = ber_printf( ber, /*{[*/ "]N}" )) == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_entry: conn %d ber_printf failed\n",
- op->o_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "send_search_entry: conn %d ber_printf failed\n",
+ op->o_connid ));
#else
Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
#endif
if ( rc == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_entry: conn %d ber_printf failed\n",
- op->o_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "send_search_entry: conn %d ber_printf failed\n",
+ op->o_connid ));
#else
Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
#endif
if ( bytes < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_ldap_response: conn %d ber write failed.\n",
- op->o_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "send_ldap_response: conn %d ber write failed.\n",
+ op->o_connid ));
#else
Debug( LDAP_DEBUG_ANY,
"send_ldap_response: ber write failed\n",
(long) conn->c_connid, (long) op->o_opid, e->e_dn, 0, 0 );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_search_entry: conn %d exit.\n",
- op->o_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "send_search_entry: conn %d exit.\n",
+ op->o_connid ));
#else
Debug( LDAP_DEBUG_TRACE, "<= send_search_entry\n", 0, 0, 0 );
#endif
AttributeDescription *ad_entry = slap_schema.si_ad_entry;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_search_reference: conn %d dn=\"%s\"\n",
- op->o_connid, e->e_dn ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "send_search_reference: conn %d dn=\"%s\"\n",
+ op->o_connid, e->e_dn ));
#else
Debug( LDAP_DEBUG_TRACE,
"=> send_search_reference: dn=\"%s\"\n",
ad_entry, NULL, ACL_READ ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
- "send_search_reference: conn %d access to entry %s not allowed\n",
- op->o_connid, e->e_dn ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
+ "send_search_reference: conn %d access to entry %s not allowed\n",
+ op->o_connid, e->e_dn ));
#else
Debug( LDAP_DEBUG_ACL,
"send_search_reference: access to entry not allowed\n",
ad_ref, NULL, ACL_READ ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
- "send_search_reference: conn %d access to reference not allowed.\n",
- op->o_connid ));
+ LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
+ "send_search_reference: conn %d access to reference not allowed.\n",
+ op->o_connid ));
#else
Debug( LDAP_DEBUG_ACL,
"send_search_reference: access to reference not allowed\n",
if( refs == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_reference: null ref in (%s).\n",
- op->o_connid, e->e_dn ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "send_search_reference: null ref in (%s).\n",
+ op->o_connid, e->e_dn ));
#else
Debug( LDAP_DEBUG_ANY,
"send_search_reference: null ref in (%s)\n",
if ( ber == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_reference: conn %d ber_alloc failed\n",
- op->o_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "send_search_reference: conn %d ber_alloc failed\n",
+ op->o_connid ));
#else
Debug( LDAP_DEBUG_ANY,
"send_search_reference: ber_alloc failed\n", 0, 0, 0 );
if ( rc == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_reference: conn %d ber_printf failed.\n",
- op->o_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ "send_search_reference: conn %d ber_printf failed.\n",
+ op->o_connid ));
#else
Debug( LDAP_DEBUG_ANY,
"send_search_reference: ber_printf failed\n", 0, 0, 0 );
(long) conn->c_connid, (long) op->o_opid, e->e_dn, 0, 0 );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_search_reference: conn %d exit.\n", op->o_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "send_search_reference: conn %d exit.\n", op->o_connid ));
#else
Debug( LDAP_DEBUG_TRACE, "<= send_search_reference\n", 0, 0, 0 );
#endif
if ( strncasecmp( s, "RESULT", 6 ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "str2result: (%s), expecting \"RESULT\"\n", s ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "str2result: (%s), expecting \"RESULT\"\n", s ));
#else
Debug( LDAP_DEBUG_ANY, "str2result (%s) expecting \"RESULT\"\n",
s, 0, 0 );
}
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "str2result: (%s) unknown.\n", s ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "str2result: (%s) unknown.\n", s ));
#else
Debug( LDAP_DEBUG_ANY, "str2result (%s) unknown\n",
s, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "SASL [conn=%d] %s: %s\n",
- conn ? conn->c_connid : -1,
- label, message ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "SASL [conn=%d] %s: %s\n",
+ conn ? conn->c_connid : -1,
+ label, message ));
#else
Debug( level, "SASL [conn=%d] %s: %s\n",
conn ? conn->c_connid: -1,
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_getdn: conn %d id=%s\n",
- conn ? conn->c_connid : -1,
- id ? (*id ? id : "<empty>") : "NULL" ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "slap_sasl_getdn: conn %d id=%s\n",
+ conn ? conn->c_connid : -1,
+ id ? (*id ? id : "<empty>") : "NULL" ));
#else
Debug( LDAP_DEBUG_ARGS, "slap_sasl_getdn: id=%s\n",
id?(*id?id:"<empty>"):"NULL",0,0 );
rc = sasl_getprop( ctx, SASL_REALM, (void **)&c );
if( rc != SASL_OK ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
- "slap_sasl_getdn: getprop(REALM) failed.\n" ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
+ "slap_sasl_getdn: getprop(REALM) failed.\n" ));
#else
Debug(LDAP_DEBUG_TRACE,
"getdn: getprop(REALM) failed!\n", 0,0,0);
strcpy( dn+len, ",cn=authzid" );
len += len1;
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "getdn: u:id converted to %s.\n", dn ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "getdn: u:id converted to %s.\n", dn ));
#else
Debug( LDAP_DEBUG_TRACE, "getdn: u:id converted to %s\n", dn,0,0 );
#endif
ch_free( c1 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_getdn: dn:id converted to %s.\n", dn ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "slap_sasl_getdn: dn:id converted to %s.\n", dn ));
#else
Debug( LDAP_DEBUG_TRACE, "getdn: dn:id converted to %s\n", dn,0,0 );
#endif
}
}
- if( ( flags & FLAG_GETDN_FINAL ) == 0 ) {
+ if( ( flags & FLAG_GETDN_FINAL ) == 0 ) {
dn_normalize( dn );
}
*user = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sas_authorize: conn %d authcid=\"%s\" authzid=\"%s\"\n",
- conn ? conn->c_connid : -1,
- authcid ? authcid : "<empty>",
- authzid ? authzid : "<empty>" ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "slap_sas_authorize: conn %d authcid=\"%s\" authzid=\"%s\"\n",
+ conn ? conn->c_connid : -1,
+ authcid ? authcid : "<empty>",
+ authzid ? authzid : "<empty>" ));
#else
Debug( LDAP_DEBUG_ARGS, "SASL Authorize [conn=%ld]: "
"authcid=\"%s\" authzid=\"%s\"\n",
}
if( ( authzid == NULL ) || !strcmp( authcid,authzid ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_authorize: conn %d Using authcDN=%s\n",
- conn ? conn->c_connid : -1, authcDN ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "slap_sasl_authorize: conn %d Using authcDN=%s\n",
+ conn ? conn->c_connid : -1, authcDN ));
#else
Debug( LDAP_DEBUG_TRACE, "SASL Authorize [conn=%ld]: "
"Using authcDN=%s\n", (long) (conn ? conn->c_connid : -1), authcDN,0 );
rc = slap_sasl_authorized( authcDN, authzDN );
if( rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_INFO,
- "slap_sasl_authorize: conn %ld authorization disallowed (%d)\n",
- (long)(conn ? conn->c_connid : -1), rc ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_INFO,
+ "slap_sasl_authorize: conn %ld authorization disallowed (%d)\n",
+ (long)(conn ? conn->c_connid : -1), rc ));
#else
Debug( LDAP_DEBUG_TRACE, "SASL Authorize [conn=%ld]: "
" authorization disallowed (%d)\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_authorize: conn %d authorization allowed\n",
- (long)(conn ? conn->c_connid : -1 ) );
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "slap_sasl_authorize: conn %d authorization allowed\n",
+ (long)(conn ? conn->c_connid : -1 ) );
#else
Debug( LDAP_DEBUG_TRACE, "SASL Authorize [conn=%ld]: "
" authorization allowed\n",
if( rc != SASL_OK ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_INFO,
- "slap_sasl_init: init failed.\n" ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_INFO,
+ "slap_sasl_init: init failed.\n" ));
#else
Debug( LDAP_DEBUG_ANY, "sasl_server_init failed\n",
0, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_INFO,
- "slap_sasl_init: initialized!\n"));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_INFO,
+ "slap_sasl_init: initialized!\n"));
#else
Debug( LDAP_DEBUG_TRACE, "slap_sasl_init: initialized!\n",
0, 0, 0 );
if( sc != SASL_OK ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
- "slap_sasl_open: sasl_server_new failed: %d\n", sc ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
+ "slap_sasl_open: sasl_server_new failed: %d\n", sc ));
#else
Debug( LDAP_DEBUG_ANY, "sasl_server_new failed: %d\n",
sc, 0, 0 );
if( sc != SASL_OK ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
- "slap_sasl_open: sasl_setprop failed: %d \n", sc ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
+ "slap_sasl_open: sasl_setprop failed: %d \n", sc ));
#else
Debug( LDAP_DEBUG_ANY, "sasl_setprop failed: %d\n",
sc, 0, 0 );
if( sc != SASL_OK ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
- "slap_sasl_mechs: sasl_listmech failed: %d\n", sc ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
+ "slap_sasl_mechs: sasl_listmech failed: %d\n", sc ));
#else
Debug( LDAP_DEBUG_ANY, "slap_sasl_listmech failed: %d\n",
sc, 0, 0 );
}
int slap_sasl_bind(
- Connection *conn,
- Operation *op,
- const char *dn,
- const char *ndn,
- struct berval *cred,
+ Connection *conn,
+ Operation *op,
+ const char *dn,
+ const char *ndn,
+ struct berval *cred,
char **edn,
slap_ssf_t *ssfp )
{
int sc;
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "sasl_bind: conn %ld dn=\"%s\" mech=%s datalen=%d\n",
- conn->c_connid, dn,
- conn->c_sasl_bind_in_progress ? "<continuing>" : conn->c_sasl_bind_mech,
- cred ? cred->bv_len : 0 ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "sasl_bind: conn %ld dn=\"%s\" mech=%s datalen=%d\n",
+ conn->c_connid, dn,
+ conn->c_sasl_bind_in_progress ? "<continuing>" : conn->c_sasl_bind_mech,
+ cred ? cred->bv_len : 0 ));
#else
Debug(LDAP_DEBUG_ARGS,
"==> sasl_bind: dn=\"%s\" mech=%s datalen=%d\n", dn,
if ( sc != SASL_OK ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
- "slap_sasl_bind: getprop(USERNAME) failed: %d\n", sc ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
+ "slap_sasl_bind: getprop(USERNAME) failed: %d\n", sc ));
#else
Debug(LDAP_DEBUG_TRACE,
"slap_sasl_bind: getprop(USERNAME) failed!\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_bind: rc=%d\n", rc ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "slap_sasl_bind: rc=%d\n", rc ));
#else
Debug(LDAP_DEBUG_TRACE, "<== slap_sasl_bind: rc=%d\n", rc, 0, 0);
#endif
-/* URI format: ldap://<host>/<base>[?[<attrs>][?[<scope>][?[<filter>]]]] */
+/* URI format: ldap://<host>/<base>[?[<attrs>][?[<scope>][?[<filter>]]]] */
int slap_parseURI( char *uri, char **searchbase, int *scope, Filter **filter )
{
*filter = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_parseURI: parsing %s\n", uri ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "slap_parseURI: parsing %s\n", uri ));
#else
Debug( LDAP_DEBUG_TRACE, "slap_parseURI: parsing %s\n", uri, 0, 0 );
#endif
rc = regcomp( ®->workspace, reg->match, REG_EXTENDED|REG_ICASE );
if ( rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
- "slap_sasl_regexp_config: \"%s\" could not be compiled.\n"
- reg->match ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
+ "slap_sasl_regexp_config: \"%s\" could not be compiled.\n"
+ reg->match ));
#else
Debug( LDAP_DEBUG_ANY,
"SASL match pattern %s could not be compiled by regexp engine\n",
/* Precompile replace pattern. Find the $<n> placeholders */
reg->offset[0] = -2;
n = 1;
- for ( c = reg->replace; *c; c++ ) {
+ for ( c = reg->replace; *c; c++ ) {
if ( *c == '\\' ) {
c++;
continue;
if ( *c == '$' ) {
if ( n == SASLREGEX_REPLACE ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
- "slap_sasl_regexp_config: \"%s\" has too many $n placeholders (max %d)\n",
- reg->replace, SASLREGEX_REPLACE ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
+ "slap_sasl_regexp_config: \"%s\" has too many $n placeholders (max %d)\n",
+ reg->replace, SASLREGEX_REPLACE ));
#else
Debug( LDAP_DEBUG_ANY,
"SASL replace pattern %s has too many $n placeholders (max %d)\n",
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_regexp: converting SASL name %s\n", saslname ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "slap_sasl_regexp: converting SASL name %s\n", saslname ));
#else
Debug( LDAP_DEBUG_TRACE, "slap_sasl_regexp: converting SASL name %s\n",
saslname, 0, 0 );
break;
/* Len of string from saslname that matched next $i (b,d above) */
- i = reg->replace[ reg->offset[n] + 1 ] - '0';
+ i = reg->replace[ reg->offset[n] + 1 ] - '0';
len += reg->strings[i].rm_eo - reg->strings[i].rm_so;
n++;
}
break;
/* Paste in string from saslname that matched next $i (b,d above) */
- i = reg->replace[ reg->offset[n] + 1 ] - '0';
+ i = reg->replace[ reg->offset[n] + 1 ] - '0';
len = reg->strings[i].rm_eo - reg->strings[i].rm_so;
strncpy( uri+insert, saslname + reg->strings[i].rm_so, len );
insert += len;
uri[insert] = '\0';
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_regexp: converted SASL name to %s\n", uri ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "slap_sasl_regexp: converted SASL name to %s\n", uri ));
#else
Debug( LDAP_DEBUG_TRACE,
"slap_sasl_regexp: converted SASL name to %s\n", uri, 0, 0 );
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl2dn: converting SASL name %s to DN.\n", saslname ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "slap_sasl2dn: converting SASL name %s to DN.\n", saslname ));
#else
Debug( LDAP_DEBUG_TRACE,
"==>slap_sasl2dn: Converting SASL name %s to a DN\n", saslname, 0,0 );
/* Must do an internal search */
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_DETAIL1,
- "slap_sasl2dn: performing internal search (base=%s, scope=%s)\n",
- searchbase, scope ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_DETAIL1,
+ "slap_sasl2dn: performing internal search (base=%s, scope=%s)\n",
+ searchbase, scope ));
#else
Debug( LDAP_DEBUG_TRACE,
"slap_sasl2dn: performing internal search (base=%s, scope=%d)\n",
/* Make sure exactly one entry was returned */
rc = ldap_count_entries( client, res );
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_DETAIL1,
- "slap_sasl2dn: search DN returned %d entries\n", rc ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_DETAIL1,
+ "slap_sasl2dn: search DN returned %d entries\n", rc ));
#else
Debug( LDAP_DEBUG_TRACE,
"slap_sasl2dn: search DN returned %d entries\n", rc,0,0 );
if( client ) ldap_unbind( client );
if( DN ) dn_normalize( DN );
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl2dn: Converted SASL name to %s\n", DN ? DN : "<nothing>" ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "slap_sasl2dn: Converted SASL name to %s\n", DN ? DN : "<nothing>" ));
#else
Debug( LDAP_DEBUG_TRACE, "<==slap_sasl2dn: Converted SASL name to %s\n",
DN ? DN : "<nothing>", 0, 0 );
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_match: comparing DN %s to rule %s\n", assertDN, rule );
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "slap_sasl_match: comparing DN %s to rule %s\n", assertDN, rule );
#else
Debug( LDAP_DEBUG_TRACE,
"===>slap_sasl_match: comparing DN %s to rule %s\n", assertDN, rule, 0 );
/* Must run an internal search. */
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_DETAIL1,
- "slap_sasl_match: performing internal search (base=%s, scope=%d)\n",
- searchbase, scope ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_DETAIL1,
+ "slap_sasl_match: performing internal search (base=%s, scope=%d)\n",
+ searchbase, scope ));
#else
Debug( LDAP_DEBUG_TRACE,
"slap_sasl_match: performing internal search (base=%s, scope=%d)\n",
if( res ) ldap_msgfree( res );
if( client ) ldap_unbind( client );
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_match: comparison returned %d\n", rc ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "slap_sasl_match: comparison returned %d\n", rc ));
#else
Debug( LDAP_DEBUG_TRACE,
"<===slap_sasl_match: comparison returned %d\n", rc, 0, 0);
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_check_authz: does %s match %s rule in %s?\n",
- assertDN, attr, searchDN ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "slap_sasl_check_authz: does %s match %s rule in %s?\n",
+ assertDN, attr, searchDN ));
#else
Debug( LDAP_DEBUG_TRACE,
"==>slap_sasl_check_authz: does %s match %s rule in %s?\n",
if( ad ) ad_free( ad, 1 );
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_check_authz: %s check returning %s\n", attr, rc ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "slap_sasl_check_authz: %s check returning %s\n", attr, rc ));
#else
Debug( LDAP_DEBUG_TRACE,
"<==slap_sasl_check_authz: %s check returning %d\n", attr, rc, 0);
-#endif /* HAVE_CYRUS_SASL */
+#endif /* HAVE_CYRUS_SASL */
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_authorized: can %s become %s?\n", authcDN, authzDN ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "slap_sasl_authorized: can %s become %s?\n", authcDN, authzDN ));
#else
Debug( LDAP_DEBUG_TRACE,
"==>slap_sasl_authorized: can %s become %s?\n", authcDN, authzDN, 0 );
DONE:
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_authorized: return %s\n", rc ));
+ LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ "slap_sasl_authorized: return %s\n", rc ));
#else
Debug( LDAP_DEBUG_TRACE, "<== slap_sasl_authorized: return %d\n",rc,0,0 );
#endif
/* find the object class attribute - could error out here */
if ( (aoc = attr_find( e->e_attrs, ad_objectClass )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_INFO,
- "entry_schema_check: No objectClass for entry (%s).\n", e->e_dn ));
+ LDAP_LOG(( "schema", LDAP_LEVEL_INFO,
+ "entry_schema_check: No objectClass for entry (%s).\n", e->e_dn ));
#else
Debug( LDAP_DEBUG_ANY, "No objectClass for entry (%s)\n",
e->e_dn, 0, 0 );
for ( i = 0; aoc->a_vals[i] != NULL; i++ ) {
if ( (oc = oc_find( aoc->a_vals[i]->bv_val )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_INFO,
- "entry_schema_check: dn (%s), objectClass \"%s\" not recognized\n",
- e->e_dn, aoc->a_vals[i]->bv_val ));
+ LDAP_LOG(( "schema", LDAP_LEVEL_INFO,
+ "entry_schema_check: dn (%s), objectClass \"%s\" not recognized\n",
+ e->e_dn, aoc->a_vals[i]->bv_val ));
#else
Debug( LDAP_DEBUG_ANY,
"entry_check_schema(%s): objectClass \"%s\" not recognized\n",
if (s != NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_INFO,
- "entry_schema_check: dn (%s) oc \"%s\" requires att \"%s\"\n",
- e->e_dn, aoc->a_vals[i]->bv_val, s ));
+ LDAP_LOG(( "schema", LDAP_LEVEL_INFO,
+ "entry_schema_check: dn (%s) oc \"%s\" requires att \"%s\"\n",
+ e->e_dn, aoc->a_vals[i]->bv_val, s ));
#else
Debug( LDAP_DEBUG_ANY,
"Entry (%s), oc \"%s\" requires attr \"%s\"\n",
if ( ret != 0 ) {
char *type = a->a_desc->ad_cname->bv_val;
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_INFO,
- "entry_schema_check: Entry (%s) attr \"%s\" not allowed.\n",
- e->e_dn, type ));
+ LDAP_LOG(( "schema", LDAP_LEVEL_INFO,
+ "entry_schema_check: Entry (%s) attr \"%s\" not allowed.\n",
+ e->e_dn, type ));
#else
Debug( LDAP_DEBUG_ANY,
"Entry (%s), attr \"%s\" not allowed\n",
Attribute *a;
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "oc_check_required: dn (%s), objectClass \"%s\"\n",
- e->e_dn, ocname->bv_val ));
+ LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
+ "oc_check_required: dn (%s), objectClass \"%s\"\n",
+ e->e_dn, ocname->bv_val ));
#else
Debug( LDAP_DEBUG_TRACE,
"oc_check_required entry (%s), objectClass \"%s\"\n",
int i, j;
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "oc_check_allowed: type \"%s\"\n", at->sat_cname ));
+ LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
+ "oc_check_allowed: type \"%s\"\n", at->sat_cname ));
#else
Debug( LDAP_DEBUG_TRACE,
"oc_check_allowed type \"%s\"\n",
/* approx matching rules */
#define directoryStringApproxMatchOID "1.3.6.1.4.1.4203.666.4.4"
-#define directoryStringApproxMatch approxMatch
-#define directoryStringApproxIndexer approxIndexer
-#define directoryStringApproxFilter approxFilter
+#define directoryStringApproxMatch approxMatch
+#define directoryStringApproxIndexer approxIndexer
+#define directoryStringApproxFilter approxFilter
#define IA5StringApproxMatchOID "1.3.6.1.4.1.4203.666.4.5"
-#define IA5StringApproxMatch approxMatch
+#define IA5StringApproxMatch approxMatch
#define IA5StringApproxIndexer approxIndexer
-#define IA5StringApproxFilter approxFilter
+#define IA5StringApproxFilter approxFilter
/* orderring matching rules */
#define caseIgnoreOrderingMatch caseIgnoreMatch
size_t slen, mlen;
struct berval **keys;
HASH_CONTEXT HASHcontext;
- unsigned char HASHdigest[HASH_BYTES];
+ unsigned char HASHdigest[HASH_BYTES];
struct berval digest;
digest.bv_val = HASHdigest;
digest.bv_len = sizeof(HASHdigest);
size_t slen, mlen;
struct berval **keys;
HASH_CONTEXT HASHcontext;
- unsigned char HASHdigest[HASH_BYTES];
+ unsigned char HASHdigest[HASH_BYTES];
struct berval *value = (struct berval *) assertValue;
struct berval digest;
digest.bv_val = HASHdigest;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "dnMatch: %d\n %s\n %s\n", match,
- value->bv_val, asserted->bv_val ));
+ LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
+ "dnMatch: %d\n %s\n %s\n", match,
+ value->bv_val, asserted->bv_val ));
#else
Debug( LDAP_DEBUG_ARGS, "dnMatch %d\n\t\"%s\"\n\t\"%s\"\n",
match, value->bv_val, asserted->bv_val );
/* Get a phonetic copy of each word */
words = (char **)ch_malloc( count * sizeof(char *) );
values = (char **)ch_malloc( count * sizeof(char *) );
- for( c=val,i=0; i<count; i++,c+=strlen(c)+1 ) {
+ for( c=val,i=0; i<count; i++,c+=strlen(c)+1 ) {
words[i] = c;
values[i] = phonetic(c);
}
/* Isolate how many words there are. There will be a key for each */
val = ch_strdup( values[j]->bv_val );
- for( wordcount=0,c=val; *c; c++) {
+ for( wordcount=0,c=val; *c; c++) {
len = strcspn(c, SLAPD_APPROX_DELIMITER);
if( len >= SLAPD_APPROX_WORDLEN ) wordcount++;
c+= len;
keys = newkeys;
/* Get a phonetic copy of each word */
- for( c=val,i=0; i<wordcount; c+=len+1 ) {
+ for( c=val,i=0; i<wordcount; c+=len+1 ) {
len = strlen( c );
if( len < SLAPD_APPROX_WORDLEN ) continue;
keys[keycount] = (struct berval *)ch_malloc( sizeof(struct berval) );
keys = (struct berval **)ch_malloc( (count + 1) * sizeof(struct berval *) );
/* Get a phonetic copy of each word */
- for( c=val,i=0; i<count; c+=len+1 ) {
+ for( c=val,i=0; i<count; c+=len+1 ) {
len = strlen(c);
if( len < SLAPD_APPROX_WORDLEN ) continue;
keys[i] = (struct berval *)ch_malloc( sizeof(struct berval) );
size_t slen, mlen;
struct berval **keys;
HASH_CONTEXT HASHcontext;
- unsigned char HASHdigest[HASH_BYTES];
+ unsigned char HASHdigest[HASH_BYTES];
struct berval digest;
digest.bv_val = HASHdigest;
digest.bv_len = sizeof(HASHdigest);
size_t slen, mlen;
struct berval **keys;
HASH_CONTEXT HASHcontext;
- unsigned char HASHdigest[HASH_BYTES];
+ unsigned char HASHdigest[HASH_BYTES];
struct berval *value;
struct berval digest;
digest.bv_val = HASHdigest;
size_t slen, mlen;
struct berval **keys;
HASH_CONTEXT HASHcontext;
- unsigned char HASHdigest[HASH_BYTES];
+ unsigned char HASHdigest[HASH_BYTES];
struct berval digest;
digest.bv_val = HASHdigest;
digest.bv_len = sizeof(HASHdigest);
size_t slen, mlen, klen;
struct berval **keys;
HASH_CONTEXT HASHcontext;
- unsigned char HASHdigest[HASH_BYTES];
+ unsigned char HASHdigest[HASH_BYTES];
struct berval *value;
struct berval digest;
size_t slen, mlen;
struct berval **keys;
HASH_CONTEXT HASHcontext;
- unsigned char HASHdigest[HASH_BYTES];
+ unsigned char HASHdigest[HASH_BYTES];
struct berval digest;
digest.bv_val = HASHdigest;
digest.bv_len = sizeof(HASHdigest);
size_t slen, mlen;
struct berval **keys;
HASH_CONTEXT HASHcontext;
- unsigned char HASHdigest[HASH_BYTES];
+ unsigned char HASHdigest[HASH_BYTES];
struct berval *value;
struct berval digest;
digest.bv_val = HASHdigest;
size_t slen, mlen;
struct berval **keys;
HASH_CONTEXT HASHcontext;
- unsigned char HASHdigest[HASH_BYTES];
+ unsigned char HASHdigest[HASH_BYTES];
struct berval digest;
digest.bv_val = HASHdigest;
digest.bv_len = sizeof(HASHdigest);
size_t slen, mlen, klen;
struct berval **keys;
HASH_CONTEXT HASHcontext;
- unsigned char HASHdigest[HASH_BYTES];
+ unsigned char HASHdigest[HASH_BYTES];
struct berval *value;
struct berval digest;
size_t slen, mlen;
struct berval **keys;
HASH_CONTEXT HASHcontext;
- unsigned char HASHdigest[HASH_BYTES];
+ unsigned char HASHdigest[HASH_BYTES];
struct berval digest;
digest.bv_val = HASHdigest;
digest.bv_len = sizeof(HASHdigest);
size_t slen, mlen;
struct berval **keys;
HASH_CONTEXT HASHcontext;
- unsigned char HASHdigest[HASH_BYTES];
+ unsigned char HASHdigest[HASH_BYTES];
struct berval *value;
struct berval digest;
digest.bv_val = HASHdigest;
size_t slen, mlen;
struct berval **keys;
HASH_CONTEXT HASHcontext;
- unsigned char HASHdigest[HASH_BYTES];
+ unsigned char HASHdigest[HASH_BYTES];
struct berval digest;
digest.bv_val = HASHdigest;
digest.bv_len = sizeof(HASHdigest);
size_t slen, mlen, klen;
struct berval **keys;
HASH_CONTEXT HASHcontext;
- unsigned char HASHdigest[HASH_BYTES];
+ unsigned char HASHdigest[HASH_BYTES];
struct berval *value;
struct berval digest;
size_t slen, mlen;
struct berval **keys;
HASH_CONTEXT HASHcontext;
- unsigned char HASHdigest[HASH_BYTES];
+ unsigned char HASHdigest[HASH_BYTES];
struct berval digest;
digest.bv_val = HASHdigest;
digest.bv_len = sizeof(HASHdigest);
size_t slen, mlen;
struct berval **keys;
HASH_CONTEXT HASHcontext;
- unsigned char HASHdigest[HASH_BYTES];
+ unsigned char HASHdigest[HASH_BYTES];
struct berval *value;
struct berval digest;
digest.bv_val = HASHdigest;
size_t slen, mlen;
struct berval **keys;
HASH_CONTEXT HASHcontext;
- unsigned char HASHdigest[HASH_BYTES];
+ unsigned char HASHdigest[HASH_BYTES];
struct berval digest;
digest.bv_val = HASHdigest;
digest.bv_len = sizeof(HASHdigest);
size_t slen, mlen, klen;
struct berval **keys;
HASH_CONTEXT HASHcontext;
- unsigned char HASHdigest[HASH_BYTES];
+ unsigned char HASHdigest[HASH_BYTES];
struct berval *value;
struct berval digest;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "objectIdentifierFirstComponentMatch: %d\n %s\n %s\n",
- match, value->bv_val, asserted->bv_val ));
+ LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
+ "objectIdentifierFirstComponentMatch: %d\n %s\n %s\n",
+ match, value->bv_val, asserted->bv_val ));
#else
Debug( LDAP_DEBUG_ARGS, "objectIdentifierFirstComponentMatch "
"%d\n\t\"%s\"\n\t\"%s\"\n",
}
switch ( tzoffset ) {
- case -1: /* negativ offset to UTC, ie west of Greenwich */
+ case -1: /* negativ offset to UTC, ie west of Greenwich */
parts[4] += parts[7];
parts[5] += parts[8];
for (part = 6; --part > 0; ) { /* offset is just hhmm, no seconds */
#if 0
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "objectClassMatch(%s, %s) = %d\n",
- value->bv_val, a->bv_val, *matchp ));
+ LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
+ "objectClassMatch(%s, %s) = %d\n",
+ value->bv_val, a->bv_val, *matchp ));
#else
Debug( LDAP_DEBUG_TRACE, "objectClassMatch(%s,%s) = %d\n",
value->bv_val, a->bv_val, *matchp );
#if 0
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "structuralObjectClassMatch( %s, %s ) = %d\n",
- value->bv_val, a->bv_val, *matchp ));
+ LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
+ "structuralObjectClassMatch( %s, %s ) = %d\n",
+ value->bv_val, a->bv_val, *matchp ));
#else
Debug( LDAP_DEBUG_TRACE, "structuralObjectClassMatch(%s,%s) = %d\n",
value->bv_val, a->bv_val, *matchp );
int
do_search(
- Connection *conn, /* where to send results */
+ Connection *conn, /* where to send results */
Operation *op /* info about the op to which we're responding */
) {
int i;
int manageDSAit;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "do_search: conn %d\n", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "do_search: conn %d\n", conn->c_connid ));
#else
Debug( LDAP_DEBUG_TRACE, "do_search\n", 0, 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_search \"%s\" %d %d %d %d %d\n", base, scope,
- deref, sizelimit, timelimit, attrsonly ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
+ "do_search \"%s\" %d %d %d %d %d\n", base, scope,
+ deref, sizelimit, timelimit, attrsonly ));
#else
Debug( LDAP_DEBUG_ARGS, "SRCH \"%s\" %d %d", base, scope, deref );
Debug( LDAP_DEBUG_ARGS, " %d %d %d\n", sizelimit, timelimit,
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_search: conn %d filter: %s\n", conn->c_connid, fstr ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
+ "do_search: conn %d filter: %s\n", conn->c_connid, fstr ));
#else
Debug( LDAP_DEBUG_ARGS, " filter: %s\n", fstr, 0, 0 );
#endif
if( (rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_search: conn %d get_ctrls failed (%d)\n",
- conn->c_connid, rc ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "do_search: conn %d get_ctrls failed (%d)\n",
+ conn->c_connid, rc ));
#else
Debug( LDAP_DEBUG_ANY, "do_search: get_ctrls failed\n", 0, 0, 0 );
#endif
rc = 0;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_search: conn %d attrs:", conn->c_connid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
+ "do_search: conn %d attrs:", conn->c_connid ));
#else
Debug( LDAP_DEBUG_ARGS, " attrs:", 0, 0, 0 );
#endif
if ( attrs != NULL ) {
for ( i = 0; attrs[i] != NULL; i++ ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_search: %s", attrs[i] ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
+ "do_search: %s", attrs[i] ));
#else
Debug( LDAP_DEBUG_ARGS, " %s", attrs[i], 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS, "\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ARGS, "\n" ));
#else
Debug( LDAP_DEBUG_ARGS, "\n", 0, 0, 0 );
#endif
char *end, *freeme;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "str2filter: \"%s\"\n", str ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
+ "str2filter: \"%s\"\n", str ));
#else
Debug( LDAP_DEBUG_FILTER, "str2filter \"%s\"\n", str, 0, 0 );
#endif
switch ( *str ) {
case '&':
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "str2filter: AND\n" ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "str2filter: AND\n" ));
#else
Debug( LDAP_DEBUG_FILTER, "str2filter: AND\n",
0, 0, 0 );
case '|':
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "str2filter: OR\n" ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "str2filter: OR\n" ));
#else
Debug( LDAP_DEBUG_FILTER, "put_filter: OR\n",
0, 0, 0 );
case '!':
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "str2filter: NOT\n" ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "str2filter: NOT\n" ));
#else
Debug( LDAP_DEBUG_FILTER, "put_filter: NOT\n",
0, 0, 0 );
default:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "str2filter: simple\n" ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "str2filter: simple\n" ));
#else
Debug( LDAP_DEBUG_FILTER, "str2filter: simple\n",
0, 0, 0 );
default: /* assume it's a simple type=value filter */
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "str2filter: default\n" ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "str2filter: default\n" ));
#else
Debug( LDAP_DEBUG_FILTER, "str2filter: default\n", 0, 0,
0 );
char save;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "str2list: \"%s\"\n", str ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
+ "str2list: \"%s\"\n", str ));
#else
Debug( LDAP_DEBUG_FILTER, "str2list \"%s\"\n", str, 0, 0 );
#endif
const char *text;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "str2simple: \"%s\"\n", str ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
+ "str2simple: \"%s\"\n", str ));
#else
Debug( LDAP_DEBUG_FILTER, "str2simple \"%s\"\n", str, 0, 0 );
#endif
int gotstar;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "str2subvals: \"%s\"\n", in ));
+ LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
+ "str2subvals: \"%s\"\n", in ));
#else
Debug( LDAP_DEBUG_FILTER, "str2subvals \"%s\"\n", in, 0, 0 );
#endif
Backend *be,
char *dn )
{
- int i, dnLength;
+ int i, dnLength;
if(dn == NULL) return NULL;
if(be == NULL) return dn;
strncpy( dn, oldDN, diff );
strcpy( &dn[diff], be->be_suffixAlias[i+1] );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "suffix_alias: converted \"%s\" to \"%s\"\n",
- oldDN, dn ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "suffix_alias: converted \"%s\" to \"%s\"\n",
+ oldDN, dn ));
#else
Debug( LDAP_DEBUG_ARGS,
"suffix_alias: converted \"%s\" to \"%s\"\n",
static int
syn_index_name_cmp(
- char *name,
+ char *name,
struct sindexrec *sir
)
{
struct sindexrec *sir = NULL;
if ( (sir = (struct sindexrec *) avl_find( syn_index, synname,
- (AVL_CMP) syn_index_name_cmp )) != NULL ) {
+ (AVL_CMP) syn_index_name_cmp )) != NULL ) {
return( sir->sir_syn );
}
return( NULL );
syn = ldap_str2syntax( desc, &code, &err, LDAP_SCHEMA_ALLOW_ALL);
if ( !syn ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ERR,
- "register_syntax: Error - %s before %s in %s.\n",
- ldap_scherr2str(code), err, desc ));
+ LDAP_LOG(( "schema", LDAP_LEVEL_ERR,
+ "register_syntax: Error - %s before %s in %s.\n",
+ ldap_scherr2str(code), err, desc ));
#else
Debug( LDAP_DEBUG_ANY, "Error in register_syntax: %s before %s in %s\n",
ldap_scherr2str(code), err, desc );
if ( code ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ERR,
- "register_syntax: Error - %s %s in %s\n",
- scherr2str(code), err, desc ));
+ LDAP_LOG(( "schema", LDAP_LEVEL_ERR,
+ "register_syntax: Error - %s %s in %s\n",
+ scherr2str(code), err, desc ));
#else
Debug( LDAP_DEBUG_ANY, "Error in register_syntax: %s %s in %s\n",
scherr2str(code), err, desc );
val.bv_len = strlen( val.bv_val );
#if 0
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "syn_schema_info: Merging syn [%ld] %s\n",
- (long)val.bv_len, val.bv_val ));
+ LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
+ "syn_schema_info: Merging syn [%ld] %s\n",
+ (long)val.bv_len, val.bv_val ));
#else
Debug( LDAP_DEBUG_TRACE, "Merging syn [%ld] %s\n",
(long) val.bv_len, val.bv_val, 0 );
)
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "do_unbind: conn %d\n", conn ? conn->c_connid : -1 ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ "do_unbind: conn %d\n", conn ? conn->c_connid : -1 ));
#else
Debug( LDAP_DEBUG_TRACE, "do_unbind\n", 0, 0, 0 );
#endif
{
uid_t uid;
gid_t gid;
- int got_uid = 0, got_gid = 0;
+ int got_uid = 0, got_gid = 0;
if ( user ) {
struct passwd *pwd;
did_getpw:
if ( pwd == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "slap_init_user: No passwd entry for user %s\n",
- user ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "slap_init_user: No passwd entry for user %s\n",
+ user ));
#else
Debug( LDAP_DEBUG_ANY, "No passwd entry for user %s\n",
user, 0, 0 );
did_group:
if ( grp == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "slap_init_user: No group entry for group %s\n", group));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "slap_init_user: No group entry for group %s\n", group));
#else
Debug( LDAP_DEBUG_ANY, "No group entry for group %s\n",
group, 0, 0 );
if ( user ) {
if ( getuid() == 0 && initgroups( user, gid ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "slap_init_user: Could not set the group access (gid) list.\n" ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "slap_init_user: Could not set the group access (gid) list.\n" ));
#else
Debug( LDAP_DEBUG_ANY,
"Could not set the group access (gid) list\n", 0, 0, 0 );
if ( got_gid ) {
if ( setgid( gid ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "slap_init_user: could not set real group id to %d\n", (int)gid));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "slap_init_user: could not set real group id to %d\n", (int)gid));
#else
Debug( LDAP_DEBUG_ANY, "Could not set real group id to %d\n",
(int) gid, 0, 0 );
#ifdef HAVE_SETEGID
if ( setegid( gid ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "slap_init_user: Could not set effective group id to %d\n",(int)gid));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "slap_init_user: Could not set effective group id to %d\n",(int)gid));
#else
Debug( LDAP_DEBUG_ANY, "Could not set effective group id to %d\n",
(int) gid, 0, 0 );
if ( got_uid ) {
if ( setuid( uid ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "slap_init_user: Could not set real user id to %d\n", (int)uid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "slap_init_user: Could not set real user id to %d\n", (int)uid ));
#else
Debug( LDAP_DEBUG_ANY, "Could not set real user id to %d\n",
(int) uid, 0, 0 );
#ifdef HAVE_SETEUID
if ( seteuid( uid ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "slap_init_user: Could not set effective user id to %d\n", (int)uid ));
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "slap_init_user: Could not set effective user id to %d\n", (int)uid ));
#else
Debug( LDAP_DEBUG_ANY, "Could not set effective user id to %d\n",
(int) uid, 0, 0 );