]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
set secret flag in fr_value_box_init()
authorAlan T. DeKok <aland@freeradius.org>
Fri, 21 Jul 2023 17:40:08 +0000 (13:40 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 21 Jul 2023 17:40:08 +0000 (13:40 -0400)
which unfortunately means rearranging the header file includes
a little bit.

src/lib/eap/types.c
src/lib/util/dict.h
src/lib/util/dict_fixup_priv.h
src/lib/util/dict_priv.h
src/lib/util/dict_test.h
src/lib/util/value.h

index 693d0d2abe631885c0bbe2a406639b10b0b1a29d..5bf76a7d2a8ae0625c902933db99414bc9e17078 100644 (file)
@@ -21,6 +21,8 @@
  *
  * @copyright 2019 The FreeRADIUS server project
  */
+#include <freeradius-devel/util/value.h>
+
 #include "attrs.h"
 #include "types.h"
 
index 11071bb7344cd3cd06b465260259074b734ae01b..f7c0e248b51745c7907af1bbe8c58f9c15479fae 100644 (file)
@@ -46,7 +46,7 @@ extern "C" {
 typedef struct dict_attr_s fr_dict_attr_t;
 typedef struct fr_dict fr_dict_t;
 
-#include <freeradius-devel/util/value.h>
+typedef struct value_box_s fr_value_box_t;
 
 /*
  *     Allow public and private versions of the same structures
index cdfe294a85575fdcc95b942c2a20883cf657ef7c..2ae5326e8ccb97ee549e7f947774d2faf18a7a44 100644 (file)
@@ -27,6 +27,7 @@ RCSIDH(dict_fixup_priv_h, "$Id$")
 #include <freeradius-devel/util/dict_priv.h>
 #include <freeradius-devel/util/dlist.h>
 #include <freeradius-devel/util/talloc.h>
+#include <freeradius-devel/util/value.h>
 
 typedef struct {
        TALLOC_CTX              *pool;          //!< Temporary pool for fixups, reduces holes
index 8fcca8efa5829044153a79bc14168d841ac18007..6a8801c9a75a77ad3e88b4caa99acba030a061b0 100644 (file)
@@ -32,6 +32,7 @@ extern "C" {
 #include <freeradius-devel/util/dict_ext_priv.h>
 #include <freeradius-devel/util/dl.h>
 #include <freeradius-devel/util/hash.h>
+#include <freeradius-devel/util/value.h>
 
 #define DICT_POOL_SIZE         (1024 * 1024 * 2)
 #define DICT_FIXUP_POOL_SIZE   (1024)
index 0520c19580748e10c599a7a20fd4e711e2706ae9..8d90361f18f4a203cd24c9cf9bf0482a5b7884f5 100644 (file)
@@ -24,6 +24,7 @@
 RCSIDH(dict_test_h, "$Id$")
 
 #include <freeradius-devel/util/dict.h>
+#include <freeradius-devel/util/value.h>
 
 #ifdef __cplusplus
 extern "C" {
index eee1cbbf549b1f009e862a776bb3eb94f08a91d1..f156e70e5dd5fb554b54783852bb19f74bf6a986 100644 (file)
@@ -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);