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

Re: Understanding back_perl SampleLDAP.pm

Hi Hallward, thanks for the answer.

I saw that you made a correction to the comment included in the source.
But forgive me, I continue to not understand.

In the comment you wrote:
# This demo module keeps an in-memory hash {"DN" => "LDIF entry", ...}

How could I populate manually (in the Perl code) those entries?

In this way?
$this { "uid=pippo,dc=ciao,dc=it" => "objectClass: uidObject\nuid: pippo" }

I'm not able to extract my entry....


I tried to use the add operation.
slapd told me that I had to do a bind to do that operation:

[root@Fedora14 overlays]# ldapadd -x  -h -p 389
dn: uid=marco,dc=perl,dc=com
objectClass: top
objectClass: uidObject
uid: marco

adding new entry "uid=marco,dc=perl,dc=com"
ldap_add: Strong(er) authentication required (8)
        additional info: modifications require authentication

So I need to do a bind. Is it correct that bind() function is not documented on "man slapd-perl" ?
I tried to define a bind() function in the SampleLDAP.pm module and it went over that step.

Problem I was having was that the connection(?) was not released... I had my prompt hung waiting...

I started my slapd in debug mode and saw that "operation" seemed to be done...

It was my fault or I found another bug?

Thanks again!

On Fri, Mar 18, 2011 at 2:49 PM, Hallvard B Furuseth <h.b.furuseth@usit.uio.no> wrote:
I wrote:
> $this should be the return value from sub new.  It's a blessed reference
> to a hash table, thus %{$this} (or just %$this) is the hash table.

Oops, I lost the final sentence:

%$this is a {dn: entry} hash, filled in by sub add & co.


Non è forte chi non cade, ma chi cadendo ha la forza di rialzarsi.
                    Jim Morrison