diff options
author | Rich Megginson <rmeggins@redhat.com> | 2006-03-06 20:02:06 +0000 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2006-03-06 20:02:06 +0000 |
commit | 09f55c6069bc6a708edd4bd5fe60d8906377b1cd (patch) | |
tree | c00073dc9f3982e0d83f2d2b83f7c1e7595854ce | |
parent | a74726453ce0dc72ee9fc1e8b0946fb10ff9be20 (diff) | |
download | ds-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
-rw-r--r-- | ldap/servers/slapd/passwd_extop.c | 4 | ||||
-rw-r--r-- | ldap/servers/slapd/pw.c | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/ldap/servers/slapd/passwd_extop.c b/ldap/servers/slapd/passwd_extop.c index f7dae57c..2ee477a0 100644 --- a/ldap/servers/slapd/passwd_extop.c +++ b/ldap/servers/slapd/passwd_extop.c @@ -135,7 +135,6 @@ passwd_modify_getEntry( const char *dn, Slapi_Entry **e2 ) { static int passwd_apply_mods(const char *dn, Slapi_Mods *mods) { Slapi_PBlock pb; - Slapi_Operation *operation= NULL; int ret=0; LDAPDebug( LDAP_DEBUG_TRACE, "=> passwd_apply_mods\n", 0, 0, 0 ); @@ -150,9 +149,6 @@ static int passwd_apply_mods(const char *dn, Slapi_Mods *mods) pw_get_componentID(), /* PluginID */ 0); /* Flags */ - /* Plugin operations are INTERNAL by default, bypass it to enforce ACL checks */ - slapi_pblock_get (&pb, SLAPI_OPERATION, &operation); - ret =slapi_modify_internal_pb (&pb); slapi_pblock_get(&pb, SLAPI_PLUGIN_INTOP_RESULT, &ret); 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; } |