diff options
author | Rich Megginson <rmeggins@redhat.com> | 2007-10-09 17:51:14 +0000 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2007-10-09 17:51:14 +0000 |
commit | bf59bf3c7f40eec80ede191a4ed08f4131d88250 (patch) | |
tree | 8e237618913e03a1589ef9a0fd79f4d2ae605de8 | |
parent | 496abe526e266bffc47f73ce327250c1961292b5 (diff) | |
download | ds-bf59bf3c7f40eec80ede191a4ed08f4131d88250.tar.gz ds-bf59bf3c7f40eec80ede191a4ed08f4131d88250.tar.xz ds-bf59bf3c7f40eec80ede191a4ed08f4131d88250.zip |
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
-rw-r--r-- | ldap/servers/slapd/pw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c index a2b42c47..bb9e200b 100644 --- a/ldap/servers/slapd/pw.c +++ b/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 */ |