/*
* If the user is setting a configuration value,
* then don't bother comparing it to any attributes
- * sent to us by the user.
+ * sent to us by the user. It ALWAYS matches.
*/
if (check_item->operator == T_OP_SET) {
check_item = check_item->next;
}
- check_item->operator = T_OP_EQ;
if (result == 0)
check_item = check_item->next;
}
pl->name, pl->lineno);
found = 1;
check_tmp = paircopy(pl->check);
+ /*
+ * Smash the operators to '+=', so that
+ * pairmove() will do the right thing...
+ */
+ for (tmp = check_tmp; tmp; tmp = tmp->next) {
+ tmp->operator = T_OP_ADD;
+ }
reply_tmp = paircopy(pl->reply);
pairmove(reply_pairs, &reply_tmp);
pairmove(check_pairs, &check_tmp);
pairfree(reply_tmp);
- pairfree(check_tmp);
-
+ pairfree(check_tmp); /* should be NULL */
/*
* Fallthrough?
*/
* See if we have an accounting directory. If not,
* return.
*/
- if (stat(radacct_dir, &st) < 0)
+ if (stat(radacct_dir, &st) < 0) {
+ DEBUG("No accounting directory %s", radacct_dir);
return RLM_ACCT_OK;
+ }
curtime = time(0);
/*