mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-11 13:50:39 +08:00
ITS#9768 Enforce single name per olcTranslucentLocal/olcTranslucentRemote value
This commit is contained in:
parent
711ebba53c
commit
d8331e1b81
@ -218,10 +218,21 @@ translucent_cf_gen( ConfigArgs *c )
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* cn=config values could be deleted later, make sure we only allow one
|
||||||
|
* name per value for valx to match. */
|
||||||
|
if ( c->op != SLAP_CONFIG_ADD && strchr( c->argv[1], ',' ) ) {
|
||||||
|
snprintf( c->cr_msg, sizeof( c->cr_msg ),
|
||||||
|
"%s: Please provide attribute names in separate values",
|
||||||
|
c->argv[0] );
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
a2 = str2anlist( *an, c->argv[1], "," );
|
a2 = str2anlist( *an, c->argv[1], "," );
|
||||||
if ( !a2 ) {
|
if ( !a2 ) {
|
||||||
snprintf( c->cr_msg, sizeof( c->cr_msg ), "%s unable to parse attribute %s",
|
snprintf( c->cr_msg, sizeof( c->cr_msg ), "%s unable to parse attribute %s",
|
||||||
c->argv[0], c->argv[1] );
|
c->argv[0], c->argv[1] );
|
||||||
|
fail:
|
||||||
Debug( LDAP_DEBUG_CONFIG|LDAP_DEBUG_NONE,
|
Debug( LDAP_DEBUG_CONFIG|LDAP_DEBUG_NONE,
|
||||||
"%s: %s\n", c->log, c->cr_msg );
|
"%s: %s\n", c->log, c->cr_msg );
|
||||||
return ARG_BAD_CONF;
|
return ARG_BAD_CONF;
|
||||||
|
Loading…
Reference in New Issue
Block a user