unsigned int name_only : 1; //!< this attribute should always be referred to by name, not by number
+ unsigned int secret : 1; //!< this attribute should be omitted in debug mode
+
/*
* @todo - if we want to clean these fields up, make
* "subtype" and "type_size" both 4-bit bitfields. That
} else if (strcmp(key, "virtual") == 0) {
flags->virtual = 1;
+ } else if (strcmp(key, "secret") == 0) {
+ flags->secret = 1;
+
} else if (strcmp(key, "offset") == 0) {
int offset;
dst->enumv = src->enumv;
dst->type = src->type;
dst->tainted = src->tainted;
+ dst->secret = src->secret;
dst->safe = src->safe;
fr_value_box_list_entry_init(dst);
}
/** Type and flags should appear together for packing efficiency
*/
fr_type_t _CONST type; //!< Type of this value-box, at the start, see pair.h
- bool tainted; //!< i.e. did it come from an untrusted source
+ unsigned int tainted : 1; //!< i.e. did it come from an untrusted source
+ unsigned int secret : 1; //!< Same as #fr_dict_attr_flags_t secret
uint16_t _CONST safe; //!< more detailed safety
fr_value_box_entry_t entry; //!< Doubly linked list entry.
return false;
}
+ /*
+ * Secret things are secret.
+ */
+ if (flags->subtype > FLAG_TAGGED_TUNNEL_PASSWORD) {
+ flags->secret = true;
+ }
+
if (flag_concat(flags)) {
if (!parent->flags.is_root) {
fr_strerror_const("Attributes with the 'concat' flag MUST be at the root of the dictionary");