[Fedora-directory-commits] ldapserver/ldap/servers/slapd pw.c, 1.15, 1.16

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Tue Oct 9 17:51:16 UTC 2007


Author: rmeggins

Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18910

Modified Files:
	pw.c 
Log Message:
Resolves: bug 305121
Bug Description: Server hangs when adding a group with two password entries
Reviewed by: nhosoi (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



Index: pw.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/pw.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- pw.c	5 Dec 2006 21:22:09 -0000	1.15
+++ pw.c	9 Oct 2007 17:51:14 -0000	1.16
@@ -319,7 +319,6 @@
 pw_encodevals( Slapi_Value **vals )
 {
 	int	i;
-	char	*enc = NULL;
 	slapdFrontendConfig_t * slapdFrontendConfig = getFrontendConfig();
 
 
@@ -330,6 +329,7 @@
 
 	for ( i = 0; vals[ i ] != NULL; ++i ) {
 		struct pw_scheme    *pwsp;
+		char	*enc = NULL;
 		if ( (pwsp=pw_val2scheme( (char*)slapi_value_get_string(vals[ i ]), NULL, 0)) != NULL ) { /* JCM Innards */
 			/* If the value already specifies clear storage, call the
 			 * clear storage plug-in */




More information about the Fedora-directory-commits mailing list