From: Alan T. DeKok Date: Fri, 21 Jul 2023 17:40:08 +0000 (-0400) Subject: set secret flag in fr_value_box_init() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c2c5b54a82f38dc918d3e9d45d4bba1a3bf10c4;p=thirdparty%2Ffreeradius-server.git set secret flag in fr_value_box_init() which unfortunately means rearranging the header file includes a little bit. --- diff --git a/src/lib/eap/types.c b/src/lib/eap/types.c index 693d0d2abe6..5bf76a7d2a8 100644 --- a/src/lib/eap/types.c +++ b/src/lib/eap/types.c @@ -21,6 +21,8 @@ * * @copyright 2019 The FreeRADIUS server project */ +#include + #include "attrs.h" #include "types.h" diff --git a/src/lib/util/dict.h b/src/lib/util/dict.h index 11071bb7344..f7c0e248b51 100644 --- a/src/lib/util/dict.h +++ b/src/lib/util/dict.h @@ -46,7 +46,7 @@ extern "C" { typedef struct dict_attr_s fr_dict_attr_t; typedef struct fr_dict fr_dict_t; -#include +typedef struct value_box_s fr_value_box_t; /* * Allow public and private versions of the same structures diff --git a/src/lib/util/dict_fixup_priv.h b/src/lib/util/dict_fixup_priv.h index cdfe294a855..2ae5326e8cc 100644 --- a/src/lib/util/dict_fixup_priv.h +++ b/src/lib/util/dict_fixup_priv.h @@ -27,6 +27,7 @@ RCSIDH(dict_fixup_priv_h, "$Id$") #include #include #include +#include typedef struct { TALLOC_CTX *pool; //!< Temporary pool for fixups, reduces holes diff --git a/src/lib/util/dict_priv.h b/src/lib/util/dict_priv.h index 8fcca8efa58..6a8801c9a75 100644 --- a/src/lib/util/dict_priv.h +++ b/src/lib/util/dict_priv.h @@ -32,6 +32,7 @@ extern "C" { #include #include #include +#include #define DICT_POOL_SIZE (1024 * 1024 * 2) #define DICT_FIXUP_POOL_SIZE (1024) diff --git a/src/lib/util/dict_test.h b/src/lib/util/dict_test.h index 0520c195807..8d90361f18f 100644 --- a/src/lib/util/dict_test.h +++ b/src/lib/util/dict_test.h @@ -24,6 +24,7 @@ RCSIDH(dict_test_h, "$Id$") #include +#include #ifdef __cplusplus extern "C" { diff --git a/src/lib/util/value.h b/src/lib/util/value.h index eee1cbbf549..f156e70e5dd 100644 --- a/src/lib/util/value.h +++ b/src/lib/util/value.h @@ -438,9 +438,10 @@ void fr_value_box_init(fr_value_box_t *vb, fr_type_t type, fr_dict_attr_t const { /* coverity[store_writes_const_field] */ memcpy((void *) vb, &(fr_value_box_t){ - .type = type, + .type = type, .enumv = enumv, - .tainted = tainted + .tainted = tainted, + .secret = enumv && enumv->flags.secret, }, sizeof(*vb)); fr_value_box_list_entry_init(vb);