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

Re: (ITS#4923) back-config and olcModuleLoad kills slapd



ghenry@suretecsystems.com wrote:
> Full_Name: Gavin Henry
> Version: 2.3.35
> OS: Fedora Core 6
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (212.159.59.85)
> 
> 
> Dear All,
> 
> I know you can add modules like:
> 
> dn: cn=module{0},cn=config
> objectClass: olcModuleList
> cn: module{0}
> olcModuleLoad: /usr/local/lib/smbk5pwd.la
> 
> dn: cn=module{1},cn=config
> objectClass: olcModuleList
> cn: module{1}
> olcModulePath: /usr/local/lib:/usr/local/lib/slapd
> olcModuleLoad: accesslog.la
> olcModuleLoad: pcache.la
> 
> But when migrating from slapd.conf, they get listed as:
> 
> dn: cn=module{0},cn=config
> olcModuleLoad: {0}back_hdb.la
> olcModuleLoad: {1}accesslog.la
> olcModuleLoad: {2}syncprov.la
> olcModuleLoad: {3}back_monitor.la
> 
> I am trying to add the smbk5pwd module like so:
> 
> dn: cn=module{0},cn=config
> changetype: modify
> replace: olcModuleLoad
> olcModuleLoad: {0}back_hdb.la
> olcModuleLoad: {1}accesslog.la
> olcModuleLoad: {2}syncprov.la
> olcModuleLoad: {3}back_monitor.la
> olcModuleLoad: {4}smbk5pwd.la
> 
> Command:
> 
> ldapmodify -d 1 -x -D "cn=config" -W -f /home/ghenry/Desktop/smb.ldif -ZZ
> 
> ldapmodify excepts the above LDIF.
> 
> But slapd dies:
> 
> Program received signal SIGABRT, Aborted.
> [Switching to Thread -1558062192 (LWP 24587)]
> 0x00bfd402 in __kernel_vsyscall ()
> (gdb) bt
> #0  0x00bfd402 in __kernel_vsyscall ()
> #1  0x0026ad40 in raise () from /lib/libc.so.6
> #2  0x0026c591 in abort () from /lib/libc.so.6
> #3  0x0026438b in __assert_fail () from /lib/libc.so.6
> #4  0x080a26ce in slap_bv2ad ()
> #5  0x080a33c0 in slap_str2ad ()
> #6  0x08060f81 in init_config_attrs ()
> #7  0x0805f7e7 in config_register_schema ()
> #8  0x004db1e3 in hdb_back_init_cf (bi=0x4f8960) at config.c:695
> #9  0x004d755d in hdb_back_initialize (bi=0x4f8960) at init.c:683
> #10 0x08075e6b in backend_add ()
> #11 0x004d7328 in init_module (argc=0, argv=0x0) at init.c:693
> #12 0x080aec33 in module_load ()
> #13 0x0805abd6 in str2loglevel ()
> #14 0x080611e2 in config_set_vals ()
> #15 0x0806310d in config_parse_add ()
> #16 0x0805d899 in str2loglevel ()
> #17 0x0807f89b in fe_op_modify ()
> #18 0x080800d8 in do_modify ()
> #19 0x08068bd9 in connection2anonymous ()
> #20 0x0099260d in ldap_int_thread_pool_wrapper (xpool=0xa3c1ffd8) at
> tpool.c:478
> #21 0x006e63db in start_thread () from /lib/libpthread.so.0
> #22 0x0030f26e in clone () from /lib/libc.so.6
> 
> Is this a LDIF format issue on my part?

Yes.

You should just be doing a modify like

 > dn: cn=module{0},cn=config
 > changetype: modify
 > add: olcModuleLoad
 > olcModuleLoad: smbk5pwd.la

since you're not actually changing any of the other values.

In the meantime, back-config should not be accepting a "replace" request 
for olcModuleLoad attributes, since you're not allowed to delete 
modules, and replace is just delete/add.

-- 
   -- Howard Chu
   Chief Architect, Symas Corp.  http://www.symas.com
   Director, Highland Sun        http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP     http://www.openldap.org/project/