hi, i am trying for some time know to configure a read-only openldap (version 2.1.26) frontend for one of our postgresql servers, but i am completly stuck now :( i am able to fetch the root object (o=foo,c=at) via ldap, but that's all. if i use a database with the testdata provided in rdbms_depend everything works find with ldapsearch. the logfile just says the following: Feb 29 18:34:51 cochrane-ng slapd[9521]: backsql_search(): error in backsql_id2entry() - skipping entry (googling for backsql_id2entry doesn't yield any useful results). the postgresql log doesn't show anything helpful either. some sql queries which all succeed and then a rollback. (there's also a rollback at the end when querying the test data). i've checked everything numerous times now, but i can't find any reason for the problem. the only major differences which i have to the testdata are, that the tables ldap_entry_objclasses and ldap_referrals, which store 1 referal entry in the testdata, are empty and that i don't define the create, update and delete methods because i don't need them. my data currently consists of one root element (which is shown via ldap) and one objectclass which is 1:1 mapped to a table in a database. nothing fancy like joins, etc. e.g. INSERT INTO ldap_attr_mappings (id, oc_map_id, name, sel_expr, from_tbls, join_where, add_proc, delete_proc, param_order, expect_return) VALUES(2, 1, 'uid', 'webhost_service.identification', 'webhost_service', NULL, NULL, NULL, 3, 0); (btw, what's the attribute 'param_order' for. i used 3 as 3 is also used in the testdata, but i wasn't able to find any documentation about it.) any hints what else i can try to track down the problem? i've attached the relevant parts of my sql schema to this message. cu /gst
CREATE TABLE ldap_oc_mappings ( id SERIAL NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL, keytbl VARCHAR(64) NOT NULL, keycol VARCHAR(64) NOT NULL, create_proc VARCHAR(255), delete_proc VARCHAR(255), expect_return INT NOT NULL ); CREATE TABLE ldap_attr_mappings ( id SERIAL NOT NULL PRIMARY KEY, oc_map_id INTEGER NOT NULL REFERENCES ldap_oc_mappings(id), name VARCHAR(255) NOT NULL, sel_expr VARCHAR(255) NOT NULL, sel_expr_u VARCHAR(255), from_tbls VARCHAR(255) NOT NULL, join_where VARCHAR(255), add_proc VARCHAR(255), delete_proc VARCHAR(255), param_order INT NOT NULL, expect_return INT NOT NULL ); CREATE TABLE ldap_entries ( id SERIAL NOT NULL PRIMARY KEY, dn VARCHAR(255) NOT NULL, oc_map_id INTEGER NOT NULL REFERENCES ldap_oc_mappings(id), parent INT NOT NULL, keyval INT NOT NULL, UNIQUE (oc_map_id, keyval), UNIQUE (dn) ); CREATE TABLE ldap_referrals ( entry_id INTEGER NOT NULL REFERENCES ldap_entries(id), url TEXT NOT NULL ); CREATE TABLE ldap_entry_objclasses ( entry_id INTEGER NOT NULL REFERENCES ldap_entries(id), oc_name VARCHAR(64) ); CREATE TABLE ldap_root ( id SERIAL NOT NULL PRIMARY KEY, dc TEXT NOT NULL ); INSERT INTO ldap_root (id, dc) VALUES(1, 'foo'); INSERT INTO ldap_oc_mappings (id, name, keytbl, keycol, create_proc, delete_proc, expect_return) VALUES(1, 'posixAccount', 'webhost_service', 'id', NULL, NULL, 0); INSERT INTO ldap_oc_mappings (id, name, keytbl, keycol, create_proc, delete_proc, expect_return) VALUES(3, 'organization', 'ldap_root', 'id', NULL, NULL, 0); INSERT INTO ldap_attr_mappings (id, oc_map_id, name, sel_expr, from_tbls, join_where, add_proc, delete_proc, param_order, expect_return) VALUES(6, 3, 'o', 'ldap_root.dc', 'ldap_root', NULL, NULL, NULL, 3, 0); INSERT INTO ldap_attr_mappings (id, oc_map_id, name, sel_expr, from_tbls, join_where, add_proc, delete_proc, param_order, expect_return) VALUES(1, 1, 'cn', 'webhost_service.identification', 'webhost_service', NULL, NULL, NULL, 3, 0); INSERT INTO ldap_attr_mappings (id, oc_map_id, name, sel_expr, from_tbls, join_where, add_proc, delete_proc, param_order, expect_return) VALUES(2, 1, 'uid', 'webhost_service.identification', 'webhost_service', NULL, NULL, NULL, 3, 0); INSERT INTO ldap_attr_mappings (id, oc_map_id, name, sel_expr, from_tbls, join_where, add_proc, delete_proc, param_order, expect_return) VALUES(3, 1, 'uidNumber', 'webhost_service.uid', 'webhost_service', NULL, NULL, NULL, 3, 0); INSERT INTO ldap_attr_mappings (id, oc_map_id, name, sel_expr, from_tbls, join_where, add_proc, delete_proc, param_order, expect_return) VALUES(4, 1, 'gidNumber', 'webhost_service.gid', 'webhost_service', NULL, NULL, NULL, 3, 0); INSERT INTO ldap_attr_mappings (id, oc_map_id, name, sel_expr, from_tbls, join_where, add_proc, delete_proc, param_order, expect_return) VALUES(5, 1, 'homeDirectory', 'webhost_service.identification', 'webhost_service', NULL, NULL, NULL, 3, 0); INSERT INTO ldap_entries (id, dn, oc_map_id, parent, keyval) VALUES (1, 'o=foo,c=at', 3, 0, 1); INSERT INTO ldap_entries (id, dn, oc_map_id, parent, keyval) VALUES (2, 'cn=fefe,o=foo,c=at', 1, 1, 14);
Attachment:
signature.asc
Description: This is a digitally signed message part