[Date Prev][Date Next] [Chronological] [Thread] [Top]

back-sql problem



I'm trying to use openldap to have an existing database searchable by a
ldap client, so I figured back-sql was the way to go.
My setup is the following:
Debian Linux (glibc2.1.94)
OpenLDAP 2.0.6
Remote Oracle server

OpenLDAP was configured with --enable-sql --enable-debug
The Oracle connectivity is done through unixODBC and the Easysoft Oracle
ODBC driver.

I didn't have any problem at all in the configure/make/make test/make
install part, created the testdb from the provided scripts and modified
the provided slapd.conf to access my database.

When I try to launch slapd (slapd -d 5 -h ldap://localhost), I get the
following (full log at end of message):
[...]
load_schema_map(): autoadding 'objectClass' and 'ref' mappings
ch_calloc of 0 elems of 4 bytes failed
slapd: ch_malloc.c:77: ch_calloc: Assertion `0' failed.

It looks like something somewhere is trying to allocate 0 times 4 bytes
and slapd doesn't appreciate being asked to work for nothing :)
More seriously, I don't really have any idea where this comes from. I know
the Easysoft driver is incomplete and can be a bit buggy, but I'm not even
sure it comes from there (and it's not like there was a lot of choice).

					Mat


Full output of slapd -d 5 -h ldap://localhost:

@(#) $OpenLDAP: slapd 2.0.6-Release (Wed Oct 11 16:12:56 CEST 2000) $
	mat@mat:/usr/local/src/openldap-2.0.6/servers/slapd
daemon_init: ldap://localhost
daemon_init: listen on ldap://localhost
daemon_init: 1 listeners to open...
ldap_url_parse(ldap://localhost)
daemon: initialized ldap://localhost
daemon_init: 1 listeners opened
slapd init: initiated server.
==>backsql_initialize()
<==backsql_initialize()
==>backsql_db_init()
==>backsql_init_db_env()
<==backsql_init_db_env()
<==backsql_db_init()
==>backsql_db_config()
<==backsql_db_config(): dbname=<datasource name>
==>backsql_db_config()
<==backsql_db_config(): dbuser=<login>
==>backsql_db_config()
<==backsql_db_config(): dbpasswd=<password>
==>backsql_db_config()
<==backsql_db_config(): subtree_cond=UPPER(ldap_entries.dn) LIKE CONCAT('%',UPPER(?))
==>backsql_db_config()
<==backsql_db_config(): insentry_query=INSERT INTO ldap_entries (id,dn,oc_map_id,parent,keyval) VALUES (ldap_entry_ids.nextval,?,?,?,?)
==>backsql_db_config()
<==backsql_db_config(): upper_func=UPPER
slapd startup: initiated.
==>backsql_db_open(): testing RDBMS connection
backsql_db_open(): objectclass mapping SQL statement not specified (use oc_query directive in slapd.conf)
backsql_db_open(): setting 'SELECT id,name,keytbl,keycol,create_proc,delete_proc,expect_return FROM ldap_oc_mappings' by default
backsql_db_open(): attribute mapping SQL statement not specified (use at_query directive in slapd.conf)
backsql_db_open(): setting 'SELECT name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return FROM ldap_attr_mappings WHERE oc_map_id=?' by default
backsql_db_open(): entry deletion SQL statement not specified (use delentry_query directive in slapd.conf)
backsql_db_open(): setting 'DELETE FROM ldap_entries WHERE id=?' by default
==>backsql_get_db_conn()
==>backsql_open_db_conn()
backsql_open_db_conn(): connected, adding to tree
<==backsql_open_db_conn()
backsql_get_db_conn(): first call -- reading schema map
==>load_schema_map()
load_schema_map(): objectclass 'person': keytbl='persons' keycol='id' create_proc='{call create_person(?)}' delete_proc='{call delete_person(?)}' expect_return=0; attributes:
load_schema_map(): autoadding 'objectClass' and 'ref' mappings
********'cn'
name='cn',sel_expr='persons.name' from='persons' join_where='',add_proc='{call set_person_name(?,?)}' delete_proc=''
load_schema_map(): preconstructed query 'SELECT persons.name AS cn FROM persons WHERE persons.id=?'
********'telephoneNumber'
name='telephoneNumber',sel_expr='phones.phone' from='persons,phones' join_where='phones.pers_id=persons.id',add_proc='{call add_phone(?,?)}' delete_proc='{call delete_phone(?,?)}'
load_schema_map(): preconstructed query 'SELECT phones.phone AS telephoneNumber FROM persons,phones WHERE persons.id=? AND phones.pers_id=persons.id'
********'sn'
name='sn',sel_expr='persons.name' from='persons' join_where='phones.pers_id=persons.id',add_proc='{call set_person_name(?,?)}' delete_proc='{call delete_phone(?,?)}'
load_schema_map(): preconstructed query 'SELECT persons.name AS sn FROM persons WHERE persons.id=?'
********'documentDN'
name='documentDN',sel_expr='ldap_entries.dn' from='ldap_entries,documents,authors_docs,persons' join_where='ldap_entries.keyval=documents.id AND ldap_entries.oc_map_id=2 AND authors_docs.doc_id=documents.id AND authors_docs.pers_id=persons.id',add_proc='{?=call make_doc_link(?,?)}' delete_proc='{?=call del_doc_link(?,?)}'
load_schema_map(): preconstructed query 'SELECT ldap_entries.dn AS documentDN FROM ldap_entries,documents,authors_docs,persons WHERE persons.id=? AND ldap_entries.keyval=documents.id AND ldap_entries.oc_map_id=2 AND authors_docs.doc_id=documents.id AND authors_docs.pers_id=persons.id'
load_schema_map(): objectclass 'document': keytbl='documents' keycol='id' create_proc='{call create_document(?)}' delete_proc='{call delete_document(?)}' expect_return=0; attributes:
load_schema_map(): autoadding 'objectClass' and 'ref' mappings
ch_calloc of 0 elems of 4 bytes failed
slapd: ch_malloc.c:77: ch_calloc: Assertion `0' failed.