keys off of attributes in the request, and NOT in any other packet.
.IP relaxed
If set to 'yes', then attributes which do not match any filter rules
-explicitly, will also be allowed. The default is 'no'.
+explicitly, will also be allowed. This behaviour may be overridden
+for an individual filter block using the Relax-Filter check item.
+The default for this configuration item is 'no'.
.PP
.SH SECTIONS
.IP preacct
# These attributes CAN go in the reply item list.
ATTRIBUTE Fall-Through 500 integer
+ATTRIBUTE Relax-Filter 501 integer
ATTRIBUTE Exec-Program 502 string
ATTRIBUTE Exec-Program-Wait 503 string
VALUE Fall-Through No 0
VALUE Fall-Through Yes 1
+VALUE Relax-Filter No 0
+VALUE Relax-Filter Yes 1
+
VALUE Strip-User-Name No 0
VALUE Strip-User-Name Yes 1
#define PW_DIGEST_ATTRIBUTES 207
#define PW_FALL_THROUGH 500
+#define PW_RELAX_FILTER 501
#define PW_EXEC_PROGRAM 502
#define PW_EXEC_PROGRAM_WAIT 503
*/
for (pl = inst->attrs; pl; pl = pl->next) {
int fall_through = 0;
+ int relax_filter = inst->relaxed;
/*
* If the current entry is NOT a default,
continue;
}
- DEBUG2(" attr_filter: Matched entry %s at line %d", pl->name,
+ DEBUG2("attr_filter: Matched entry %s at line %d", pl->name,
pl->lineno);
found = 1;
for (check_item = pl->check;
- check_item != NULL;
- check_item = check_item->next) {
+ check_item != NULL;
+ check_item = check_item->next) {
if ((check_item->attribute == PW_FALL_THROUGH) &&
- (check_item->vp_integer == 1)) {
+ (check_item->vp_integer == 1)) {
fall_through = 1;
continue;
}
+ else if (check_item->attribute == PW_RELAX_FILTER) {
+ if ( check_item->vp_integer != inst->relaxed ) {
+ DEBUG3("attr_filter: Overriding relaxed config-item with check-item value %d",
+ check_item->vp_integer);
+ relax_filter = check_item->vp_integer;
+ }
+ continue;
+ }
/*
* If it is a SET operator, add the attribute to
* or if the config says we should copy unmatched
* attributes ('relaxed' mode).
*/
- if (fail == 0 && (pass > 0 || inst->relaxed)) {
+ if (fail == 0 && (pass > 0 || relax_filter)) {
+ if (!pass) {
+ DEBUG3("attr_filter: Attribute (%s) allowed by relaxed mode", vp->name);
+ }
*output_tail = paircopyvp(vp);
if (!*output_tail) {
pairfree(&output);