Skip to content
Snippets Groups Projects
Commit 3ee954de authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

fix custom group objectclass/member attribute parsing; let ACI code be built as dynamic module

parent 551d94c6
Branches
Tags
No related merge requests found
......@@ -1320,11 +1320,15 @@ OpenLDAPaciValidate(
atbv = BER_BVNULL;
ocbv.bv_val = strchr( type.bv_val, '/' );
if ( ocbv.bv_val != NULL ) {
if ( ocbv.bv_val != NULL
&& ( ocbv.bv_val - type.bv_val ) < type.bv_len )
{
ocbv.bv_val++;
atbv.bv_val = strchr( ocbv.bv_val, '/' );
if ( atbv.bv_val != NULL ) {
if ( atbv.bv_val != NULL
&& ( atbv.bv_val - ocbv.bv_val ) < ocbv.bv_len )
{
AttributeDescription *ad = NULL;
const char *text = NULL;
int rc;
......@@ -1471,7 +1475,9 @@ OpenLDAPaciPrettyNormal(
atbv = BER_BVNULL;
ocbv.bv_val = strchr( type.bv_val, '/' );
if ( ocbv.bv_val != NULL ) {
if ( ocbv.bv_val != NULL
&& ( ocbv.bv_val - type.bv_val ) < type.bv_len )
{
ObjectClass *oc = NULL;
AttributeDescription *ad = NULL;
const char *text = NULL;
......@@ -1483,7 +1489,9 @@ OpenLDAPaciPrettyNormal(
ocbv.bv_val++;
atbv.bv_val = strchr( ocbv.bv_val, '/' );
if ( atbv.bv_val != NULL ) {
if ( atbv.bv_val != NULL
&& ( atbv.bv_val - ocbv.bv_val ) < ocbv.bv_len )
{
atbv.bv_val++;
atbv.bv_len = type.bv_len
- ( atbv.bv_val - type.bv_val );
......@@ -1616,5 +1624,17 @@ OpenLDAPaciNormalize(
return OpenLDAPaciPrettyNormal( val, out, ctx, 1 );
}
#if SLAPD_ACI_ENABLED == SLAPD_MOD_DYNAMIC
/*
* FIXME: need config and Makefile.am code to ease building
* as dynamic module
*/
int
init_module( int argc, char *argv[] )
{
return slap_dynacl_register();
}
#endif /* SLAPD_ACI_ENABLED == SLAPD_MOD_DYNAMIC */
#endif /* SLAPD_ACI_ENABLED */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment