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

back-perl not working with cn=config



Hi,

I'm unable to set up a back-perl backend directly in cn=config mode. However, if I set it up in slapd.conf mode, and then convert it to cn=config mode, it works fine. It's not convenient, because I have to set all my perl backends up before converting to cn=config.

Here's the ldif file I'm using to set up a back-perl backend in cn=config mode (it's inspired from the files I get by converting slapd.conf into cn=config with slaptest)

# Load dynamic backend modules
dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
olcModulepath: /usr/local/libexec/openldap
olcModuleload: back_perl.la

# Database settings
dn: olcDatabase=perl,cn=config
objectClass: olcDatabaseConfig
objectClass: olcDbPerlConfig
olcDatabase: perl
olcSuffix: dc=mydomain,dc=org
olcAddContentAcl: FALSE
olcLastMod: TRUE
olcMaxDerefDepth: 15
olcReadOnly: FALSE
olcRootDN: cn=Manager,dc=mydomain,dc=org
olcRootPW:: c2VjcmV0
olcSyncUseSubentry: FALSE
olcMonitoring: FALSE
olcPerlModulePath: /usr/local/etc/openldap/perl
olcPerlModule: SampleLDAP
olcPerlFilterSearchResults: FALSE


And here's what I get when I try to load the file:
ldapadd -Y EXTERNAL -H ldapi:/// -f perl-backend.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
adding new entry "cn=module,cn=config"
adding new entry "olcDatabase=perl,cn=config"
ldap_result: Can't contact LDAP server (-1)

After that, if I start OpenLDAP I get a segmentation fault:
root@ldap:/tmp# /usr/local/libexec/slapd -u openldap -g openldap -h "ldap:/// ldapi:///" -d 16383
….
51585496 perl backend db init
Segmentation fault

Like I said, if I set back-perl up in slapd.conf mode and then convert it to cn=config, everything works fine.

Something must be wrong with my LDIF file, but what ??? It seems to be the same as the one generated by slaptest when converting from slapd.conf mode.

Ben