Problems adding items to database

Russell Fulton (r.fulton@auckland.ac.nz)
Mon, 1 Jul 1996 16:45:19 +1200 (NZT)

Greetings All,

I have been busy the last few days reworking Gerhard Stoizner's
ldap.pl code to be a 'proper perl 5 module'. I have also implemented
add and delete functions.

The module works at the socket level producing BER encoded byte stream
for the server and unscrambling the results that come back. It is
fairly simple minded at the moment but will be adequate for the
project I have in mind.

Long term I think that it would be best to define a single module
interface and have both a wholly perl module (which may be somewhat
limited) and another module that uses the C library which will reflect
the full functionality of the library.

Anyway to my immediate problem:

As I mentioned above I have added an Add function to the package. This
appears to work fine (the server returns 'success' and the server logs
don't record anything untoward, however when I look in the database
for the item just added (with a filter of 'objectclass=*') I can not
find it. But I *can* delete it.

I am sure I am (yet again) missing smething basic.

Would someone who is familiar with BER and Ldap protocol please have a
look at the add request below and see if they can spot what's wrong?

The add request is equivalent to the followinf ldif

dn: cn=xxxx zzzz, o=The University of Auckland, c=nz
cn: xxxx zzzz
sn: zzzz
objectclass: person

Addrequest

> 0000 30790201 02687404 30636e3d 78787878 0y...ht.0cn=xxxx
> 0010 207a7a7a 7a2c206f 3d546865 20556e69 zzzz, o=The Uni
> 0020 76657273 69747920 6f662041 75636b6c versity of Auckl
> 0030 616e642c 20633d6e 7a304030 13040263 and, c=nz0@0...c
> 0040 6e310b04 0b040978 78787820 7a7a7a7a n1.....xxxx zzzz
> 0050 300e0402 736e3106 04060404 7a7a7a7a 0...sn1.....zzzz
> 0060 3019040b 6f626a65 6374636c 61737331 0...objectclass1
> 0070 08040804 06706572 736f6e .....person

Addresult

< 0000 300c 0.
< 0000 02010269 070a0100 04000400 ...i........
Add SUCCESS

Searchrequest

> 0000 30550201 03635004 226f3d54 68652055 0U...cP."o=The U
> 0010 6e697665 72736974 79206f66 20417563 niversity of Auc
> 0020 6b6c616e 642c2063 3d6e7a0a 01020a01 kland, c=nz.....
> 0030 02020100 02010001 0100a315 040b6f62 ..............ob
> 0040 6a656374 636c6173 73040670 6572736f jectclass..perso
> 0050 6e300404 02636e n0...cn

SearchResult (No Searchresponses)

< 0000 300c 0.
< 0000 02010365 070a0100 04000400 ...e........
Search SUCCESS

Hmmm... NEXTID is incremented each time the add is tried.
I have checked (by hand, as well as I can) that the BER encoding is
correct and I am at a loss as to what to check next.

Cheers and Thanks,

+-------------------------------------------------------------------+
| Russell Fulton 'phone +64 9 373-7599 x 8955 |
| ITSS fax +64 9 373-7425 |
| University of Auckland email r.fulton@auckland.ac.nz |
| Private Bag 92019 time gmt -12 (-13 oct - mar) |
| Auckland, New Zealand. |
+-------------------------------------------------------------------+