ch_free( c->value_ndn.bv_val );
ch_free( c->value_dn.bv_val );
}
+ } else if(arg_type == ARG_ATDESC) {
+ const char *text = NULL;
+ c->value_ad = NULL;
+ rc = slap_str2ad( c->argv[1], &c->value_ad, &text );
+ if ( rc != LDAP_SUCCESS ) {
+ snprintf( c->cr_msg, sizeof( c->cr_msg ), "<%s> invalid AttributeDescription %d (%s)",
+ c->argv[0], rc, text );
+ Debug(LDAP_DEBUG_CONFIG|LDAP_DEBUG_NONE, "%s: %s\n" , c->log, c->cr_msg, 0);
+ return(ARG_BAD_CONF);
+ }
} else { /* all numeric */
int j;
iarg = 0; larg = 0; barg = 0;
case ARG_BERVAL:
*(struct berval *)ptr = c->value_bv;
break;
+ case ARG_ATDESC:
+ *(AttributeDescription **)ptr = c->value_ad;
+ break;
}
return(0);
}
break;
case ARG_BERVAL:
ber_dupbv( &c->value_bv, (struct berval *)ptr ); break;
+ case ARG_ATDESC:
+ c->value_ad = *(AttributeDescription **)ptr; break;
}
}
if ( cf->arg_type & ARGS_TYPES) {
return 1;
}
break;
+ case ARG_ATDESC:
+ if ( c->value_ad ) {
+ bv = c->value_ad->ad_cname;
+ } else {
+ return 1;
+ }
+ break;
default:
bv.bv_val = NULL;
break;
#define ARG_BERVAL 0x00006000
#define ARG_DN 0x00007000
#define ARG_UINT 0x00008000
+#define ARG_ATDESC 0x00009000
#define ARGS_SYNTAX 0xffff0000
#define ARG_IGNORED 0x00080000
struct berval vdn_dn;
struct berval vdn_ndn;
} v_dn;
+ AttributeDescription *v_ad;
} values;
/* return values for emit mode */
BerVarray rvalue_vals;
#define value_bv values.v_bv
#define value_dn values.v_dn.vdn_dn
#define value_ndn values.v_dn.vdn_ndn
+#define value_ad values.v_ad
int config_fp_parse_line(ConfigArgs *c);