Description of problem: Running ns-pwpolicy.pl on against replicated server, cause the instance to crash. Setup RHEL 4 32-bit Supplier and Consumer Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. Added ou container and user and allowed replication 2. perl template-ns-newpwpolicy.pl -D "cn=Directory Manager" -w Secret -p 1389 -h host.example.com -S "ou=Accounting,dc=example,dc=com" Debug: Continuing. [New Thread -1704776800 (LWP 19975)] [Thread -1704776800 (LWP 19975) exited] [New Thread -1704776800 (LWP 19976)] [Thread -1704776800 (LWP 19976) exited] [New Thread -1704776800 (LWP 19981)] [Thread -1704776800 (LWP 19981) exited] [New Thread -1704776800 (LWP 19990)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1337431136 (LWP 19757)] 0x00b03151 in normalize_mods2bvals (mods=0x903d018) at ldap/servers/slapd/util.c:433 433 (*normmbvp)->bv_val = normed; (gdb) bt #0 0x00b03151 in normalize_mods2bvals (mods=0x903d018) at ldap/servers/slapd/util.c:433 #1 0x00b0326b in slapi_mods2entry (e=0xb0486328, idn=0x9274228 "cn=cn=nsPwTemplateEntry\\2Cou=Accounting\\2Cdc=example\\2Cdc=com,cn=nsPwPolicyContainer,ou=Accounting,dc=example,dc=com", iattrs=0x903d018) at ldap/servers/slapd/util.c:264 #2 0x00cf0612 in cl5DBData2Entry (data=Variable "data" is not available. ) at ldap/servers/plugins/replication/cl5_api.c:2734 #3 0x00cf0757 in cl5GetNextOperationToReplay (iterator=0x903fe98, entry=0xb04862b0) at ldap/servers/plugins/replication/cl5_api.c:1958 #4 0x00d0bd45 in repl5_inc_run (prp=0x9241dc8) at ldap/servers/plugins/replication/repl5_inc_protocol.c:1777 #5 0x00d10292 in prot_thread_main (arg=0x9214050) at ldap/servers/plugins/replication/repl5_protocol.c:311 #6 0x035d78ad in PR_Select () from /usr/lib/libnspr4.so #7 0x009875cc in start_thread () from /lib/tls/libpthread.so.0 #8 0x008f0fae in clone () from /lib/tls/libc.so.6 (gdb) Actual results: Expected results: Additional info:
package version: redhat-ds-base-8.2.0-2010051804.el4dsrv
Created attachment 414983 [details] git patch file (9.0) File: ldap/servers/slapd/util.c Fix description: normalized_mods->mod_bvalues is an array of (struct berval *). When slapi_dn_normalize_ext returns an allocated memory (case rc > 0), a new struct berval should have been allocated and the address of the normalized string (normed) and its length (dnlen) should be set in the berval. The struct berval allocation was missing in the previous fix for "Update to New DN Format".
Thanks to Nathan for reviewing the fix. Pushed to master: $ git merge work Updating c12c48f..f999c42 Fast forward ldap/servers/slapd/util.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) $ git push Counting objects: 11, done. Delta compression using 4 threads. Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 841 bytes, done. Total 6 (delta 4), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git c12c48f..f999c42 master -> master As well as to Directory_Server_8_2_Branch: $ git push origin ds82-local:Directory_Server_8_2_Branch Counting objects: 11, done. Delta compression using 4 threads. Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 839 bytes, done. Total 6 (delta 4), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 351c6df..9b22aa3 ds82-local -> Directory_Server_8_2_Branch
fix verified - RHEL 4 version: redhat-ds-base-8.2.0-2010052004.el4dsrv Adding new policy with template-ns-newpwpolicy.pl - no longer crashing server.