Sorry, last patch was wrong; it always printed dn "". I didn't notice that e->e_dn always is NULL at that point. Here is a patch to the patch: http://folk.uio.no/hbf/OpenLDAP/entry-pdn-2.txt -- Hallvard