mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 16:49:39 -05:00
Fix add of empty value.
This commit is contained in:
parent
49d9f7f1b2
commit
9e450558d8
2 changed files with 11 additions and 1 deletions
|
|
@ -1022,6 +1022,16 @@ domodify(
|
|||
fprintf( stderr, "%s: no attributes to change or add (entry=\"%s\")\n",
|
||||
prog, dn );
|
||||
return( LDAP_PARAM_ERROR );
|
||||
}
|
||||
|
||||
for ( i = 0; pmods[ i ] != NULL; ++i ) {
|
||||
op = pmods[ i ]->mod_op & ~LDAP_MOD_BVALUES;
|
||||
if( op == LDAP_MOD_ADD && ( pmods[i]->mod_bvalues == NULL )) {
|
||||
fprintf( stderr,
|
||||
"%s: attribute \"%s\" has no values (entry=\"%s\")\n",
|
||||
prog, pmods[i]->mod_type, dn );
|
||||
return LDAP_PARAM_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if ( verbose ) {
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ ldif_parse_line(
|
|||
|
||||
if ( *s == '\0' ) {
|
||||
/* no value */
|
||||
value = NULL;
|
||||
value = "";
|
||||
vlen = 0;
|
||||
goto done;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue