Browse Source

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

Rich Megginson 18 years ago
parent
commit
bf59bf3c7f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ldap/servers/slapd/pw.c

+ 1 - 1
ldap/servers/slapd/pw.c

@@ -319,7 +319,6 @@ int
 pw_encodevals( Slapi_Value **vals )
 {
 	int	i;
-	char	*enc = NULL;
 	slapdFrontendConfig_t * slapdFrontendConfig = getFrontendConfig();
 
 
@@ -330,6 +329,7 @@ pw_encodevals( Slapi_Value **vals )
 
 	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 */