mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-27 01:59:38 -05:00
ITS#5575, passwords now need to be NUL-terminated by us
This commit is contained in:
parent
62b03af050
commit
e7383994fb
1 changed files with 5 additions and 0 deletions
|
|
@ -350,6 +350,7 @@ static int smbk5pwd_exop_passwd(
|
|||
Modifications *ml;
|
||||
slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
|
||||
smbk5pwd_t *pi = on->on_bi.bi_private;
|
||||
char term;
|
||||
|
||||
/* Not the operation we expected, pass it on... */
|
||||
if ( ber_bvcmp( &slap_EXOP_MODIFY_PASSWD, &op->ore_reqoid ) ) {
|
||||
|
|
@ -360,6 +361,9 @@ static int smbk5pwd_exop_passwd(
|
|||
rc = be_entry_get_rw( op, &op->o_req_ndn, NULL, NULL, 0, &e );
|
||||
if ( rc != LDAP_SUCCESS ) return rc;
|
||||
|
||||
term = qpw->rs_new.bv_val[qpw->rs_new.bv_len];
|
||||
qpw->rs_new.bv_val[qpw->rs_new.bv_len] = '\0';
|
||||
|
||||
#ifdef DO_KRB5
|
||||
/* Kerberos stuff */
|
||||
do {
|
||||
|
|
@ -596,6 +600,7 @@ static int smbk5pwd_exop_passwd(
|
|||
}
|
||||
#endif /* DO_SAMBA */
|
||||
be_entry_release_r( op, e );
|
||||
qpw->rs_new.bv_val[qpw->rs_new.bv_len] = term;
|
||||
|
||||
return SLAP_CB_CONTINUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue