Bug 305121

Summary: Server hangs when adding a group with two password entries
Product: [Retired] 389 Reporter: Miloslav Trmač <mitr>
Component: Directory ServerAssignee: Rich Megginson <rmeggins>
Status: CLOSED CURRENTRELEASE QA Contact: Viktor Ashirov <vashirov>
Severity: high Docs Contact:
Priority: high    
Version: 1.1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-07 16:35:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 240316, 427409    
Attachments:
Description Flags
diffs none

Description Miloslav Trmač 2007-09-25 14:23:08 UTC
Version-Release number of selected component (if applicable):
fedora-ds-base-1.1.0-1.2.fc7

Steps to Reproduce:
1. Set up a DS instance using /usr/sbin/setup-ds.pl
2. ldapadd something like the following:
dn: cn=my_group,ou=Groups,dc=ROOT
objectClass: posixGroup
cn: my_group
gidNumber: 424242
userPassword: unknown1
userPassword: unknown2
  
Actual results:
ldapadd never receives a reply from the server, the server becomes unresponsive
and must be killed with SIGKILL.

Expected results:
Creation of the specified group, or perhaps an error message.

Comment 1 Rich Megginson 2007-10-09 03:40:55 UTC
Created attachment 220601 [details]
diffs

Comment 2 Rich Megginson 2007-10-09 17:52:48 UTC
Checking in pw.c;
/cvs/dirsec/ldapserver/ldap/servers/slapd/pw.c,v  <--  pw.c
new revision: 1.16; previous revision: 1.15
done

Reviewed by: nhosoi,nkinder (Thanks!)
Files: see diff
Branch: HEAD
Fix Description: The pw_encodevals() was not encoding each value, only the first
one, then setting each new value to the same encoded value.  The solution is to
move char *enc into the loop so that it is allocated anew each time.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no