Commit 956863ff authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Make other backends (excepting BDB2) compile.

Integration of BDB2 changes will be deferred until after
LDBM work is completed.
parent 3a5c1da4
......@@ -76,7 +76,7 @@ ldap_back_getconn(struct ldapinfo *li, Connection *conn, Operation *op)
ld = ldap_init(li->host, li->port);
if (!ld) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
NULL, "ldap_init failed", NULL );
NULL, "ldap_init failed", NULL, NULL );
return( NULL );
}
lc = (struct ldapconn *)ch_malloc(sizeof(struct ldapconn));
......@@ -112,7 +112,7 @@ ldap_back_op_result(struct ldapconn *lc, Operation *op)
ldap_get_option(lc->ld, LDAP_OPT_ERROR_NUMBER, &err);
ldap_get_option(lc->ld, LDAP_OPT_ERROR_STRING, &msg);
ldap_get_option(lc->ld, LDAP_OPT_MATCHED_DN, &match);
send_ldap_result( lc->conn, op, err, match, msg, NULL );
send_ldap_result( lc->conn, op, err, match, msg, NULL, NULL );
free(match);
free(msg);
return( (err==LDAP_SUCCESS) ? 0 : -1 );
......
......@@ -116,7 +116,8 @@ fail: return( ldap_back_op_result(lc, op) );
if (rc == -1)
goto fail;
send_search_result( conn, op, sres, match, err, NULL, i );
send_search_result( conn, op, sres,
match, err, NULL, NULL, i );
if (match)
free(match);
if (err)
......@@ -158,7 +159,7 @@ ldap_send_entry(
if (!attr->a_vals)
attr->a_vals = &dummy;
}
send_search_entry( be, lc->conn, op, &ent, attrs, attrsonly, 0 );
send_search_entry( be, lc->conn, op, &ent, attrs, attrsonly, NULL, 0 );
for (;ent.e_attrs;) {
attr=ent.e_attrs;
ent.e_attrs = attr->a_next;
......
......@@ -102,7 +102,8 @@ passwd_back_search(
attr_merge( e, "objectClass", vals );
if ( test_filter( be, conn, op, e, filter ) == 0 ) {
send_search_entry( be, conn, op, e, attrs, attrsonly, 0 );
send_search_entry( be, conn, op,
e, attrs, attrsonly, NULL, 0 );
matched = strdup( be->be_suffix[0] );
sent++;
}
......@@ -123,7 +124,7 @@ passwd_back_search(
/* check time limit */
if ( slap_get_time() > stoptime ) {
send_ldap_result( conn, op, LDAP_TIMELIMIT_EXCEEDED,
NULL, NULL, NULL );
NULL, NULL, NULL, NULL );
endpwent();
return( 0 );
}
......@@ -134,12 +135,13 @@ passwd_back_search(
/* check size limit */
if ( --slimit == -1 ) {
send_ldap_result( conn, op, LDAP_SIZELIMIT_EXCEEDED,
NULL, NULL, NULL );
NULL, NULL, NULL, NULL );
endpwent();
return( 0 );
}
send_search_entry( be, conn, op, e, attrs, attrsonly, 0 );
send_search_entry( be, conn, op,
e, attrs, attrsonly, NULL, 0 );
sent++;
}
......@@ -176,7 +178,8 @@ passwd_back_search(
e = pw2entry( be, pw, rdn );
if ( test_filter( be, conn, op, e, filter ) == 0 ) {
send_search_entry( be, conn, op, e, attrs, attrsonly, 0 );
send_search_entry( be, conn, op,
e, attrs, attrsonly, NULL, 0 );
sent++;
}
......@@ -185,10 +188,12 @@ passwd_back_search(
done:
if( sent ) {
send_ldap_result( conn, op, LDAP_SUCCESS, NULL, NULL, NULL );
send_ldap_result( conn, op, LDAP_SUCCESS,
NULL, NULL, NULL, NULL );
} else {
send_ldap_result( conn, op, err, matched, NULL, NULL);
send_ldap_result( conn, op, err,
matched, NULL, NULL, NULL );
}
if( matched != NULL ) free( matched );
......
......@@ -61,10 +61,12 @@ perl_back_add(
ldap_pvt_thread_mutex_unlock( &perl_interpreter_mutex );
if( return_code != 0 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, NULL, NULL );
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
NULL, NULL, NULL, NULL );
} else {
send_ldap_result( conn, op, LDAP_SUCCESS, NULL, NULL, NULL );
send_ldap_result( conn, op, LDAP_SUCCESS,
NULL, NULL, NULL, NULL );
}
Debug( LDAP_DEBUG_ANY, "Here ADD\n", 0, 0, 0 );
......
......@@ -40,7 +40,7 @@ perl_back_compare(
PerlBackend *perl_back = (PerlBackend *)be->be_private;
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
NULL, "not yet implemented", NULL );
NULL, "not yet implemented", NULL, NULL );
#ifdef notdef
ldap_pvt_thread_mutex_lock( &perl_interpreter_mutex );
......
......@@ -60,10 +60,12 @@ perl_back_delete(
ldap_pvt_thread_mutex_unlock( &perl_interpreter_mutex );
if( return_code != 0 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, NULL, NULL );
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
NULL, NULL, NULL, NULL );
} else {
send_ldap_result( conn, op, LDAP_SUCCESS, NULL, NULL, NULL );
send_ldap_result( conn, op, LDAP_SUCCESS,
NULL, NULL, NULL, NULL );
}
Debug( LDAP_DEBUG_ANY, "Here DELETE\n", 0, 0, 0 );
......
......@@ -93,10 +93,12 @@ perl_back_modify(
ldap_pvt_thread_mutex_unlock( &perl_interpreter_mutex );
if( return_code != 0 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, NULL, NULL );
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
NULL, NULL, NULL, NULL );
} else {
send_ldap_result( conn, op, LDAP_SUCCESS, NULL, NULL, NULL );
send_ldap_result( conn, op, LDAP_SUCCESS,
NULL, NULL, NULL, NULL );
}
Debug( LDAP_DEBUG_ANY, "Perl MODIFY\n", 0, 0, 0 );
......
......@@ -81,10 +81,12 @@ perl_back_modrdn(
ldap_pvt_thread_mutex_unlock( &perl_interpreter_mutex );
if( return_code != 0 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, NULL, NULL );
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
NULL, NULL, NULL, NULL );
} else {
send_ldap_result( conn, op, LDAP_SUCCESS, NULL, NULL, NULL );
send_ldap_result( conn, op, LDAP_SUCCESS,
NULL, NULL, NULL, NULL );
}
Debug( LDAP_DEBUG_ANY, "Perl MODRDN\n", 0, 0, 0 );
......
......@@ -86,13 +86,8 @@ perl_back_search(
Debug( LDAP_DEBUG_ANY, "str2entry(%s) failed\n", buf, 0, 0 );
} else {
send_search_entry( be,
conn,
op,
e,
attrs,
attrsonly,
0 );
send_search_entry( be, conn, op,
e, attrs, attrsonly, NULL, 0 );
entry_free( e );
}
......@@ -118,10 +113,12 @@ perl_back_search(
ldap_pvt_thread_mutex_unlock( &perl_interpreter_mutex );
if( return_code != 0 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, NULL, NULL );
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
NULL, NULL, NULL, NULL );
} else {
send_ldap_result( conn, op, LDAP_SUCCESS, NULL, NULL, NULL );
send_ldap_result( conn, op, LDAP_SUCCESS,
NULL, NULL, NULL, NULL );
}
}
......@@ -24,13 +24,13 @@ shell_back_add(
if ( si->si_add == NULL ) {
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
"add not implemented", NULL );
"add not implemented", NULL, NULL );
return( -1 );
}
if ( (op->o_private = (void *) forkandexec( si->si_add, &rfp, &wfp )) == (void *) -1 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
"could not fork/exec", NULL );
"could not fork/exec", NULL, NULL );
return( -1 );
}
......
......@@ -30,14 +30,14 @@ shell_back_bind(
if ( si->si_bind == NULL ) {
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
"bind not implemented", NULL );
"bind not implemented", NULL, NULL );
return( -1 );
}
if ( (op->o_private = (void *) forkandexec( si->si_bind, &rfp, &wfp ))
== (void *) -1 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
"could not fork/exec", NULL );
"could not fork/exec", NULL, NULL );
return( -1 );
}
......
......@@ -24,14 +24,14 @@ shell_back_compare(
if ( si->si_compare == NULL ) {
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
"compare not implemented", NULL );
"compare not implemented", NULL, NULL );
return( -1 );
}
if ( (op->o_private = (void *) forkandexec( si->si_compare, &rfp, &wfp ))
== (void *) -1 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
"could not fork/exec", NULL );
"could not fork/exec", NULL, NULL );
return( -1 );
}
......
......@@ -23,14 +23,14 @@ shell_back_delete(
if ( si->si_delete == NULL ) {
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
"delete not implemented", NULL );
"delete not implemented", NULL, NULL );
return( -1 );
}
if ( (op->o_private = (void *) forkandexec( si->si_delete, &rfp, &wfp ))
== (void *) -1 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
"could not fork/exec", NULL );
"could not fork/exec", NULL, NULL );
return( -1 );
}
......
......@@ -25,14 +25,14 @@ shell_back_modify(
if ( si->si_modify == NULL ) {
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
"modify not implemented", NULL );
"modify not implemented", NULL, NULL );
return( -1 );
}
if ( (op->o_private = (void *) forkandexec( si->si_modify, &rfp, &wfp ))
== (void *) -1 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
"could not fork/exec", NULL );
"could not fork/exec", NULL, NULL );
return( -1 );
}
......
......@@ -39,14 +39,14 @@ shell_back_modrdn(
if ( si->si_modrdn == NULL ) {
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
"modrdn not implemented", NULL );
"modrdn not implemented", NULL, NULL );
return( -1 );
}
if ( (op->o_private = (void *) forkandexec( si->si_modrdn, &rfp, &wfp ))
== (void *) -1 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
"could not fork/exec", NULL );
"could not fork/exec", NULL, NULL );
return( -1 );
}
......
......@@ -59,7 +59,7 @@ read_and_send_results(
buf, 0, 0 );
} else {
send_search_entry( be, conn, op, e, attrs,
attrsonly, 0 );
attrsonly, NULL, 0 );
entry_free( e );
}
......@@ -70,7 +70,7 @@ read_and_send_results(
/* otherwise, front end will send this result */
if ( err != 0 || op->o_tag != LDAP_REQ_BIND ) {
send_ldap_result( conn, op, err, matched, info, NULL );
send_ldap_result( conn, op, err, matched, info, NULL, NULL );
}
free( buf );
......
......@@ -34,14 +34,14 @@ shell_back_search(
if ( si->si_search == NULL ) {
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
"search not implemented", NULL );
"search not implemented", NULL, NULL );
return( -1 );
}
if ( (op->o_private = (void *) forkandexec( si->si_search, &rfp, &wfp ))
== (void *) -1 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
"could not fork/exec", NULL );
"could not fork/exec", NULL, NULL );
return( -1 );
}
......
......@@ -22,14 +22,14 @@ shell_back_unbind(
if ( si->si_unbind == NULL ) {
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
"unbind not implemented", NULL );
"unbind not implemented", NULL, NULL );
return 0;
}
if ( (op->o_private = (void *) forkandexec( si->si_unbind, &rfp, &wfp ))
== (void *) -1 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
"could not fork/exec", NULL );
"could not fork/exec", NULL, NULL );
return 0;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment