static Attr_option *options = &lang_option;
static int option_count = 1;
+static int msad_range_hack = 0;
+
static Attr_option *ad_find_option_definition( const char *opt, int optlen );
static int ad_keystring(
}
for( i=1; i<bv->bv_len; i++ ) {
- if( !AD_CHAR( bv->bv_val[i] ) ) {
+ if( !AD_CHAR( bv->bv_val[i] )) {
+ if ( msad_range_hack && bv->bv_val[i] == '=' )
+ continue;
return 1;
}
}
} else if ( ad_find_option_definition( opt, optlen ) ) {
int i;
- if( opt[optlen-1] == '-' ) {
+ if( opt[optlen-1] == '-' ||
+ ( opt[optlen-1] == '=' && msad_range_hack )) {
desc.ad_flags |= SLAP_DESC_TAG_RANGE;
}
optlen = 0;
do {
if ( !DESC_CHAR( name[optlen] ) ) {
+ /* allow trailing '=', same as '-' */
+ if ( name[optlen] == '=' && !name[optlen+1] ) {
+ msad_range_hack = 1;
+ continue;
+ }
Debug( LDAP_DEBUG_ANY,
"%s: line %d: illegal option name \"%s\"\n",
fname, lineno, name );
options[i].name.bv_val = ch_strdup( name );
options[i].name.bv_len = optlen;
- options[i].prefix = (name[optlen-1] == '-');
+ options[i].prefix = (name[optlen-1] == '-') ||
+ (name[optlen-1] == '=');
if ( i != option_count &&
options[i].prefix &&