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


Following the instructions of OpenLDAP-POSTGRESQL HOWTO
(http://www.samse.fr/GPL/ldap_pg/HOWTO/index.html) I setup openldap
with a backend SQL.
All it seems to work but if I try to add a new entry with a
telephoneNumber attribute longer than 255 characters I do not obtain
no error from slapd.

ldapadd -D "cn=root,o=sql,c=RU" -w secret -f file.ldif

where file.ldif

dn: cn=User Test_Add_Entry,o=sql,c=RU
objectClass: inetOrgPerson
sn: First Test_Add_Entry user
cn: User Test_Add_Entry

In postgres log i found:
ERROR:  value too long for type character varying(255)
CONTEXT:  SQL function "add_phone" statement 2)
therefore postgres finds the error but slapd seems to ignore it and
seems to insert the entry equally.  However this entry does not come
given back with
ldapsearch -b "o=sql,c=RU" "(objectClass=*)".
I note that if i retry to add the same entry slapd returns:

adding new entry "cn=User Test_Add_Entry,o=sql,c=RU"
ldap_add: Already exists (68)

so this entry was added but ldapsearch don't returns it.
More in detail I noted that when I execute ldapadd spapd inserts a new
row in the
"ldap_entries" table of the database with the dn of the entry to add
but it don't updates phone and persons table. So I understand the
error that slapd returns but I think that its behavior is mistaken. In
fact i think that once the integrity of the data has not been
verified, slapd would have to give back an error and to make rollback
of all the transaction without inserts nothing in the database.
Is there anyone that knows gives an explanation to me of this behavior?
Thanks in advance.