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

OpenLDAP 2.4.32 back_sql Oracle 10 - error executing at_query (?)



Hi.

I'm having trouble against an Oracle 10 database using:
- Solaris 10 Sparc
- OpenLDAP 2.4.32
- unixODBC 2.2.14
- Oracle Instant Client 10.2.0.5.0

I get this errors:

50ae749e backsql_oc_get_attr_mapping(): error executing at_query
    "SELECT
name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_r
eturn,sel_expr_u FROM ldap_attr_mappings WHERE oc_map_id=?"
    for objectClass "inetOrgPerson"
    with param oc_id=1
50ae749e Return code: -1
50ae749e <==backsql_load_schema_map()
50ae749e backsql_db_open(): schema mapping failed, exiting
50ae749e backend_startup_one (type=sql,
suffix="app=contentfilter,ou=app,ou=vodafone-pt,c=pt,o=vodafone"):
bi_db_open failed! (1)

when I use this configuration file:

bash-3.2# cat ldap.conf
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include         /usr/local/etc/openldap/schema/core.schema
include         /usr/local/etc/openldap/schema/cosine.schema
include         /usr/local/etc/openldap/conf/inetorgperson.schema

pidfile         /app/users/ldap/slapd.pid
argsfile        /app/users/ldap/slapd.args
idletimeout     0
threads         32
timelimit       5

modulepath      /opt/csw/libexec/openldap
moduleload      back_sql.la

#######################################################################
# sql database definitions
#######################################################################

database        sql
suffix      "app=contentfilter,ou=app,ou=vodafone-pt,c=pt,o=vodafone"
rootdn
"vfsid=root,app=contentfilter,ou=app,ou=vodafone-pt,c=pt,o=vodafone"
rootpw          cu906B2H04cNE
#dbname          ORACLE10_FREE
dbname          ORACLE10
dbuser          EREXTENSION
dbpasswd        ERSINPRD
subtree_cond    "UPPER(ldap_entries.dn) LIKE CONCAT('%',UPPER(?))"
insentry_stmt   "INSERT INTO ldap_entries (id,dn,oc_map_id,parent,keyval)
VALUES (ldap_entry_ids.nextval,?,?,?,?)"
upper_func      UPPER
has_ldapinfo_dn_ru      no

readonly on
access to *
        by
dn="vfsid=root,app=contentfilter,ou=app,ou=vodafone-pt,c=pt,o=vodafone" read
        by users read
        by * auth


So I added this line to ldap.conf (oc_map_id=1  instead of  oc_map_id=?) and
this way I'm able to start LDAP:
       at_query "SELECT
name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_r
eturn,sel_expr_u FROM ldap_attr_mappings WHERE oc_map_id=1"


But then I get other issues related to the character "?" for example I'm
unable to get results from the database if I use that character:

50afc6d1 backsql_get_attr_vals(): error executing attribute count query
'SELECT COUNT(*) FROM accounts,customer_attributes_values_t WHERE
accounts.id=? AND customer_attributes_values_t.account_id=accounts.id and
customer_attributes_values_t.attribute_id = 83'
50afc6d1 Return code: -1

50afc6d1 backsql_get_attr_vals(): error executing attribute count query
'SELECT COUNT(*) FROM ldap_entry_objclasses,ldap_entries,accounts WHERE
accounts.id=? AND ldap_entries.id=ldap_entry_objclasses.entry_id AND
ldap_entries.keyval=accounts.id and ldap_entries.oc_map_id=1'
50afc6d1 Return code: -1


Strange thing is that I have other machine which I'm migrating that works
fine against same Oracle database but it uses:
- Solaris 9
- OpenLDAP 2.3.24
- unixODBC 2.2.12
- Oracle Instant Client 10.2.0.3.0

I may try to downgrade to the "working" versions of unixODBC and Oracle
Instant Client but I prefer to keep the ones I installed in the new machine.
Same thing regarding OpenLdap version.
Anyway I would like to understand the issue I'm facing instead of changing
versions of software.
Does someone know (and understand) what's going on with this?

Thanks,
Nuno Barros

Attachment: smime.p7s
Description: S/MIME cryptographic signature