summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/pw.c
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2006-03-06 20:02:06 +0000
committerRich Megginson <rmeggins@redhat.com>2006-03-06 20:02:06 +0000
commit09f55c6069bc6a708edd4bd5fe60d8906377b1cd (patch)
treec00073dc9f3982e0d83f2d2b83f7c1e7595854ce /ldap/servers/slapd/pw.c
parenta74726453ce0dc72ee9fc1e8b0946fb10ff9be20 (diff)
downloadds-09f55c6069bc6a708edd4bd5fe60d8906377b1cd.tar.gz
ds-09f55c6069bc6a708edd4bd5fe60d8906377b1cd.tar.xz
ds-09f55c6069bc6a708edd4bd5fe60d8906377b1cd.zip
Bug(s) fixed: 179723
Bug Description: crash after succesful pwdchange via ldappasswd Reviewed by: Pete, Nathan (Thanks!) Fix Description: The passwd_extop code does an internal operation to change the password. Some of this code is only intended to be called for external operations where you have a conn structure. The one place in particular which caused this bug is in update_pw_info, where it is only triggered if you must change the password or password expiration is in effect. The fix is to just check to see if the pb_conn is not null. Platforms tested: Fedora Core 4 Flag Day: no Doc impact: no
Diffstat (limited to 'ldap/servers/slapd/pw.c')
-rw-r--r--ldap/servers/slapd/pw.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c
index c7d6896d..7665a261 100644
--- a/ldap/servers/slapd/pw.c
+++ b/ldap/servers/slapd/pw.c
@@ -647,8 +647,10 @@ update_pw_info ( Slapi_PBlock *pb , char *old_pw) {
pw_apply_mods(dn, &smods);
slapi_mods_done(&smods);
- /* reset c_needpw to 0 */
- pb->pb_conn->c_needpw = 0;
+ if (pb->pb_conn) { /* no conn for internal op */
+ /* reset c_needpw to 0 */
+ pb->pb_conn->c_needpw = 0;
+ }
return 0;
}