char *fr_pair_type_asprint(TALLOC_CTX *ctx, PW_TYPE type);
char *fr_pair_asprint(TALLOC_CTX *ctx, VALUE_PAIR const *vp, char quote);
+void fr_pair_list_tainted(VALUE_PAIR *vp);
+
/* Hacky raw pair thing that needs to go away */
FR_TOKEN fr_pair_raw_from_str(char const **ptr, VALUE_PAIR_RAW *raw);
}
}
#endif
+
+/** Mark up a list of VPs as tainted.
+ *
+ */
+void fr_pair_list_tainted(VALUE_PAIR *vps)
+{
+ VALUE_PAIR *vp;
+ vp_cursor_t cursor;
+
+ if (!vps) {
+ return;
+ }
+
+ for (vp = fr_cursor_init(&cursor, &vps);
+ vp;
+ vp = fr_cursor_next(&cursor)) {
+ VERIFY_VP(vp);
+ vp->vp_tainted = true;
+ }
+}