diff options
author | Rich Megginson <rmeggins@redhat.com> | 2010-10-01 16:38:04 -0600 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2010-10-01 17:01:57 -0600 |
commit | 4f410d762b008da8e2e43e29100c2c04ff332fbb (patch) | |
tree | 6723ef832b034bda64cc691d252b42e522718bfa /ldap/servers/slapd/passwd_extop.c | |
parent | a82f61269d69882d19b15def70de68906ed5740e (diff) | |
download | ds-4f410d762b008da8e2e43e29100c2c04ff332fbb.tar.gz ds-4f410d762b008da8e2e43e29100c2c04ff332fbb.tar.xz ds-4f410d762b008da8e2e43e29100c2c04ff332fbb.zip |
openldap ber_init will assert if the bv->bv_val is NULL
Have to ensure that all usage of ber_init in the server checks to see if
the bv->bv_val is non-NULL before using ber_init, and return the appropriate
error if it is NULL
Also fixed a problem in dna_extend_exop - would not send the ldap result to
the client in certain error conditions
Reviewed by: nhosoi (Thanks!)
Tested on: RHEL5 x86_64
Diffstat (limited to 'ldap/servers/slapd/passwd_extop.c')
-rw-r--r-- | ldap/servers/slapd/passwd_extop.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ldap/servers/slapd/passwd_extop.c b/ldap/servers/slapd/passwd_extop.c index ff2e19f3..e22a52d4 100644 --- a/ldap/servers/slapd/passwd_extop.c +++ b/ldap/servers/slapd/passwd_extop.c @@ -527,6 +527,16 @@ passwd_modify_extop( Slapi_PBlock *pb ) /* Get the ber value of the extended operation */ slapi_pblock_get(pb, SLAPI_EXT_OP_REQ_VALUE, &extop_value); + + if (extop_value->bv_val == NULL) + { + /* The request field wasn't provided. We'll + * now try to determine the userid and verify + * knowledge of the old password via other + * means. + */ + goto parse_req_done; + } if ((ber = ber_init(extop_value)) == NULL) { |