| 1 | /** |
| 2 | * @file oval_variable.c |
| 3 | * \brief Open Vulnerability and Assessment Language |
| 4 | * |
| 5 | * See more details at http://oval.mitre.org/ |
| 6 | */ |
| 7 | |
| 8 | /* |
| 9 | * Copyright 2009--2013 Red Hat Inc., Durham, North Carolina. |
| 10 | * All Rights Reserved. |
| 11 | * |
| 12 | * This library is free software; you can redistribute it and/or |
| 13 | * modify it under the terms of the GNU Lesser General Public |
| 14 | * License as published by the Free Software Foundation; either |
| 15 | * version 2.1 of the License, or (at your option) any later version. |
| 16 | * |
| 17 | * This library is distributed in the hope that it will be useful, |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 20 | * Lesser General Public License for more details. |
| 21 | * |
| 22 | * You should have received a copy of the GNU Lesser General Public |
| 23 | * License along with this library; if not, write to the Free Software |
| 24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 25 | * |
| 26 | * Authors: |
| 27 | * "David Niemoller" <[email protected]> |
| 28 | */ |
| 29 | |
| 30 | #ifdef HAVE_CONFIG_Hcxx . . $ `<built-in>:409:9`! |
| 31 | #include <config.h>cxx . . $ `<file>/build/config.h`/ |
| 32 | #endif |
| 33 | |
| 34 | #include <stdlib.h> |
| 35 | #include <stdio.h> |
| 36 | #include <string.h> |
| 37 | |
| 38 | #include "oval_definitions_impl.h"cxx . . $ `<file>/src/OVAL/oval_definitions_impl.h`/ |
| 39 | #include "adt/oval_collection_impl.h"cxx . . $ `<file>/src/OVAL/adt/oval_collection_impl.h`/ |
| 40 | #include "adt/oval_string_map_impl.h"cxx . . $ `<file>/src/OVAL/adt/oval_string_map_impl.h`/ |
| 41 | #include "oval_agent_api_impl.h"cxx . . $ `<file>/src/OVAL/oval_agent_api_impl.h`/ |
| 42 | #include "common/util.h"cxx . . $ `<file>/src/common/util.h`/ |
| 43 | #include "common/debug_priv.h"cxx . . $ `<file>/src/common/debug_priv.h`/ |
| 44 | #include "common/_error.h"cxx . . $ `<file>/src/common/_error.h`/ |
| 45 | #include "common/oscap_string.h"cxx . . $ `<file>/src/common/oscap_string.h`/ |
| 46 | #include "results/oval_cmp_impl.h"cxx . . $ `<file>/src/OVAL/results/oval_cmp_impl.h`/ |
| 47 | #include "results/oval_results_impl.h"cxx . . $ `<file>/src/OVAL/results/oval_results_impl.h`/ |
| 48 | #include "public/oval_probe.h"cxx . . $ `<file>/src/OVAL/public/oval_probe.h`/ |
| 49 | |
| 50 | typedef struct oval_variablecxx . . $ oval_variable# { |
| 51 | #define VAR_BASEcxx . . $ `src/OVAL/oval_variable.c:51:9`! \ |
| 52 | struct oval_definition_model *model; \ |
| 53 | oval_variable_type_t type; \ |
| 54 | oval_syschar_collection_flag_t flag; \ |
| 55 | char *id; \ |
| 56 | int version; \ |
| 57 | oval_datatype_t datatype; \ |
| 58 | char *comment; \ |
| 59 | int deprecated |
| 60 | |
| 61 | VAR_BASEcxx . . $ `src/OVAL/oval_variable.c:51:9`!; |
| 62 | } oval_variable_tcxx . . $ oval_variable_t#; |
| 63 | |
| 64 | typedef structcxx . . $ $anonymous_type_8adf2bafb46b4f65_0# { |
| 65 | VAR_BASEcxx . . $ `src/OVAL/oval_variable.c:51:9`!; |
| 66 | struct oval_collectioncxx . . $ oval_collection# *valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_0#values.; |
| 67 | } oval_variable_CONSTANT_tcxx . . $ oval_variable_CONSTANT_t#; |
| 68 | |
| 69 | typedef structcxx . . $ $anonymous_type_8adf2bafb46b4f65_1# { |
| 70 | VAR_BASEcxx . . $ `src/OVAL/oval_variable.c:51:9`!; |
| 71 | struct oval_collectioncxx . . $ oval_collection# *possible_valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_1#possible_values.; |
| 72 | struct oval_collectioncxx . . $ oval_collection# *possible_restrictionscxx . . $ $anonymous_type_8adf2bafb46b4f65_1#possible_restrictions.; |
| 73 | struct oval_collectioncxx . . $ oval_collection# *values_refcxx . . $ $anonymous_type_8adf2bafb46b4f65_1#values_ref.; |
| 74 | } oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t#; |
| 75 | |
| 76 | typedef structcxx . . $ $anonymous_type_8adf2bafb46b4f65_2# { |
| 77 | VAR_BASEcxx . . $ `src/OVAL/oval_variable.c:51:9`!; |
| 78 | struct oval_componentcxx . . $ oval_component# *componentcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#component.; |
| 79 | struct oval_collectioncxx . . $ oval_collection# *valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_2#values.; |
| 80 | } oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t#; |
| 81 | |
| 82 | typedef structcxx . . $ $anonymous_type_8adf2bafb46b4f65_3# { |
| 83 | unioncxx . . $ $anonymous_type_8adf2bafb46b4f65_3#$anonymous_type_4# { |
| 84 | oval_variable_tcxx . . $ oval_variable_t# v1cxx . . $ $anonymous_type_8adf2bafb46b4f65_3#$anonymous_type_4#v1.; |
| 85 | oval_variable_CONSTANT_tcxx . . $ oval_variable_CONSTANT_t# v2cxx . . $ $anonymous_type_8adf2bafb46b4f65_3#$anonymous_type_4#v2.; |
| 86 | oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# v3cxx . . $ $anonymous_type_8adf2bafb46b4f65_3#$anonymous_type_4#v3.; |
| 87 | oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# v4cxx . . $ $anonymous_type_8adf2bafb46b4f65_3#$anonymous_type_4#v4.; |
| 88 | } unusedcxx . . $ $anonymous_type_8adf2bafb46b4f65_3#unused.; |
| 89 | } oval_variable_UNKNOWN_tcxx . . $ oval_variable_UNKNOWN_t#; |
| 90 | |
| 91 | typedef struct oval_variable_possible_valuecxx . . $ oval_variable_possible_value# { |
| 92 | char *hintcxx . . $ oval_variable_possible_value#hint.; |
| 93 | char *valuecxx . . $ oval_variable_possible_value#value.; |
| 94 | } oval_variable_possible_value_tcxx . . $ oval_variable_possible_value_t#; |
| 95 | |
| 96 | typedef struct oval_variable_possible_restrictioncxx . . $ oval_variable_possible_restriction# { |
| 97 | oval_operator_tcxx . . $ oval_operator_t# operatorcxx . . $ oval_variable_possible_restriction#operator.; |
| 98 | char *hintcxx . . $ oval_variable_possible_restriction#hint.; |
| 99 | struct oval_collectioncxx . . $ oval_collection# *restrictionscxx . . $ oval_variable_possible_restriction#restrictions.; |
| 100 | } oval_variable_possible_restriction_tcxx . . $ oval_variable_possible_restriction_t#; |
| 101 | |
| 102 | typedef struct oval_variable_restrictioncxx . . $ oval_variable_restriction# { |
| 103 | oval_operation_tcxx . . $ oval_operation_t# operationcxx . . $ oval_variable_restriction#operation.; |
| 104 | char *valuecxx . . $ oval_variable_restriction#value.; |
| 105 | } oval_variable_restriction_tcxx . . $ oval_variable_restriction_t#; |
| 106 | |
| 107 | struct oval_variable_possible_valuecxx . . $ oval_variable_possible_value# *oval_variable_possible_value_newcxx . . $ oval_variable_possible_value_new(2aecdfcf657d5045).(const char *hint, const char *value) |
| 108 | { |
| 109 | struct oval_variable_possible_valuecxx . . $ oval_variable_possible_value# *pv; |
| 110 | pv = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(oval_variable_possible_value_tcxx . . $ oval_variable_possible_value_t#)); |
| 111 | pv->hintcxx . . $ oval_variable_possible_value#hint. = oscap_strdupcxx . . $ oscap_strdup(a8b8e32347182212).(hint); |
| 112 | pv->valuecxx . . $ oval_variable_possible_value#value. = oscap_strdupcxx . . $ oscap_strdup(a8b8e32347182212).(value); |
| 113 | return pv; |
| 114 | } |
| 115 | |
| 116 | void oval_variable_possible_value_freecxx . . $ oval_variable_possible_value_free(7a6ef80798c359dd).(struct oval_variable_possible_valuecxx . . $ oval_variable_possible_value# *pv) |
| 117 | { |
| 118 | if (pv != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 119 | freecxx . . $ free(5d22bdacc48458e8).(pv->hintcxx . . $ oval_variable_possible_value#hint.); |
| 120 | freecxx . . $ free(5d22bdacc48458e8).(pv->valuecxx . . $ oval_variable_possible_value#value.); |
| 121 | freecxx . . $ free(5d22bdacc48458e8).(pv); |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | char* oval_variable_possible_value_get_hintcxx . . $ oval_variable_possible_value_get_hint(affb5da6c262ec4d).(struct oval_variable_possible_valuecxx . . $ oval_variable_possible_value#* pv) |
| 126 | { |
| 127 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(pv); |
| 128 | |
| 129 | return pv->hintcxx . . $ oval_variable_possible_value#hint.; |
| 130 | } |
| 131 | |
| 132 | char* oval_variable_possible_value_get_valuecxx . . $ oval_variable_possible_value_get_value(affb5da6c262ec4d).(struct oval_variable_possible_valuecxx . . $ oval_variable_possible_value#* pv) |
| 133 | { |
| 134 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(pv); |
| 135 | |
| 136 | return pv->valuecxx . . $ oval_variable_possible_value#value.; |
| 137 | } |
| 138 | |
| 139 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! oval_variable_possible_value_iterator_has_morecxx . . $ oval_variable_possible_value_iterator_has_more(1d6d85faee4d62df).(struct oval_variable_possible_value_iteratorcxx . . $ oval_variable_possible_value_iterator#* iter) |
| 140 | { |
| 141 | return oval_collection_iterator_has_morecxx . . $ oval_collection_iterator_has_more(de0650ab9b639739).((struct oval_iteratorcxx . . $ oval_iterator#*)iter); |
| 142 | } |
| 143 | |
| 144 | struct oval_variable_possible_valuecxx . . $ oval_variable_possible_value#* oval_variable_possible_value_iterator_nextcxx . . $ oval_variable_possible_value_iterator_next(eb9409b946662c73).(struct oval_variable_possible_value_iteratorcxx . . $ oval_variable_possible_value_iterator#* iter) |
| 145 | { |
| 146 | return (struct oval_variable_possible_valuecxx . . $ oval_variable_possible_value#*)oval_collection_iterator_nextcxx . . $ oval_collection_iterator_next(344074693c9690a9).((struct oval_iteratorcxx . . $ oval_iterator#*)iter); |
| 147 | } |
| 148 | |
| 149 | void oval_variable_possible_value_iterator_freecxx . . $ oval_variable_possible_value_iterator_free(dcfd2ac1be6e8f47).(struct oval_variable_possible_value_iteratorcxx . . $ oval_variable_possible_value_iterator#* iter) |
| 150 | { |
| 151 | oval_collection_iterator_freecxx . . $ oval_collection_iterator_free(ee496816570b41f7).((struct oval_iteratorcxx . . $ oval_iterator#*)iter); |
| 152 | } |
| 153 | |
| 154 | int oval_variable_possible_value_iterator_remainingcxx . . $ oval_variable_possible_value_iterator_remaining(ddab9bab7234d55a).(struct oval_variable_possible_value_iteratorcxx . . $ oval_variable_possible_value_iterator#* iter) |
| 155 | { |
| 156 | return oval_collection_iterator_remainingcxx . . $ oval_collection_iterator_remaining(4404665b78efb7c8).((struct oval_iteratorcxx . . $ oval_iterator#*)iter); |
| 157 | } |
| 158 | |
| 159 | struct oval_variable_possible_restrictioncxx . . $ oval_variable_possible_restriction# *oval_variable_possible_restriction_newcxx . . $ oval_variable_possible_restriction_new(c16fe9a45b3fcd4).(oval_operator_tcxx . . $ oval_operator_t# operator, const char *hint) |
| 160 | { |
| 161 | struct oval_variable_possible_restrictioncxx . . $ oval_variable_possible_restriction# *pr; |
| 162 | pr = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(oval_variable_possible_restriction_tcxx . . $ oval_variable_possible_restriction_t#)); |
| 163 | pr->operatorcxx . . $ oval_variable_possible_restriction#operator. = operator; |
| 164 | pr->hintcxx . . $ oval_variable_possible_restriction#hint. = oscap_strdupcxx . . $ oscap_strdup(a8b8e32347182212).(hint); |
| 165 | pr->restrictionscxx . . $ oval_variable_possible_restriction#restrictions. = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).(); |
| 166 | return pr; |
| 167 | } |
| 168 | |
| 169 | void oval_variable_possible_restriction_freecxx . . $ oval_variable_possible_restriction_free(1f4cc3870a735a53).(struct oval_variable_possible_restrictioncxx . . $ oval_variable_possible_restriction# *pr) |
| 170 | { |
| 171 | if (pr != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 172 | freecxx . . $ free(5d22bdacc48458e8).(pr->hintcxx . . $ oval_variable_possible_restriction#hint.); |
| 173 | oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(pr->restrictionscxx . . $ oval_variable_possible_restriction#restrictions., (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_variable_restriction_freecxx . . $ oval_variable_restriction_free(4f51a6c1d47fcc24).); |
| 174 | freecxx . . $ free(5d22bdacc48458e8).(pr); |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | void oval_variable_possible_restriction_add_restrictioncxx . . $ oval_variable_possible_restriction_add_restriction(d6f8919147cdc214).(struct oval_variable_possible_restrictioncxx . . $ oval_variable_possible_restriction# *pr, struct oval_variable_restrictioncxx . . $ oval_variable_restriction# *r) |
| 179 | { |
| 180 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(pr); |
| 181 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(r); |
| 182 | oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(pr->restrictionscxx . . $ oval_variable_possible_restriction#restrictions., r); |
| 183 | } |
| 184 | |
| 185 | struct oval_variable_restriction_iteratorcxx . . $ oval_variable_restriction_iterator# *oval_variable_possible_restriction_get_restrictions2cxx . . $ oval_variable_possible_restriction_get_restrictions2(ec783004bcbe76c2).(struct oval_variable_possible_restrictioncxx . . $ oval_variable_possible_restriction# *possible_restriction) |
| 186 | { |
| 187 | return (struct oval_variable_restriction_iteratorcxx . . $ oval_variable_restriction_iterator#*)oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(possible_restriction->restrictionscxx . . $ oval_variable_possible_restriction#restrictions.); |
| 188 | } |
| 189 | |
| 190 | oval_operator_tcxx . . $ oval_operator_t# oval_variable_possible_restriction_get_operatorcxx . . $ oval_variable_possible_restriction_get_operator(fb4ffdf453aacfc).(struct oval_variable_possible_restrictioncxx . . $ oval_variable_possible_restriction# *possible_restriction) |
| 191 | { |
| 192 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(possible_restriction); |
| 193 | |
| 194 | return possible_restriction->operatorcxx . . $ oval_variable_possible_restriction#operator.; |
| 195 | } |
| 196 | |
| 197 | char* oval_variable_possible_restriction_get_hintcxx . . $ oval_variable_possible_restriction_get_hint(5e4f6e297506efd5).(struct oval_variable_possible_restrictioncxx . . $ oval_variable_possible_restriction#* possible_restriction) |
| 198 | { |
| 199 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(possible_restriction); |
| 200 | |
| 201 | return possible_restriction->hintcxx . . $ oval_variable_possible_restriction#hint.; |
| 202 | } |
| 203 | |
| 204 | |
| 205 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! oval_variable_possible_restriction_iterator_has_morecxx . . $ oval_variable_possible_restriction_iterator_has_more(f6f9f4329c6096c).(struct oval_variable_possible_restriction_iteratorcxx . . $ oval_variable_possible_restriction_iterator#* iter) |
| 206 | { |
| 207 | return oval_collection_iterator_has_morecxx . . $ oval_collection_iterator_has_more(de0650ab9b639739).((struct oval_iteratorcxx . . $ oval_iterator#*)iter); |
| 208 | } |
| 209 | |
| 210 | struct oval_variable_possible_restrictioncxx . . $ oval_variable_possible_restriction#* oval_variable_possible_restriction_iterator_nextcxx . . $ oval_variable_possible_restriction_iterator_next(6385991630a8f06c).(struct oval_variable_possible_restriction_iteratorcxx . . $ oval_variable_possible_restriction_iterator#* iter) |
| 211 | { |
| 212 | return (struct oval_variable_possible_restrictioncxx . . $ oval_variable_possible_restriction#*)oval_collection_iterator_nextcxx . . $ oval_collection_iterator_next(344074693c9690a9).((struct oval_iteratorcxx . . $ oval_iterator#*)iter); |
| 213 | } |
| 214 | |
| 215 | void oval_variable_possible_restriction_iterator_freecxx . . $ oval_variable_possible_restriction_iterator_free(a03dad375fbcbfa).(struct oval_variable_possible_restriction_iteratorcxx . . $ oval_variable_possible_restriction_iterator#* iter) |
| 216 | { |
| 217 | oval_collection_iterator_freecxx . . $ oval_collection_iterator_free(ee496816570b41f7).((struct oval_iteratorcxx . . $ oval_iterator#*)iter); |
| 218 | } |
| 219 | |
| 220 | int oval_variable_possible_restriction_iterator_remainingcxx . . $ oval_variable_possible_restriction_iterator_remaining(1408bcdcba34058).(struct oval_variable_possible_restriction_iteratorcxx . . $ oval_variable_possible_restriction_iterator#* iter) |
| 221 | { |
| 222 | return oval_collection_iterator_remainingcxx . . $ oval_collection_iterator_remaining(4404665b78efb7c8).((struct oval_iteratorcxx . . $ oval_iterator#*)iter); |
| 223 | } |
| 224 | |
| 225 | |
| 226 | struct oval_variable_restrictioncxx . . $ oval_variable_restriction# *oval_variable_restriction_newcxx . . $ oval_variable_restriction_new(d160566da18de533).(oval_operation_tcxx . . $ oval_operation_t# operation, const char *value) |
| 227 | { |
| 228 | struct oval_variable_restrictioncxx . . $ oval_variable_restriction# *r; |
| 229 | r = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(oval_variable_restriction_tcxx . . $ oval_variable_restriction_t#)); |
| 230 | r->operationcxx . . $ oval_variable_restriction#operation. = operation; |
| 231 | r->valuecxx . . $ oval_variable_restriction#value. = oscap_strdupcxx . . $ oscap_strdup(a8b8e32347182212).(value); |
| 232 | return r; |
| 233 | } |
| 234 | |
| 235 | void oval_variable_restriction_freecxx . . $ oval_variable_restriction_free(4f51a6c1d47fcc24).(struct oval_variable_restrictioncxx . . $ oval_variable_restriction# *r) |
| 236 | { |
| 237 | if (r != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 238 | freecxx . . $ free(5d22bdacc48458e8).(r->valuecxx . . $ oval_variable_restriction#value.); |
| 239 | freecxx . . $ free(5d22bdacc48458e8).(r); |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | oval_operation_tcxx . . $ oval_operation_t# oval_variable_restriction_get_operationcxx . . $ oval_variable_restriction_get_operation(8640e34feb1ecabc).(struct oval_variable_restrictioncxx . . $ oval_variable_restriction#* restriction) |
| 244 | { |
| 245 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(restriction); |
| 246 | |
| 247 | return restriction->operationcxx . . $ oval_variable_restriction#operation.; |
| 248 | } |
| 249 | |
| 250 | char* oval_variable_restriction_get_valuecxx . . $ oval_variable_restriction_get_value(e72c5c5c6757cd6f).(struct oval_variable_restrictioncxx . . $ oval_variable_restriction#* restriction) |
| 251 | { |
| 252 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(restriction); |
| 253 | |
| 254 | return restriction->valuecxx . . $ oval_variable_restriction#value.; |
| 255 | } |
| 256 | |
| 257 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! oval_variable_restriction_iterator_has_morecxx . . $ oval_variable_restriction_iterator_has_more(8a84167113efc7dd).(struct oval_variable_restriction_iteratorcxx . . $ oval_variable_restriction_iterator#* iter) |
| 258 | { |
| 259 | return oval_collection_iterator_has_morecxx . . $ oval_collection_iterator_has_more(de0650ab9b639739).((struct oval_iteratorcxx . . $ oval_iterator#*)iter); |
| 260 | } |
| 261 | |
| 262 | struct oval_variable_restrictioncxx . . $ oval_variable_restriction#* oval_variable_restriction_iterator_nextcxx . . $ oval_variable_restriction_iterator_next(71fa3a19a77a7cb6).(struct oval_variable_restriction_iteratorcxx . . $ oval_variable_restriction_iterator#* iter) |
| 263 | { |
| 264 | return (struct oval_variable_restrictioncxx . . $ oval_variable_restriction#*)oval_collection_iterator_nextcxx . . $ oval_collection_iterator_next(344074693c9690a9).((struct oval_iteratorcxx . . $ oval_iterator#*)iter); |
| 265 | } |
| 266 | |
| 267 | void oval_variable_restriction_iterator_freecxx . . $ oval_variable_restriction_iterator_free(ed17154888844d38).(struct oval_variable_restriction_iteratorcxx . . $ oval_variable_restriction_iterator#* iter) |
| 268 | { |
| 269 | oval_collection_iterator_freecxx . . $ oval_collection_iterator_free(ee496816570b41f7).((struct oval_iteratorcxx . . $ oval_iterator#*)iter); |
| 270 | } |
| 271 | |
| 272 | int oval_variable_restriction_iterator_remainingcxx . . $ oval_variable_restriction_iterator_remaining(1eb26c7332c0ec4d).(struct oval_variable_restriction_iteratorcxx . . $ oval_variable_restriction_iterator#* iter) |
| 273 | { |
| 274 | return oval_collection_iterator_remainingcxx . . $ oval_collection_iterator_remaining(4404665b78efb7c8).((struct oval_iteratorcxx . . $ oval_iterator#*)iter); |
| 275 | } |
| 276 | |
| 277 | |
| 278 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! oval_variable_iterator_has_morecxx . . $ oval_variable_iterator_has_more(724287895a243b53).(struct oval_variable_iteratorcxx . . $ oval_variable_iterator# |
| 279 | *oc_variable) |
| 280 | { |
| 281 | return oval_collection_iterator_has_morecxx . . $ oval_collection_iterator_has_more(de0650ab9b639739).((struct oval_iteratorcxx . . $ oval_iterator# *) |
| 282 | oc_variable); |
| 283 | } |
| 284 | |
| 285 | struct oval_variablecxx . . $ oval_variable# *oval_variable_iterator_nextcxx . . $ oval_variable_iterator_next(bb0fe9a232eabd1b).(struct |
| 286 | oval_variable_iteratorcxx . . $ oval_variable_iterator# |
| 287 | *oc_variable) |
| 288 | { |
| 289 | return (struct oval_variablecxx . . $ oval_variable# *) |
| 290 | oval_collection_iterator_nextcxx . . $ oval_collection_iterator_next(344074693c9690a9).((struct oval_iteratorcxx . . $ oval_iterator# *)oc_variable); |
| 291 | } |
| 292 | |
| 293 | void oval_variable_iterator_freecxx . . $ oval_variable_iterator_free(28c60577870efae1).(struct |
| 294 | oval_variable_iteratorcxx . . $ oval_variable_iterator# |
| 295 | *oc_variable) |
| 296 | { |
| 297 | oval_collection_iterator_freecxx . . $ oval_collection_iterator_free(ee496816570b41f7).((struct oval_iteratorcxx . . $ oval_iterator# *)oc_variable); |
| 298 | } |
| 299 | |
| 300 | char *oval_variable_get_idcxx . . $ oval_variable_get_id(341a3c7e6ea3818b).(struct oval_variablecxx . . $ oval_variable# *variable) |
| 301 | { |
| 302 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(variable); |
| 303 | |
| 304 | return variable->idcxx . . $ oval_variable#id.; |
| 305 | } |
| 306 | |
| 307 | char *oval_variable_get_commentcxx . . $ oval_variable_get_comment(341a3c7e6ea3818b).(struct oval_variablecxx . . $ oval_variable# *variable) |
| 308 | { |
| 309 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(variable); |
| 310 | |
| 311 | return variable->commentcxx . . $ oval_variable#comment.; |
| 312 | } |
| 313 | |
| 314 | int oval_variable_get_versioncxx . . $ oval_variable_get_version(f6706f9e6ffb58be).(struct oval_variablecxx . . $ oval_variable# *variable) |
| 315 | { |
| 316 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(variable); |
| 317 | |
| 318 | return variable->versioncxx . . $ oval_variable#version.; |
| 319 | } |
| 320 | |
| 321 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! oval_variable_get_deprecatedcxx . . $ oval_variable_get_deprecated(1ba74696f4b5cdca).(struct oval_variablecxx . . $ oval_variable# * variable) |
| 322 | { |
| 323 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(variable); |
| 324 | |
| 325 | return variable->deprecatedcxx . . $ oval_variable#deprecated.; |
| 326 | } |
| 327 | |
| 328 | oval_variable_type_tcxx . . $ oval_variable_type_t# oval_variable_get_typecxx . . $ oval_variable_get_type(eb4d8c3228dab61c).(struct oval_variablecxx . . $ oval_variable# * variable) |
| 329 | { |
| 330 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(variable); |
| 331 | |
| 332 | return variable->typecxx . . $ oval_variable#type.; |
| 333 | } |
| 334 | |
| 335 | oval_datatype_tcxx . . $ oval_datatype_t# oval_variable_get_datatypecxx . . $ oval_variable_get_datatype(2e3f1ca3e300175b).(struct oval_variablecxx . . $ oval_variable# * variable) |
| 336 | { |
| 337 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(variable); |
| 338 | |
| 339 | return variable->datatypecxx . . $ oval_variable#datatype.; |
| 340 | } |
| 341 | |
| 342 | struct oval_value_iteratorcxx . . $ oval_value_iterator# *oval_variable_get_valuescxx . . $ oval_variable_get_values(325344158909f348).(struct oval_variablecxx . . $ oval_variable# *variable) |
| 343 | { |
| 344 | struct oval_collectioncxx . . $ oval_collection# *values; |
| 345 | |
| 346 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(variable); |
| 347 | |
| 348 | switch (variable->typecxx . . $ oval_variable#type.) { |
| 349 | case OVAL_VARIABLE_EXTERNALcxx . . $ OVAL_VARIABLE_EXTERNAL.: { |
| 350 | oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *var = (oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *) variable; |
| 351 | |
| 352 | values = var->values_refcxx . . $ $anonymous_type_8adf2bafb46b4f65_1#values_ref.; |
| 353 | break; |
| 354 | } |
| 355 | case OVAL_VARIABLE_CONSTANTcxx . . $ OVAL_VARIABLE_CONSTANT.: { |
| 356 | oval_variable_CONSTANT_tcxx . . $ oval_variable_CONSTANT_t# *var = (oval_variable_CONSTANT_tcxx . . $ oval_variable_CONSTANT_t# *) variable; |
| 357 | |
| 358 | values = var->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_0#values.; |
| 359 | break; |
| 360 | } |
| 361 | case OVAL_VARIABLE_LOCALcxx . . $ OVAL_VARIABLE_LOCAL.: { |
| 362 | oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *var = (oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *) variable; |
| 363 | |
| 364 | values = var->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_2#values.; |
| 365 | break; |
| 366 | } |
| 367 | default: |
| 368 | values = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 369 | break; |
| 370 | } |
| 371 | |
| 372 | return (values) ? (struct oval_value_iteratorcxx . . $ oval_value_iterator# *) oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(values) : |
| 373 | (struct oval_value_iteratorcxx . . $ oval_value_iterator# *) oval_collection_iterator_newcxx . . $ oval_collection_iterator_new(b73131c625ff44d1).(); |
| 374 | } |
| 375 | |
| 376 | struct oval_variable_possible_value_iteratorcxx . . $ oval_variable_possible_value_iterator# *oval_variable_get_possible_values2cxx . . $ oval_variable_get_possible_values2(d59eb406233e583d).(struct oval_variablecxx . . $ oval_variable# *variable) |
| 377 | { |
| 378 | if (variable->typecxx . . $ oval_variable#type. == OVAL_VARIABLE_EXTERNALcxx . . $ OVAL_VARIABLE_EXTERNAL.) { |
| 379 | oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *var = (oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *) variable; |
| 380 | return (struct oval_variable_possible_value_iteratorcxx . . $ oval_variable_possible_value_iterator#*)oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(var->possible_valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_1#possible_values.); |
| 381 | } else { |
| 382 | return (struct oval_variable_possible_value_iteratorcxx . . $ oval_variable_possible_value_iterator#*)oval_collection_iterator_newcxx . . $ oval_collection_iterator_new(b73131c625ff44d1).(); |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | struct oval_variable_possible_restriction_iteratorcxx . . $ oval_variable_possible_restriction_iterator# *oval_variable_get_possible_restrictions2cxx . . $ oval_variable_get_possible_restrictions2(da9d02eb7f44dec9).(struct oval_variablecxx . . $ oval_variable# *variable) |
| 387 | { |
| 388 | if (variable->typecxx . . $ oval_variable#type. == OVAL_VARIABLE_EXTERNALcxx . . $ OVAL_VARIABLE_EXTERNAL.) { |
| 389 | oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *var = (oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *) variable; |
| 390 | return (struct oval_variable_possible_restriction_iteratorcxx . . $ oval_variable_possible_restriction_iterator#*)oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(var->possible_restrictionscxx . . $ $anonymous_type_8adf2bafb46b4f65_1#possible_restrictions.); |
| 391 | } else { |
| 392 | return (struct oval_variable_possible_restriction_iteratorcxx . . $ oval_variable_possible_restriction_iterator#*)oval_collection_iterator_newcxx . . $ oval_collection_iterator_new(b73131c625ff44d1).(); |
| 393 | } |
| 394 | } |
| 395 | |
| 396 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! oval_variable_contains_valuecxx . . $ oval_variable_contains_value(ee8f194d299722e1).(struct oval_variablecxx . . $ oval_variable# *variable, const char* o_value_text) |
| 397 | { |
| 398 | if (variable == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 399 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 400 | struct oval_value_iteratorcxx . . $ oval_value_iterator# *value_it = oval_variable_get_valuescxx . . $ oval_variable_get_values(325344158909f348).(variable); |
| 401 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! found = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 402 | while (!found && oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(value_it)) { |
| 403 | struct oval_valuecxx . . $ oval_value# *value = oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(value_it); |
| 404 | if (oscap_streqcxx . . $ oscap_streq(b7a7aa4a824b7595).(oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(value), o_value_text)) |
| 405 | found = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 406 | } |
| 407 | oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(value_it); |
| 408 | return found; |
| 409 | } |
| 410 | |
| 411 | oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# oval_variable_get_collection_flagcxx . . $ oval_variable_get_collection_flag(e1154c96d0101da8).(struct oval_variablecxx . . $ oval_variable# *variable) { |
| 412 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(variable); |
| 413 | |
| 414 | return variable->flagcxx . . $ oval_variable#flag.; |
| 415 | } |
| 416 | |
| 417 | int oval_syschar_model_compute_variablecxx . . $ oval_syschar_model_compute_variable(64fb93a449c1c5bc).(struct oval_syschar_modelcxx . . $ oval_syschar_model# *sysmod, struct oval_variablecxx . . $ oval_variable# *variable) |
| 418 | { |
| 419 | oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *var; |
| 420 | struct oval_componentcxx . . $ oval_component# *component; |
| 421 | struct oval_value_iteratorcxx . . $ oval_value_iterator# *val_itr; |
| 422 | |
| 423 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(variable); |
| 424 | |
| 425 | if (variable->typecxx . . $ oval_variable#type. != OVAL_VARIABLE_LOCALcxx . . $ OVAL_VARIABLE_LOCAL.) |
| 426 | return 0; |
| 427 | |
| 428 | var = (oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *) variable; |
| 429 | if (var->flagcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#flag. != SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN.) |
| 430 | return 0; |
| 431 | |
| 432 | component = var->componentcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#component.; |
| 433 | if (component) { |
| 434 | if (!var->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_2#values.) |
| 435 | var->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_2#values. = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).(); |
| 436 | var->flagcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#flag. = oval_component_computecxx . . $ oval_component_compute(84e38aa81702685c).(sysmod, component, var->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_2#values.); |
| 437 | } else { |
| 438 | dWcxx . . $ `src/common/debug_priv.h:62:9`!("NULL component bound to a variable, id: %s.", var->id); |
| 439 | return -1; |
| 440 | } |
| 441 | |
| 442 | switch (var->flagcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#flag.) { |
| 443 | case SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.: |
| 444 | case SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.: |
| 445 | break; |
| 446 | default: |
| 447 | return 0; |
| 448 | } |
| 449 | |
| 450 | val_itr = oval_variable_get_valuescxx . . $ oval_variable_get_values(325344158909f348).(variable); |
| 451 | if (!oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(val_itr)) |
| 452 | var->flagcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#flag. = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 453 | oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(val_itr); |
| 454 | |
| 455 | return 0; |
| 456 | } |
| 457 | |
| 458 | static int _dump_variable_valuescxx . . $ _dump_variable_values(f6706f9e6ffb58be).(struct oval_variablecxx . . $ oval_variable# *variable) |
| 459 | { |
| 460 | if (variable->flagcxx . . $ oval_variable#flag. != SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE. && variable->flagcxx . . $ oval_variable#flag. != SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.) { |
| 461 | dIcxx . . $ `src/common/debug_priv.h:61:9`!("Variable '%s' has no values.", variable->id); |
| 462 | return 0; |
| 463 | } |
| 464 | |
| 465 | struct oval_value_iteratorcxx . . $ oval_value_iterator# *val_itr = oval_variable_get_valuescxx . . $ oval_variable_get_values(325344158909f348).(variable); |
| 466 | if (!oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(val_itr)) { |
| 467 | oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(val_itr); |
| 468 | return -1; |
| 469 | } |
| 470 | |
| 471 | struct oscap_stringcxx . . $ oscap_string# *val_dump = oscap_string_newcxx . . $ oscap_string_new(a2a7aea7d1de9315).(); |
| 472 | oscap_string_append_charcxx . . $ oscap_string_append_char(10528718cb7e122a).(val_dump, '\"'); |
| 473 | while(1) { |
| 474 | struct oval_valuecxx . . $ oval_value# *val = oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(val_itr); |
| 475 | if (oval_value_castcxx . . $ oval_value_cast(c3c9a672ec64b437).(val, variable->datatypecxx . . $ oval_variable#datatype.) != 0) { |
| 476 | oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(val_itr); |
| 477 | oscap_string_freecxx . . $ oscap_string_free(bf7769a094bde656).(val_dump); |
| 478 | return -1; |
| 479 | } |
| 480 | oscap_string_append_stringcxx . . $ oscap_string_append_string(bdf4962f194308bb).(val_dump, oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(val)); |
| 481 | if (!oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(val_itr)) { |
| 482 | break; |
| 483 | } |
| 484 | oscap_string_append_stringcxx . . $ oscap_string_append_string(bdf4962f194308bb).(val_dump, "\", \""); |
| 485 | } |
| 486 | oscap_string_append_charcxx . . $ oscap_string_append_char(10528718cb7e122a).(val_dump, '\"'); |
| 487 | |
| 488 | dIcxx . . $ `src/common/debug_priv.h:61:9`!("Variable '%s' has values %s.", variable->id, oscap_string_get_cstr(val_dump)); |
| 489 | |
| 490 | oscap_string_freecxx . . $ oscap_string_free(bf7769a094bde656).(val_dump); |
| 491 | oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(val_itr); |
| 492 | |
| 493 | return 0; |
| 494 | } |
| 495 | |
| 496 | #if defined(OVAL_PROBES_ENABLEDcxx . . $ `build/config.h:67:9`!) |
| 497 | int oval_probe_query_variablecxx . . $ oval_probe_query_variable(257bd925b7be383d).(oval_probe_session_tcxx . . $ oval_probe_session_t# *sess, struct oval_variablecxx . . $ oval_variable# *variable) |
| 498 | { |
| 499 | oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *var; |
| 500 | struct oval_componentcxx . . $ oval_component# *component; |
| 501 | |
| 502 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(variable); |
| 503 | |
| 504 | dIcxx . . $ `src/common/debug_priv.h:61:9`!("Querying variable '%s'.", variable->id); |
| 505 | |
| 506 | if (variable->typecxx . . $ oval_variable#type. != OVAL_VARIABLE_LOCALcxx . . $ OVAL_VARIABLE_LOCAL.) { |
| 507 | dIcxx . . $ `src/common/debug_priv.h:61:9`!("Variable '%s' is not local, skipping.", variable->id); |
| 508 | _dump_variable_valuescxx . . $ _dump_variable_values(f6706f9e6ffb58be).(variable); |
| 509 | return 0; |
| 510 | } |
| 511 | |
| 512 | var = (oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *) variable; |
| 513 | if (var->flagcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#flag. != SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN.) |
| 514 | return 0; |
| 515 | |
| 516 | component = var->componentcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#component.; |
| 517 | if (component) { |
| 518 | if (!var->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_2#values.) |
| 519 | var->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_2#values. = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).(); |
| 520 | var->flagcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#flag. = oval_component_querycxx . . $ oval_component_query(5150778455fe2266).(sess, component, var->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_2#values.); |
| 521 | } else { |
| 522 | dWcxx . . $ `src/common/debug_priv.h:62:9`!("NULL component bound to a variable, id: %s.", var->id); |
| 523 | return -1; |
| 524 | } |
| 525 | |
| 526 | if (_dump_variable_valuescxx . . $ _dump_variable_values(f6706f9e6ffb58be).(variable) != 0) { |
| 527 | var->flagcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#flag. = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 528 | } |
| 529 | return 0; |
| 530 | } |
| 531 | #endif /* OVAL_PROBES_ENABLED */ |
| 532 | |
| 533 | struct oval_componentcxx . . $ oval_component# *oval_variable_get_componentcxx . . $ oval_variable_get_component(f8f785e0ab2d2d13).(struct oval_variablecxx . . $ oval_variable# *variable) |
| 534 | { |
| 535 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(variable); |
| 536 | |
| 537 | /*type==OVAL_VARIABLE_LOCAL */ |
| 538 | struct oval_componentcxx . . $ oval_component# *component = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 539 | if (oval_variable_get_typecxx . . $ oval_variable_get_type(eb4d8c3228dab61c).(variable) == OVAL_VARIABLE_LOCALcxx . . $ OVAL_VARIABLE_LOCAL.) { |
| 540 | oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *local = (oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *) variable; |
| 541 | component = local->componentcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#component.; |
| 542 | } |
| 543 | return component; |
| 544 | } |
| 545 | |
| 546 | /* failed - NULL |
| 547 | * success - oval_variable |
| 548 | * */ |
| 549 | struct oval_variablecxx . . $ oval_variable# *oval_variable_newcxx . . $ oval_variable_new(d0b65e206dc01f0d).(struct oval_definition_modelcxx . . $ oval_definition_model# *model, const char *id, oval_variable_type_tcxx . . $ oval_variable_type_t# type) |
| 550 | { |
| 551 | oval_variable_tcxx . . $ oval_variable_t# *variable; |
| 552 | |
| 553 | switch (type) { |
| 554 | case OVAL_VARIABLE_CONSTANTcxx . . $ OVAL_VARIABLE_CONSTANT.:{ |
| 555 | oval_variable_CONSTANT_tcxx . . $ oval_variable_CONSTANT_t# *cvar; |
| 556 | |
| 557 | variable = (oval_variable_tcxx . . $ oval_variable_t# *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(oval_variable_CONSTANT_tcxx . . $ oval_variable_CONSTANT_t#)); |
| 558 | if (variable == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 559 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 560 | |
| 561 | cvar = (oval_variable_CONSTANT_tcxx . . $ oval_variable_CONSTANT_t# *) variable; |
| 562 | cvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_0#values. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 563 | cvar->flagcxx . . $ $anonymous_type_8adf2bafb46b4f65_0#flag. = SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.; |
| 564 | } |
| 565 | break; |
| 566 | case OVAL_VARIABLE_EXTERNALcxx . . $ OVAL_VARIABLE_EXTERNAL.:{ |
| 567 | oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *evar; |
| 568 | |
| 569 | variable = (oval_variable_tcxx . . $ oval_variable_t# *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t#)); |
| 570 | if (variable == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 571 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 572 | |
| 573 | evar = (oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *) variable; |
| 574 | evar->possible_valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_1#possible_values. = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).(); |
| 575 | evar->possible_restrictionscxx . . $ $anonymous_type_8adf2bafb46b4f65_1#possible_restrictions. = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).(); |
| 576 | evar->values_refcxx . . $ $anonymous_type_8adf2bafb46b4f65_1#values_ref. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 577 | evar->flagcxx . . $ $anonymous_type_8adf2bafb46b4f65_1#flag. = SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.; |
| 578 | } |
| 579 | break; |
| 580 | case OVAL_VARIABLE_LOCALcxx . . $ OVAL_VARIABLE_LOCAL.:{ |
| 581 | oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *lvar; |
| 582 | |
| 583 | variable = (oval_variable_tcxx . . $ oval_variable_t# *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t#)); |
| 584 | if (variable == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 585 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 586 | |
| 587 | lvar = (oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *) variable; |
| 588 | lvar->componentcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#component. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 589 | lvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_2#values. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 590 | lvar->flagcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#flag. = SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN.; |
| 591 | } |
| 592 | break; |
| 593 | case OVAL_VARIABLE_UNKNOWNcxx . . $ OVAL_VARIABLE_UNKNOWN.:{ |
| 594 | variable = (oval_variable_tcxx . . $ oval_variable_t# *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(oval_variable_UNKNOWN_tcxx . . $ oval_variable_UNKNOWN_t#)); |
| 595 | if (variable == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 596 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 597 | |
| 598 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(variable, 0, sizeof(oval_variable_UNKNOWN_tcxx . . $ oval_variable_UNKNOWN_t#)); |
| 599 | }; |
| 600 | break; |
| 601 | default: |
| 602 | oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OVALcxx . . $ `src/common/public/oscap_error.h:61:9`!, "Variable type is not valid: %d.", type); |
| 603 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 604 | } |
| 605 | |
| 606 | variable->modelcxx . . $ oval_variable#model. = model; |
| 607 | variable->idcxx . . $ oval_variable#id. = oscap_strdupcxx . . $ oscap_strdup(a8b8e32347182212).(id); |
| 608 | variable->commentcxx . . $ oval_variable#comment. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 609 | variable->datatypecxx . . $ oval_variable#datatype. = OVAL_DATATYPE_UNKNOWNcxx . . $ OVAL_DATATYPE_UNKNOWN.; |
| 610 | variable->typecxx . . $ oval_variable#type. = type; |
| 611 | |
| 612 | oval_definition_model_add_variablecxx . . $ oval_definition_model_add_variable(660c386410451a98).(model, variable); |
| 613 | |
| 614 | return variable; |
| 615 | } |
| 616 | |
| 617 | struct oval_variablecxx . . $ oval_variable# *oval_variable_clonecxx . . $ oval_variable_clone(f12623c0add04796).(struct oval_definition_modelcxx . . $ oval_definition_model# *new_model, struct oval_variablecxx . . $ oval_variable# *old_variable) { |
| 618 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(old_variable); |
| 619 | |
| 620 | oval_variable_tcxx . . $ oval_variable_t# *new_variable = oval_definition_model_get_variablecxx . . $ oval_definition_model_get_variable(6c0310206537dd28).(new_model, old_variable->idcxx . . $ oval_variable#id.); |
| 621 | if (new_variable == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 622 | new_variable = oval_variable_newcxx . . $ oval_variable_new(d0b65e206dc01f0d).(new_model, old_variable->idcxx . . $ oval_variable#id., old_variable->typecxx . . $ oval_variable#type.); |
| 623 | |
| 624 | oval_variable_set_commentcxx . . $ oval_variable_set_comment(1a51449ec802ce3e).(new_variable, old_variable->commentcxx . . $ oval_variable#comment.); |
| 625 | oval_variable_set_versioncxx . . $ oval_variable_set_version(76e841c0dc3a54fb).(new_variable, old_variable->versioncxx . . $ oval_variable#version.); |
| 626 | oval_variable_set_deprecatedcxx . . $ oval_variable_set_deprecated(950cca5f07135).(new_variable, old_variable->deprecatedcxx . . $ oval_variable#deprecated.); |
| 627 | oval_variable_set_datatypecxx . . $ oval_variable_set_datatype(9c13121d1094f1f7).(new_variable, old_variable->datatypecxx . . $ oval_variable#datatype.); |
| 628 | new_variable->flagcxx . . $ oval_variable#flag. = old_variable->flagcxx . . $ oval_variable#flag.; |
| 629 | |
| 630 | switch (old_variable->typecxx . . $ oval_variable#type.) { |
| 631 | case OVAL_VARIABLE_CONSTANTcxx . . $ OVAL_VARIABLE_CONSTANT.: { |
| 632 | oval_variable_CONSTANT_tcxx . . $ oval_variable_CONSTANT_t# *cvar; |
| 633 | struct oval_value_iteratorcxx . . $ oval_value_iterator# *old_val_itr; |
| 634 | |
| 635 | cvar = (oval_variable_CONSTANT_tcxx . . $ oval_variable_CONSTANT_t# *) new_variable; |
| 636 | old_val_itr = oval_variable_get_valuescxx . . $ oval_variable_get_values(325344158909f348).(old_variable); |
| 637 | if (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(old_val_itr)) |
| 638 | cvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_0#values. = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).(); |
| 639 | while (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(old_val_itr)) { |
| 640 | struct oval_valuecxx . . $ oval_value# *val; |
| 641 | |
| 642 | val = oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(old_val_itr); |
| 643 | val = oval_value_clonecxx . . $ oval_value_clone(5de282da9e151d11).(val); |
| 644 | oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(cvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_0#values., val); |
| 645 | } |
| 646 | oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(old_val_itr); |
| 647 | |
| 648 | break; |
| 649 | } |
| 650 | case OVAL_VARIABLE_EXTERNALcxx . . $ OVAL_VARIABLE_EXTERNAL.: { |
| 651 | oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *evar, *old_evar; |
| 652 | |
| 653 | evar = (oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *) new_variable; |
| 654 | old_evar = (oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *) old_variable; |
| 655 | |
| 656 | struct oval_variable_possible_value_iteratorcxx . . $ oval_variable_possible_value_iterator# *old_pv_itr; |
| 657 | old_pv_itr = oval_variable_get_possible_values2cxx . . $ oval_variable_get_possible_values2(d59eb406233e583d).(old_variable); |
| 658 | while (oval_variable_possible_value_iterator_has_morecxx . . $ oval_variable_possible_value_iterator_has_more(1d6d85faee4d62df).(old_pv_itr)) { |
| 659 | struct oval_variable_possible_valuecxx . . $ oval_variable_possible_value# *old_pv, *new_pv; |
| 660 | old_pv = oval_variable_possible_value_iterator_nextcxx . . $ oval_variable_possible_value_iterator_next(eb9409b946662c73).(old_pv_itr); |
| 661 | new_pv = oval_variable_possible_value_newcxx . . $ oval_variable_possible_value_new(2aecdfcf657d5045).(old_pv->hintcxx . . $ oval_variable_possible_value#hint., old_pv->valuecxx . . $ oval_variable_possible_value#value.); |
| 662 | oval_variable_add_possible_valuecxx . . $ oval_variable_add_possible_value(c982cd45b5dd976a).(new_variable, new_pv); |
| 663 | } |
| 664 | oval_variable_possible_value_iterator_freecxx . . $ oval_variable_possible_value_iterator_free(dcfd2ac1be6e8f47).(old_pv_itr); |
| 665 | |
| 666 | struct oval_variable_possible_restriction_iteratorcxx . . $ oval_variable_possible_restriction_iterator# *old_pr_itr; |
| 667 | old_pr_itr = oval_variable_get_possible_restrictions2cxx . . $ oval_variable_get_possible_restrictions2(da9d02eb7f44dec9).(old_variable); |
| 668 | while (oval_variable_possible_restriction_iterator_has_morecxx . . $ oval_variable_possible_restriction_iterator_has_more(f6f9f4329c6096c).(old_pr_itr)) { |
| 669 | struct oval_variable_possible_restrictioncxx . . $ oval_variable_possible_restriction# *old_pr, *new_pr; |
| 670 | old_pr = oval_variable_possible_restriction_iterator_nextcxx . . $ oval_variable_possible_restriction_iterator_next(6385991630a8f06c).(old_pr_itr); |
| 671 | new_pr = oval_variable_possible_restriction_newcxx . . $ oval_variable_possible_restriction_new(c16fe9a45b3fcd4).(old_pr->operatorcxx . . $ oval_variable_possible_restriction#operator., old_pr->hintcxx . . $ oval_variable_possible_restriction#hint.); |
| 672 | struct oval_variable_restriction_iteratorcxx . . $ oval_variable_restriction_iterator# *old_r_itr; |
| 673 | old_r_itr = oval_variable_possible_restriction_get_restrictions2cxx . . $ oval_variable_possible_restriction_get_restrictions2(ec783004bcbe76c2).(old_pr); |
| 674 | while (oval_variable_restriction_iterator_has_morecxx . . $ oval_variable_restriction_iterator_has_more(8a84167113efc7dd).(old_r_itr)) { |
| 675 | struct oval_variable_restrictioncxx . . $ oval_variable_restriction# *old_r, *new_r; |
| 676 | old_r = oval_variable_restriction_iterator_nextcxx . . $ oval_variable_restriction_iterator_next(71fa3a19a77a7cb6).(old_r_itr); |
| 677 | new_r = oval_variable_restriction_newcxx . . $ oval_variable_restriction_new(d160566da18de533).(old_r->operationcxx . . $ oval_variable_restriction#operation., old_r->valuecxx . . $ oval_variable_restriction#value.); |
| 678 | oval_variable_possible_restriction_add_restrictioncxx . . $ oval_variable_possible_restriction_add_restriction(d6f8919147cdc214).(new_pr, new_r); |
| 679 | } |
| 680 | oval_variable_restriction_iterator_freecxx . . $ oval_variable_restriction_iterator_free(ed17154888844d38).(old_r_itr); |
| 681 | oval_variable_add_possible_restrictioncxx . . $ oval_variable_add_possible_restriction(2decd52f3f5c298b).(new_variable, new_pr); |
| 682 | } |
| 683 | oval_variable_possible_restriction_iterator_freecxx . . $ oval_variable_possible_restriction_iterator_free(a03dad375fbcbfa).(old_pr_itr); |
| 684 | |
| 685 | evar->values_refcxx . . $ $anonymous_type_8adf2bafb46b4f65_1#values_ref. = old_evar->values_refcxx . . $ $anonymous_type_8adf2bafb46b4f65_1#values_ref.; |
| 686 | |
| 687 | break; |
| 688 | } |
| 689 | case OVAL_VARIABLE_LOCALcxx . . $ OVAL_VARIABLE_LOCAL.: { |
| 690 | oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *lvar, *old_lvar; |
| 691 | struct oval_value_iteratorcxx . . $ oval_value_iterator# *old_val_itr; |
| 692 | |
| 693 | lvar = (oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *) new_variable; |
| 694 | old_val_itr = oval_variable_get_valuescxx . . $ oval_variable_get_values(325344158909f348).(old_variable); |
| 695 | if (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(old_val_itr)) |
| 696 | lvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_2#values. = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).(); |
| 697 | while (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(old_val_itr)) { |
| 698 | struct oval_valuecxx . . $ oval_value# *val; |
| 699 | |
| 700 | val = oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(old_val_itr); |
| 701 | val = oval_value_clonecxx . . $ oval_value_clone(5de282da9e151d11).(val); |
| 702 | oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(lvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_2#values., val); |
| 703 | } |
| 704 | oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(old_val_itr); |
| 705 | |
| 706 | old_lvar = (oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *) old_variable; |
| 707 | lvar->componentcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#component. = oval_component_clonecxx . . $ oval_component_clone(a0f4848fdc472584).(new_model, old_lvar->componentcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#component.); |
| 708 | |
| 709 | break; |
| 710 | } |
| 711 | default: |
| 712 | break; |
| 713 | } |
| 714 | } |
| 715 | return new_variable; |
| 716 | } |
| 717 | |
| 718 | void oval_variable_freecxx . . $ oval_variable_free(2d44dca3d9c27958).(struct oval_variablecxx . . $ oval_variable# *variable) |
| 719 | { |
| 720 | if (variable) { |
| 721 | if (variable->idcxx . . $ oval_variable#id.) |
| 722 | freecxx . . $ free(5d22bdacc48458e8).(variable->idcxx . . $ oval_variable#id.); |
| 723 | if (variable->commentcxx . . $ oval_variable#comment.) |
| 724 | freecxx . . $ free(5d22bdacc48458e8).(variable->commentcxx . . $ oval_variable#comment.); |
| 725 | variable->idcxx . . $ oval_variable#id. = variable->commentcxx . . $ oval_variable#comment. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 726 | |
| 727 | switch (variable->typecxx . . $ oval_variable#type.) { |
| 728 | case OVAL_VARIABLE_CONSTANTcxx . . $ OVAL_VARIABLE_CONSTANT.: { |
| 729 | oval_variable_CONSTANT_tcxx . . $ oval_variable_CONSTANT_t# *cvar; |
| 730 | |
| 731 | cvar = (oval_variable_CONSTANT_tcxx . . $ oval_variable_CONSTANT_t# *) variable; |
| 732 | if (cvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_0#values.) |
| 733 | oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(cvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_0#values., (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).); |
| 734 | cvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_0#values. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 735 | |
| 736 | break; |
| 737 | } |
| 738 | case OVAL_VARIABLE_EXTERNALcxx . . $ OVAL_VARIABLE_EXTERNAL.: { |
| 739 | oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *evar; |
| 740 | |
| 741 | evar = (oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *) variable; |
| 742 | oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(evar->possible_valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_1#possible_values., (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_variable_possible_value_freecxx . . $ oval_variable_possible_value_free(7a6ef80798c359dd).); |
| 743 | oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(evar->possible_restrictionscxx . . $ $anonymous_type_8adf2bafb46b4f65_1#possible_restrictions., (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_variable_possible_restriction_freecxx . . $ oval_variable_possible_restriction_free(1f4cc3870a735a53).); |
| 744 | evar->values_refcxx . . $ $anonymous_type_8adf2bafb46b4f65_1#values_ref. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 745 | |
| 746 | break; |
| 747 | } |
| 748 | case OVAL_VARIABLE_LOCALcxx . . $ OVAL_VARIABLE_LOCAL.: { |
| 749 | oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *lvar; |
| 750 | |
| 751 | lvar = (oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *) variable; |
| 752 | if (lvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_2#values.) |
| 753 | oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(lvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_2#values., (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).); |
| 754 | lvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_2#values. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 755 | oval_component_freecxx . . $ oval_component_free(97b0907e4280ed94).(lvar->componentcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#component.); |
| 756 | |
| 757 | break; |
| 758 | } |
| 759 | default: |
| 760 | break; |
| 761 | } |
| 762 | |
| 763 | freecxx . . $ free(5d22bdacc48458e8).(variable); |
| 764 | } |
| 765 | } |
| 766 | |
| 767 | void oval_variable_set_datatypecxx . . $ oval_variable_set_datatype(9c13121d1094f1f7).(struct oval_variablecxx . . $ oval_variable# *variable, oval_datatype_tcxx . . $ oval_datatype_t# datatype) |
| 768 | { |
| 769 | variable->datatypecxx . . $ oval_variable#datatype. = datatype; |
| 770 | } |
| 771 | |
| 772 | void oval_variable_set_typecxx . . $ oval_variable_set_type(6967c6d439ae1198).(struct oval_variablecxx . . $ oval_variable# *variable, oval_variable_type_tcxx . . $ oval_variable_type_t# new_type) |
| 773 | { |
| 774 | if (variable->typecxx . . $ oval_variable#type. != OVAL_VARIABLE_UNKNOWNcxx . . $ OVAL_VARIABLE_UNKNOWN.) { |
| 775 | dEcxx . . $ `src/common/debug_priv.h:63:9`!("Attempt to reset valid variable type, oldtype: %s, newtype: %s.", |
| 776 | oval_variable_type_get_text(variable->type), oval_variable_type_get_text(new_type)); |
| 777 | return; |
| 778 | } |
| 779 | |
| 780 | variable->typecxx . . $ oval_variable#type. = new_type; |
| 781 | |
| 782 | switch (new_type) { |
| 783 | case OVAL_VARIABLE_CONSTANTcxx . . $ OVAL_VARIABLE_CONSTANT.: { |
| 784 | oval_variable_CONSTANT_tcxx . . $ oval_variable_CONSTANT_t# *cvar; |
| 785 | |
| 786 | cvar = (oval_variable_CONSTANT_tcxx . . $ oval_variable_CONSTANT_t# *) variable; |
| 787 | cvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_0#values. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 788 | cvar->flagcxx . . $ $anonymous_type_8adf2bafb46b4f65_0#flag. = SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.; |
| 789 | |
| 790 | break; |
| 791 | } |
| 792 | case OVAL_VARIABLE_EXTERNALcxx . . $ OVAL_VARIABLE_EXTERNAL.: { |
| 793 | oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *evar; |
| 794 | |
| 795 | evar = (oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *) variable; |
| 796 | evar->values_refcxx . . $ $anonymous_type_8adf2bafb46b4f65_1#values_ref. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 797 | evar->possible_valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_1#possible_values. = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).(); |
| 798 | evar->possible_restrictionscxx . . $ $anonymous_type_8adf2bafb46b4f65_1#possible_restrictions. = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).(); |
| 799 | evar->flagcxx . . $ $anonymous_type_8adf2bafb46b4f65_1#flag. = SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.; |
| 800 | |
| 801 | break; |
| 802 | } |
| 803 | case OVAL_VARIABLE_LOCALcxx . . $ OVAL_VARIABLE_LOCAL.: { |
| 804 | oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *lvar; |
| 805 | |
| 806 | lvar = (oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *) variable; |
| 807 | lvar->componentcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#component. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 808 | lvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_2#values. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 809 | lvar->flagcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#flag. = SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN.; |
| 810 | |
| 811 | break; |
| 812 | } |
| 813 | default: |
| 814 | break; |
| 815 | } |
| 816 | } |
| 817 | |
| 818 | void oval_variable_set_commentcxx . . $ oval_variable_set_comment(1a51449ec802ce3e).(struct oval_variablecxx . . $ oval_variable# *variable, char *comm) |
| 819 | { |
| 820 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(variable); |
| 821 | |
| 822 | if (variable->commentcxx . . $ oval_variable#comment. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 823 | freecxx . . $ free(5d22bdacc48458e8).(variable->commentcxx . . $ oval_variable#comment.); |
| 824 | variable->commentcxx . . $ oval_variable#comment. = oscap_strdupcxx . . $ oscap_strdup(a8b8e32347182212).(comm); |
| 825 | |
| 826 | } |
| 827 | |
| 828 | void oval_variable_set_deprecatedcxx . . $ oval_variable_set_deprecated(950cca5f07135).(struct oval_variablecxx . . $ oval_variable# *variable, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! deprecated) |
| 829 | { |
| 830 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(variable); |
| 831 | variable->deprecatedcxx . . $ oval_variable#deprecated. = deprecated; |
| 832 | } |
| 833 | |
| 834 | void oval_variable_set_versioncxx . . $ oval_variable_set_version(76e841c0dc3a54fb).(struct oval_variablecxx . . $ oval_variable# *variable, int version) |
| 835 | { |
| 836 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(variable); |
| 837 | variable->versioncxx . . $ oval_variable#version. = version; |
| 838 | } |
| 839 | |
| 840 | void oval_variable_add_valuecxx . . $ oval_variable_add_value(998f30cd980aad72).(struct oval_variablecxx . . $ oval_variable# *variable, struct oval_valuecxx . . $ oval_value# *value) |
| 841 | { |
| 842 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(variable); |
| 843 | oval_variable_CONSTANT_tcxx . . $ oval_variable_CONSTANT_t# *cvar; |
| 844 | |
| 845 | if (variable->typecxx . . $ oval_variable#type. != OVAL_VARIABLE_CONSTANTcxx . . $ OVAL_VARIABLE_CONSTANT.) |
| 846 | return; |
| 847 | |
| 848 | cvar = (oval_variable_CONSTANT_tcxx . . $ oval_variable_CONSTANT_t# *) variable; |
| 849 | if (!cvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_0#values.) |
| 850 | cvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_0#values. = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).(); |
| 851 | oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(cvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_0#values., value); |
| 852 | cvar->flagcxx . . $ $anonymous_type_8adf2bafb46b4f65_0#flag. = SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.; |
| 853 | } |
| 854 | |
| 855 | void oval_variable_add_possible_valuecxx . . $ oval_variable_add_possible_value(c982cd45b5dd976a).(struct oval_variablecxx . . $ oval_variable# *variable, struct oval_variable_possible_valuecxx . . $ oval_variable_possible_value# *pv) |
| 856 | { |
| 857 | if (variable->typecxx . . $ oval_variable#type. == OVAL_VARIABLE_EXTERNALcxx . . $ OVAL_VARIABLE_EXTERNAL.) { |
| 858 | oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *var = (oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *) variable; |
| 859 | oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(var->possible_valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_1#possible_values., pv); |
| 860 | } |
| 861 | } |
| 862 | |
| 863 | void oval_variable_add_possible_restrictioncxx . . $ oval_variable_add_possible_restriction(2decd52f3f5c298b).(struct oval_variablecxx . . $ oval_variable# *variable, struct oval_variable_possible_restrictioncxx . . $ oval_variable_possible_restriction# *pr) |
| 864 | { |
| 865 | if (variable->typecxx . . $ oval_variable#type. == OVAL_VARIABLE_EXTERNALcxx . . $ OVAL_VARIABLE_EXTERNAL.) { |
| 866 | oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *var = (oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *) variable; |
| 867 | oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(var->possible_restrictionscxx . . $ $anonymous_type_8adf2bafb46b4f65_1#possible_restrictions., pr); |
| 868 | } |
| 869 | } |
| 870 | |
| 871 | void oval_variable_clear_valuescxx . . $ oval_variable_clear_values(2d44dca3d9c27958).(struct oval_variablecxx . . $ oval_variable# *variable) |
| 872 | { |
| 873 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(variable); |
| 874 | |
| 875 | if (variable->typecxx . . $ oval_variable#type. != OVAL_VARIABLE_CONSTANTcxx . . $ OVAL_VARIABLE_CONSTANT. && variable->typecxx . . $ oval_variable#type. != OVAL_VARIABLE_EXTERNALcxx . . $ OVAL_VARIABLE_EXTERNAL.) { |
| 876 | dWcxx . . $ `src/common/debug_priv.h:62:9`!("Wrong variable type for this operation: %d.", variable->type); |
| 877 | return; |
| 878 | } |
| 879 | |
| 880 | switch (variable->typecxx . . $ oval_variable#type.) { |
| 881 | case OVAL_VARIABLE_CONSTANTcxx . . $ OVAL_VARIABLE_CONSTANT.: { |
| 882 | oval_variable_CONSTANT_tcxx . . $ oval_variable_CONSTANT_t# *cvar; |
| 883 | |
| 884 | cvar = (oval_variable_CONSTANT_tcxx . . $ oval_variable_CONSTANT_t# *) variable; |
| 885 | if (cvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_0#values.) { |
| 886 | oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(cvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_0#values., (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).); |
| 887 | cvar->valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_0#values. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 888 | } |
| 889 | cvar->flagcxx . . $ $anonymous_type_8adf2bafb46b4f65_0#flag. = SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.; |
| 890 | |
| 891 | break; |
| 892 | } |
| 893 | case OVAL_VARIABLE_EXTERNALcxx . . $ OVAL_VARIABLE_EXTERNAL.: { |
| 894 | oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *evar; |
| 895 | |
| 896 | evar = (oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *) variable; |
| 897 | evar->values_refcxx . . $ $anonymous_type_8adf2bafb46b4f65_1#values_ref. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 898 | evar->flagcxx . . $ $anonymous_type_8adf2bafb46b4f65_1#flag. = SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.; |
| 899 | |
| 900 | break; |
| 901 | } |
| 902 | default: |
| 903 | break; |
| 904 | } |
| 905 | } |
| 906 | |
| 907 | static int oval_value_satisfies_possible_restrictioncxx . . $ oval_value_satisfies_possible_restriction(4ce987748aa4baa).(struct oval_valuecxx . . $ oval_value# *value, struct oval_variable_possible_restrictioncxx . . $ oval_variable_possible_restriction# *pr) |
| 908 | { |
| 909 | oval_datatype_tcxx . . $ oval_datatype_t# datatype = oval_value_get_datatypecxx . . $ oval_value_get_datatype(9f2201a27f3b3b4).(value); |
| 910 | char *text = oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(value); |
| 911 | oval_operator_tcxx . . $ oval_operator_t# operator = pr->operatorcxx . . $ oval_variable_possible_restriction#operator.; |
| 912 | struct oresultscxx . . $ oresults# results; |
| 913 | ores_clearcxx . . $ ores_clear(35cef2d1a5f4f1bc).(&results); |
| 914 | struct oval_variable_restriction_iteratorcxx . . $ oval_variable_restriction_iterator# *restrictions = oval_variable_possible_restriction_get_restrictions2cxx . . $ oval_variable_possible_restriction_get_restrictions2(ec783004bcbe76c2).(pr); |
| 915 | while (oval_variable_restriction_iterator_has_morecxx . . $ oval_variable_restriction_iterator_has_more(8a84167113efc7dd).(restrictions)) { |
| 916 | struct oval_variable_restrictioncxx . . $ oval_variable_restriction# *r = oval_variable_restriction_iterator_nextcxx . . $ oval_variable_restriction_iterator_next(71fa3a19a77a7cb6).(restrictions); |
| 917 | oval_result_tcxx . . $ oval_result_t# result = oval_str_cmp_strcxx . . $ oval_str_cmp_str(97cba3a0fb0a0268).(r->valuecxx . . $ oval_variable_restriction#value., datatype, text, r->operationcxx . . $ oval_variable_restriction#operation.); |
| 918 | ores_add_rescxx . . $ ores_add_res(a8d562e6ba457016).(&results, result); |
| 919 | } |
| 920 | oval_variable_restriction_iterator_freecxx . . $ oval_variable_restriction_iterator_free(ed17154888844d38).(restrictions); |
| 921 | return (ores_get_result_byoprcxx . . $ ores_get_result_byopr(81735a73c930a9ac).(&results, operator) == OVAL_RESULT_TRUEcxx . . $ OVAL_RESULT_TRUE.); |
| 922 | } |
| 923 | |
| 924 | static int oval_variable_validate_ext_varcxx . . $ oval_variable_validate_ext_var(a962fb93c503e1f9).(oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *var, struct oval_collectioncxx . . $ oval_collection# *oval_values) |
| 925 | { |
| 926 | if (oval_values == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 927 | return 1; |
| 928 | |
| 929 | int retval = 0; |
| 930 | if (!oval_collection_is_emptycxx . . $ oval_collection_is_empty(48e809a55b244f15).(var->possible_valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_1#possible_values.) || |
| 931 | !oval_collection_is_emptycxx . . $ oval_collection_is_empty(48e809a55b244f15).(var->possible_restrictionscxx . . $ $anonymous_type_8adf2bafb46b4f65_1#possible_restrictions.)) { |
| 932 | /* Check that the value of variable is allowed */ |
| 933 | struct oval_iteratorcxx . . $ oval_iterator# *values = oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(oval_values); |
| 934 | while (!retval && oval_collection_iterator_has_morecxx . . $ oval_collection_iterator_has_more(de0650ab9b639739).(values)) { |
| 935 | struct oval_valuecxx . . $ oval_value# *value = oval_collection_iterator_nextcxx . . $ oval_collection_iterator_next(344074693c9690a9).(values); |
| 936 | const char *text = oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(value); |
| 937 | int found = 0; |
| 938 | struct oval_iteratorcxx . . $ oval_iterator# *possible_values = oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(var->possible_valuescxx . . $ $anonymous_type_8adf2bafb46b4f65_1#possible_values.); |
| 939 | while(!found && oval_collection_iterator_has_morecxx . . $ oval_collection_iterator_has_more(de0650ab9b639739).(possible_values)) { |
| 940 | struct oval_variable_possible_valuecxx . . $ oval_variable_possible_value# *pv = oval_collection_iterator_nextcxx . . $ oval_collection_iterator_next(344074693c9690a9).(possible_values); |
| 941 | const char *constraint = pv->valuecxx . . $ oval_variable_possible_value#value.; |
| 942 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(text, constraint) == 0) { |
| 943 | found = 1; |
| 944 | } |
| 945 | } |
| 946 | oval_collection_iterator_freecxx . . $ oval_collection_iterator_free(ee496816570b41f7).(possible_values); |
| 947 | struct oval_iteratorcxx . . $ oval_iterator# *possible_restrictions = oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(var->possible_restrictionscxx . . $ $anonymous_type_8adf2bafb46b4f65_1#possible_restrictions.); |
| 948 | while(!found && oval_collection_iterator_has_morecxx . . $ oval_collection_iterator_has_more(de0650ab9b639739).(possible_restrictions)) { |
| 949 | struct oval_variable_possible_restrictioncxx . . $ oval_variable_possible_restriction# *pr = oval_collection_iterator_nextcxx . . $ oval_collection_iterator_next(344074693c9690a9).(possible_restrictions); |
| 950 | if (oval_value_satisfies_possible_restrictioncxx . . $ oval_value_satisfies_possible_restriction(4ce987748aa4baa).(value, pr)) { |
| 951 | found = 1; |
| 952 | } |
| 953 | } |
| 954 | oval_collection_iterator_freecxx . . $ oval_collection_iterator_free(ee496816570b41f7).(possible_restrictions); |
| 955 | if (!found) { |
| 956 | retval = 1; |
| 957 | } |
| 958 | } |
| 959 | oval_collection_iterator_freecxx . . $ oval_collection_iterator_free(ee496816570b41f7).(values); |
| 960 | } |
| 961 | return retval; |
| 962 | } |
| 963 | |
| 964 | int oval_variable_bind_ext_varcxx . . $ oval_variable_bind_ext_var(c749c20b71fce).(struct oval_variablecxx . . $ oval_variable# *var, struct oval_variable_modelcxx . . $ oval_variable_model# *varmod, char *extvar_id) |
| 965 | { |
| 966 | oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *evar; |
| 967 | |
| 968 | if (var->typecxx . . $ oval_variable#type. != OVAL_VARIABLE_EXTERNALcxx . . $ OVAL_VARIABLE_EXTERNAL.) { |
| 969 | dWcxx . . $ `src/common/debug_priv.h:62:9`!("Attempt to bind a non-external variable, id: %s, type: %s.", var->id, oval_variable_type_get_text(var->type)); |
| 970 | return 2; |
| 971 | } |
| 972 | |
| 973 | evar = (oval_variable_EXTERNAL_tcxx . . $ oval_variable_EXTERNAL_t# *) var; |
| 974 | struct oval_collectioncxx . . $ oval_collection# *values_ref = oval_variable_model_get_values_refcxx . . $ oval_variable_model_get_values_ref(bb110993029e878c).(varmod, extvar_id); |
| 975 | if (oval_variable_validate_ext_varcxx . . $ oval_variable_validate_ext_var(a962fb93c503e1f9).(evar, values_ref)) { |
| 976 | evar->flagcxx . . $ $anonymous_type_8adf2bafb46b4f65_1#flag. = SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.; |
| 977 | return 1; |
| 978 | } else { |
| 979 | evar->values_refcxx . . $ $anonymous_type_8adf2bafb46b4f65_1#values_ref. = values_ref; |
| 980 | evar->flagcxx . . $ $anonymous_type_8adf2bafb46b4f65_1#flag. = SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.; |
| 981 | return 0; |
| 982 | } |
| 983 | } |
| 984 | |
| 985 | void oval_variable_set_componentcxx . . $ oval_variable_set_component(2e7e9a1bf5dfce72).(struct oval_variablecxx . . $ oval_variable# *variable, struct oval_componentcxx . . $ oval_component# *component) |
| 986 | { |
| 987 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(variable); |
| 988 | |
| 989 | if (variable->typecxx . . $ oval_variable#type. == OVAL_VARIABLE_LOCALcxx . . $ OVAL_VARIABLE_LOCAL.) { |
| 990 | oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *local = (oval_variable_LOCAL_tcxx . . $ oval_variable_LOCAL_t# *) variable; |
| 991 | local->componentcxx . . $ $anonymous_type_8adf2bafb46b4f65_2#component. = component; |
| 992 | } |
| 993 | } |
| 994 | |
| 995 | static void _oval_variable_parse_local_tag_component_consumercxx . . $ _oval_variable_parse_local_tag_component_consumer(313cb9b79853794d).(struct oval_componentcxx . . $ oval_component# *component, void *variable) |
| 996 | { |
| 997 | oval_variable_set_componentcxx . . $ oval_variable_set_component(2e7e9a1bf5dfce72).(variable, component); |
| 998 | } |
| 999 | |
| 1000 | static int _oval_variable_parse_local_tagcxx . . $ _oval_variable_parse_local_tag(cf369959597901d1).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader, struct oval_parser_contextcxx . . $ oval_parser_context# *context, void *user) |
| 1001 | { |
| 1002 | struct oval_variablecxx . . $ oval_variable# *variable = (struct oval_variablecxx . . $ oval_variable# *)user; |
| 1003 | xmlCharcxx . . $ xmlChar# *tagname = xmlTextReaderLocalNamecxx . . $ xmlTextReaderLocalName(3322afb275581432).(reader); |
| 1004 | xmlCharcxx . . $ xmlChar# *namespace = xmlTextReaderNamespaceUricxx . . $ xmlTextReaderNamespaceUri(3322afb275581432).(reader); |
| 1005 | int return_code = oval_component_parse_tagcxx . . $ oval_component_parse_tag(43578c87bd82b671).(reader, context, &_oval_variable_parse_local_tag_component_consumercxx . . $ _oval_variable_parse_local_tag_component_consumer(313cb9b79853794d)., variable); |
| 1006 | if (return_code != 0) { |
| 1007 | dWcxx . . $ `src/common/debug_priv.h:62:9`!("Parsing of %s terminated by an error at <%s>, line %d.", variable->id, tagname, xmlTextReaderGetParserLineNumber(reader)); |
| 1008 | } |
| 1009 | freecxx . . $ free(5d22bdacc48458e8).(tagname); |
| 1010 | freecxx . . $ free(5d22bdacc48458e8).(namespace); |
| 1011 | return return_code; |
| 1012 | } |
| 1013 | |
| 1014 | |
| 1015 | static int _oval_variable_parse_restriction_tagcxx . . $ _oval_variable_parse_restriction_tag(cf369959597901d1).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader, struct oval_parser_contextcxx . . $ oval_parser_context# *context, void *user) |
| 1016 | { |
| 1017 | struct oval_variable_possible_restrictioncxx . . $ oval_variable_possible_restriction# *pr = (struct oval_variable_possible_restrictioncxx . . $ oval_variable_possible_restriction# *)user; |
| 1018 | int return_code; |
| 1019 | oval_operation_tcxx . . $ oval_operation_t# operation = oval_operation_parsecxx . . $ oval_operation_parse(a65696f3feb28be6).(reader, "operation", OVAL_OPERATION_EQUALScxx . . $ OVAL_OPERATION_EQUALS.); |
| 1020 | if (xmlTextReaderReadcxx . . $ xmlTextReaderRead(82a242a19623f75).(reader) == 1) { |
| 1021 | char *value = (char *)xmlTextReaderValuecxx . . $ xmlTextReaderValue(3322afb275581432).(reader); |
| 1022 | struct oval_variable_restrictioncxx . . $ oval_variable_restriction# *restriction = oval_variable_restriction_newcxx . . $ oval_variable_restriction_new(d160566da18de533).(operation, value); |
| 1023 | oval_variable_possible_restriction_add_restrictioncxx . . $ oval_variable_possible_restriction_add_restriction(d6f8919147cdc214).(pr, restriction); |
| 1024 | return_code = 0; |
| 1025 | freecxx . . $ free(5d22bdacc48458e8).(value); |
| 1026 | } else { |
| 1027 | return_code = 1; |
| 1028 | } |
| 1029 | return return_code; |
| 1030 | } |
| 1031 | |
| 1032 | static int _oval_variable_parse_external_tagcxx . . $ _oval_variable_parse_external_tag(cf369959597901d1).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader, struct oval_parser_contextcxx . . $ oval_parser_context# *context, void *user) |
| 1033 | { |
| 1034 | struct oval_variablecxx . . $ oval_variable# *variable = (struct oval_variablecxx . . $ oval_variable# *)user; |
| 1035 | char *tagname = (char *) xmlTextReaderLocalNamecxx . . $ xmlTextReaderLocalName(3322afb275581432).(reader); |
| 1036 | char *namespace = (char *) xmlTextReaderNamespaceUricxx . . $ xmlTextReaderNamespaceUri(3322afb275581432).(reader); |
| 1037 | int return_code; |
| 1038 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "possible_value") == 0) { |
| 1039 | char *hint = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "hint"); |
| 1040 | if (xmlTextReaderReadcxx . . $ xmlTextReaderRead(82a242a19623f75).(reader) == 1) { |
| 1041 | char *value = (char *)xmlTextReaderValuecxx . . $ xmlTextReaderValue(3322afb275581432).(reader); |
| 1042 | struct oval_variable_possible_valuecxx . . $ oval_variable_possible_value# *pv = oval_variable_possible_value_newcxx . . $ oval_variable_possible_value_new(2aecdfcf657d5045).(hint, value); |
| 1043 | oval_variable_add_possible_valuecxx . . $ oval_variable_add_possible_value(c982cd45b5dd976a).(variable, pv); |
| 1044 | freecxx . . $ free(5d22bdacc48458e8).(value); |
| 1045 | return_code = 0; |
| 1046 | } else { |
| 1047 | return_code = 1; |
| 1048 | } |
| 1049 | freecxx . . $ free(5d22bdacc48458e8).(hint); |
| 1050 | } else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "possible_restriction") == 0) { |
| 1051 | oval_operator_tcxx . . $ oval_operator_t# operator = oval_operator_parsecxx . . $ oval_operator_parse(68bd3d297b7c50e).(reader, "operator", OVAL_OPERATOR_ANDcxx . . $ OVAL_OPERATOR_AND.); |
| 1052 | char *hint = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "hint"); |
| 1053 | struct oval_variable_possible_restrictioncxx . . $ oval_variable_possible_restriction# *pr = oval_variable_possible_restriction_newcxx . . $ oval_variable_possible_restriction_new(c16fe9a45b3fcd4).(operator, hint); |
| 1054 | oval_variable_add_possible_restrictioncxx . . $ oval_variable_add_possible_restriction(2decd52f3f5c298b).(variable, pr); |
| 1055 | return_code = oval_parser_parse_tagcxx . . $ oval_parser_parse_tag(4eaaf867ce26f59b).(reader, context, _oval_variable_parse_restriction_tagcxx . . $ _oval_variable_parse_restriction_tag(cf369959597901d1)., pr); |
| 1056 | freecxx . . $ free(5d22bdacc48458e8).(hint); |
| 1057 | } else { |
| 1058 | return_code = 1; |
| 1059 | } |
| 1060 | if (return_code != 0) { |
| 1061 | dWcxx . . $ `src/common/debug_priv.h:62:9`!("Parsing of %s terminated by an error at <%s>, line %d.", variable->id, tagname, xmlTextReaderGetParserLineNumber(reader)); |
| 1062 | } |
| 1063 | freecxx . . $ free(5d22bdacc48458e8).(tagname); |
| 1064 | freecxx . . $ free(5d22bdacc48458e8).(namespace); |
| 1065 | return return_code; |
| 1066 | } |
| 1067 | |
| 1068 | #define DEFINITION_NAMESPACEcxx . . $ `src/OVAL/oval_variable.c:1068:9`! "http://oval.mitre.org/XMLSchema/oval-definitions-5" |
| 1069 | |
| 1070 | static void _const_tag_consumercxx . . $ _const_tag_consumer(4ed62f63db8a189a).(struct oval_valuecxx . . $ oval_value# *val, void *user) |
| 1071 | { |
| 1072 | oval_datatype_tcxx . . $ oval_datatype_t# dt; |
| 1073 | |
| 1074 | dt = oval_variable_get_datatypecxx . . $ oval_variable_get_datatype(2e3f1ca3e300175b).(user); |
| 1075 | oval_value_set_datatypecxx . . $ oval_value_set_datatype(7a0d03628f42a32).(val, dt); |
| 1076 | oval_variable_add_valuecxx . . $ oval_variable_add_value(998f30cd980aad72).(user, val); |
| 1077 | } |
| 1078 | |
| 1079 | static int _oval_variable_parse_constant_tagcxx . . $ _oval_variable_parse_constant_tag(cf369959597901d1).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader, struct oval_parser_contextcxx . . $ oval_parser_context# *context, void *user) |
| 1080 | { |
| 1081 | xmlCharcxx . . $ xmlChar# *tagname = xmlTextReaderLocalNamecxx . . $ xmlTextReaderLocalName(3322afb275581432).(reader); |
| 1082 | xmlCharcxx . . $ xmlChar# *namespace = xmlTextReaderNamespaceUricxx . . $ xmlTextReaderNamespaceUri(3322afb275581432).(reader); |
| 1083 | struct oval_variablecxx . . $ oval_variable# *variable = (struct oval_variablecxx . . $ oval_variable# *)user; |
| 1084 | |
| 1085 | if (oscap_strcmpcxx . . $ oscap_strcmp(5ae29d726ae57f88).("value", (char *) tagname) || oscap_strcmpcxx . . $ oscap_strcmp(5ae29d726ae57f88).(DEFINITION_NAMESPACEcxx . . $ `src/OVAL/oval_variable.c:1068:9`!, (char *) namespace)) { |
| 1086 | dWcxx . . $ `src/common/debug_priv.h:62:9`!("Invalid element <%s:%s> in constant variable %s on line %d.", |
| 1087 | namespace, tagname, variable->id, xmlTextReaderGetParserLineNumber(reader)); |
| 1088 | goto out; |
| 1089 | } |
| 1090 | |
| 1091 | oval_value_parse_tagcxx . . $ oval_value_parse_tag(24b85e39d8efe8a).(reader, context, _const_tag_consumercxx . . $ _const_tag_consumer(4ed62f63db8a189a)., variable); |
| 1092 | |
| 1093 | out: |
| 1094 | freecxx . . $ free(5d22bdacc48458e8).(tagname); |
| 1095 | freecxx . . $ free(5d22bdacc48458e8).(namespace); |
| 1096 | return 0; |
| 1097 | } |
| 1098 | |
| 1099 | int oval_variable_parse_tagcxx . . $ oval_variable_parse_tag(cf369959597901d1).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader, struct oval_parser_contextcxx . . $ oval_parser_context# *context, void *usr) |
| 1100 | { |
| 1101 | struct oval_definition_modelcxx . . $ oval_definition_model# *model = context->definition_modelcxx . . $ oval_parser_context#definition_model.; |
| 1102 | char *tagname = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1103 | char *id = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1104 | char *comm = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1105 | char *version = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1106 | int return_code = 0; |
| 1107 | oval_variable_type_tcxx . . $ oval_variable_type_t# type; |
| 1108 | |
| 1109 | tagname = (char *)xmlTextReaderLocalNamecxx . . $ xmlTextReaderLocalName(3322afb275581432).(reader); |
| 1110 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "constant_variable") == 0) |
| 1111 | type = OVAL_VARIABLE_CONSTANTcxx . . $ OVAL_VARIABLE_CONSTANT.; |
| 1112 | else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "external_variable") == 0) |
| 1113 | type = OVAL_VARIABLE_EXTERNALcxx . . $ OVAL_VARIABLE_EXTERNAL.; |
| 1114 | else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "local_variable") == 0) |
| 1115 | type = OVAL_VARIABLE_LOCALcxx . . $ OVAL_VARIABLE_LOCAL.; |
| 1116 | else { |
| 1117 | type = OVAL_VARIABLE_UNKNOWNcxx . . $ OVAL_VARIABLE_UNKNOWN.; |
| 1118 | dWcxx . . $ `src/common/debug_priv.h:62:9`!("Unhandled variable type: %s, line: %d.", tagname, xmlTextReaderGetParserLineNumber(reader)); |
| 1119 | } |
| 1120 | id = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "id"); |
| 1121 | struct oval_variablecxx . . $ oval_variable# *variable = oval_definition_model_get_new_variablecxx . . $ oval_definition_model_get_new_variable(d0b65e206dc01f0d).(model, id, type); |
| 1122 | |
| 1123 | comm = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "comment"); |
| 1124 | if (comm != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1125 | oval_variable_set_commentcxx . . $ oval_variable_set_comment(1a51449ec802ce3e).(variable, comm); |
| 1126 | } |
| 1127 | |
| 1128 | int deprecated = oval_parser_boolean_attributecxx . . $ oval_parser_boolean_attribute(a53adaee35698733).(reader, "deprecated", 0); |
| 1129 | oval_variable_set_deprecatedcxx . . $ oval_variable_set_deprecated(950cca5f07135).(variable, deprecated); |
| 1130 | |
| 1131 | version = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "version"); |
| 1132 | oval_variable_set_versioncxx . . $ oval_variable_set_version(76e841c0dc3a54fb).(variable, atoicxx . . $ atoi(5c4306d8553b3696).(version)); |
| 1133 | |
| 1134 | oval_datatype_tcxx . . $ oval_datatype_t# datatype = oval_datatype_parsecxx . . $ oval_datatype_parse(439a79c16bdf367b).(reader, "datatype", OVAL_DATATYPE_UNKNOWNcxx . . $ OVAL_DATATYPE_UNKNOWN.); |
| 1135 | oval_variable_set_datatypecxx . . $ oval_variable_set_datatype(9c13121d1094f1f7).(variable, datatype); |
| 1136 | |
| 1137 | switch (type) { |
| 1138 | case OVAL_VARIABLE_CONSTANTcxx . . $ OVAL_VARIABLE_CONSTANT.:{ |
| 1139 | return_code = oval_parser_parse_tagcxx . . $ oval_parser_parse_tag(4eaaf867ce26f59b).(reader, context, _oval_variable_parse_constant_tagcxx . . $ _oval_variable_parse_constant_tag(cf369959597901d1)., variable); |
| 1140 | } |
| 1141 | break; |
| 1142 | case OVAL_VARIABLE_LOCALcxx . . $ OVAL_VARIABLE_LOCAL.:{ |
| 1143 | return_code = oval_parser_parse_tagcxx . . $ oval_parser_parse_tag(4eaaf867ce26f59b).(reader, context, _oval_variable_parse_local_tagcxx . . $ _oval_variable_parse_local_tag(cf369959597901d1)., variable); |
| 1144 | } |
| 1145 | break; |
| 1146 | case OVAL_VARIABLE_EXTERNALcxx . . $ OVAL_VARIABLE_EXTERNAL.:{ |
| 1147 | return_code = oval_parser_parse_tagcxx . . $ oval_parser_parse_tag(4eaaf867ce26f59b).(reader, context, _oval_variable_parse_external_tagcxx . . $ _oval_variable_parse_external_tag(cf369959597901d1)., variable); |
| 1148 | break; |
| 1149 | } |
| 1150 | default: |
| 1151 | return_code = 1; |
| 1152 | } |
| 1153 | |
| 1154 | freecxx . . $ free(5d22bdacc48458e8).(tagname); |
| 1155 | freecxx . . $ free(5d22bdacc48458e8).(id); |
| 1156 | freecxx . . $ free(5d22bdacc48458e8).(comm); |
| 1157 | freecxx . . $ free(5d22bdacc48458e8).(version); |
| 1158 | |
| 1159 | return return_code; |
| 1160 | } |
| 1161 | |
| 1162 | static xmlNodecxx . . $ xmlNode# *_oval_VARIABLE_CONSTANT_to_domcxx . . $ _oval_VARIABLE_CONSTANT_to_dom(d067d931851fc55b).(struct oval_variablecxx . . $ oval_variable# *variable, xmlDoccxx . . $ xmlDoc# * doc, xmlNodecxx . . $ xmlNode# * parent) { |
| 1163 | xmlNscxx . . $ xmlNs# *ns_definitions = xmlSearchNsByHrefcxx . . $ xmlSearchNsByHref(d0fb0b6b99319c4).(doc, parent, OVAL_DEFINITIONS_NAMESPACEcxx . . $ `src/OVAL/oval_agent_api_impl.h:50:9`!); |
| 1164 | xmlNodecxx . . $ xmlNode# *variable_node = xmlNewTextChildcxx . . $ xmlNewTextChild(4c74f4d7754e7bc8).(parent, ns_definitions, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "constant_variable", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1165 | |
| 1166 | struct oval_value_iteratorcxx . . $ oval_value_iterator# *values = oval_variable_get_valuescxx . . $ oval_variable_get_values(325344158909f348).(variable); |
| 1167 | while (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(values)) { |
| 1168 | struct oval_valuecxx . . $ oval_value# *value = oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(values); |
| 1169 | char *text = oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(value); |
| 1170 | xmlNewTextChildcxx . . $ xmlNewTextChild(4c74f4d7754e7bc8).(variable_node, ns_definitions, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "value", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! text); |
| 1171 | } |
| 1172 | oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(values); |
| 1173 | |
| 1174 | return variable_node; |
| 1175 | } |
| 1176 | |
| 1177 | static xmlNodecxx . . $ xmlNode# *_oval_VARIABLE_EXTERNAL_to_domcxx . . $ _oval_VARIABLE_EXTERNAL_to_dom(d067d931851fc55b).(struct oval_variablecxx . . $ oval_variable# *variable, xmlDoccxx . . $ xmlDoc# * doc, xmlNodecxx . . $ xmlNode# * parent) { |
| 1178 | |
| 1179 | xmlNscxx . . $ xmlNs# *ns_definitions = xmlSearchNsByHrefcxx . . $ xmlSearchNsByHref(d0fb0b6b99319c4).(doc, parent, OVAL_DEFINITIONS_NAMESPACEcxx . . $ `src/OVAL/oval_agent_api_impl.h:50:9`!); |
| 1180 | xmlNodecxx . . $ xmlNode# *variable_node = xmlNewTextChildcxx . . $ xmlNewTextChild(4c74f4d7754e7bc8).(parent, ns_definitions, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "external_variable", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1181 | |
| 1182 | struct oval_variable_possible_value_iteratorcxx . . $ oval_variable_possible_value_iterator# *possible_values = oval_variable_get_possible_values2cxx . . $ oval_variable_get_possible_values2(d59eb406233e583d).(variable); |
| 1183 | while (oval_variable_possible_value_iterator_has_morecxx . . $ oval_variable_possible_value_iterator_has_more(1d6d85faee4d62df).(possible_values)) { |
| 1184 | struct oval_variable_possible_valuecxx . . $ oval_variable_possible_value# *pv = oval_variable_possible_value_iterator_nextcxx . . $ oval_variable_possible_value_iterator_next(eb9409b946662c73).(possible_values); |
| 1185 | xmlNodecxx . . $ xmlNode# *possible_value_node = xmlNewTextChildcxx . . $ xmlNewTextChild(4c74f4d7754e7bc8).(variable_node, ns_definitions, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "possible_value", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! pv->valuecxx . . $ oval_variable_possible_value#value.); |
| 1186 | xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(possible_value_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "hint", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! pv->hintcxx . . $ oval_variable_possible_value#hint.); |
| 1187 | } |
| 1188 | oval_variable_possible_value_iterator_freecxx . . $ oval_variable_possible_value_iterator_free(dcfd2ac1be6e8f47).(possible_values); |
| 1189 | |
| 1190 | oval_schema_version_tcxx . . $ oval_schema_version_t# schema_version = oval_definition_model_get_core_schema_versioncxx . . $ oval_definition_model_get_core_schema_version(5e2dc48a93a33b7c).(variable->modelcxx . . $ oval_variable#model.); |
| 1191 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! serialize_operator = oval_schema_version_cmpcxx . . $ oval_schema_version_cmp(b4d0c2bfb97f274f).(schema_version, OVAL_SCHEMA_VERSIONcxx . . $ `src/OVAL/public/oval_schema_version.h:39:9`!(5.11)) >= 0; |
| 1192 | struct oval_variable_possible_restriction_iteratorcxx . . $ oval_variable_possible_restriction_iterator# *possible_restrictions = oval_variable_get_possible_restrictions2cxx . . $ oval_variable_get_possible_restrictions2(da9d02eb7f44dec9).(variable); |
| 1193 | while (oval_variable_possible_restriction_iterator_has_morecxx . . $ oval_variable_possible_restriction_iterator_has_more(f6f9f4329c6096c).(possible_restrictions)) { |
| 1194 | struct oval_variable_possible_restrictioncxx . . $ oval_variable_possible_restriction# *pr = oval_variable_possible_restriction_iterator_nextcxx . . $ oval_variable_possible_restriction_iterator_next(6385991630a8f06c).(possible_restrictions); |
| 1195 | struct oval_variable_restriction_iteratorcxx . . $ oval_variable_restriction_iterator# *restrictions = oval_variable_possible_restriction_get_restrictions2cxx . . $ oval_variable_possible_restriction_get_restrictions2(ec783004bcbe76c2).(pr); |
| 1196 | /* Create "possible_restriction" node only if there will be some |
| 1197 | * "restriction" children, because each "possible_restriction" |
| 1198 | * node must have at least one "restriction" child. |
| 1199 | */ |
| 1200 | if (oval_variable_restriction_iterator_has_morecxx . . $ oval_variable_restriction_iterator_has_more(8a84167113efc7dd).(restrictions)) { |
| 1201 | xmlNodecxx . . $ xmlNode# *possible_restriction_node = xmlNewTextChildcxx . . $ xmlNewTextChild(4c74f4d7754e7bc8).(variable_node, ns_definitions, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "possible_restriction", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1202 | /* Attribute "operator" is new in OVAL 5.11, we don't serialize it in older OVAL versions */ |
| 1203 | if (serialize_operator) { |
| 1204 | xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(possible_restriction_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "operator", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! oval_operator_get_textcxx . . $ oval_operator_get_text(31e5cd98682f5d2e).(pr->operatorcxx . . $ oval_variable_possible_restriction#operator.)); |
| 1205 | } |
| 1206 | xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(possible_restriction_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "hint", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! pr->hintcxx . . $ oval_variable_possible_restriction#hint.); |
| 1207 | while (oval_variable_restriction_iterator_has_morecxx . . $ oval_variable_restriction_iterator_has_more(8a84167113efc7dd).(restrictions)) { |
| 1208 | struct oval_variable_restrictioncxx . . $ oval_variable_restriction# *r = oval_variable_restriction_iterator_nextcxx . . $ oval_variable_restriction_iterator_next(71fa3a19a77a7cb6).(restrictions); |
| 1209 | xmlNodecxx . . $ xmlNode# *restriction_node = xmlNewTextChildcxx . . $ xmlNewTextChild(4c74f4d7754e7bc8).(possible_restriction_node, ns_definitions, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "restriction", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! r->valuecxx . . $ oval_variable_restriction#value.); |
| 1210 | xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(restriction_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "operation", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! oval_operation_get_textcxx . . $ oval_operation_get_text(bf6188043a942ccf).(r->operationcxx . . $ oval_variable_restriction#operation.)); |
| 1211 | } |
| 1212 | } |
| 1213 | oval_variable_restriction_iterator_freecxx . . $ oval_variable_restriction_iterator_free(ed17154888844d38).(restrictions); |
| 1214 | } |
| 1215 | oval_variable_possible_restriction_iterator_freecxx . . $ oval_variable_possible_restriction_iterator_free(a03dad375fbcbfa).(possible_restrictions); |
| 1216 | |
| 1217 | return variable_node; |
| 1218 | } |
| 1219 | |
| 1220 | static xmlNodecxx . . $ xmlNode# *_oval_VARIABLE_LOCAL_to_domcxx . . $ _oval_VARIABLE_LOCAL_to_dom(d067d931851fc55b).(struct oval_variablecxx . . $ oval_variable# *variable, xmlDoccxx . . $ xmlDoc# * doc, xmlNodecxx . . $ xmlNode# * parent) { |
| 1221 | xmlNscxx . . $ xmlNs# *ns_definitions = xmlSearchNsByHrefcxx . . $ xmlSearchNsByHref(d0fb0b6b99319c4).(doc, parent, OVAL_DEFINITIONS_NAMESPACEcxx . . $ `src/OVAL/oval_agent_api_impl.h:50:9`!); |
| 1222 | xmlNodecxx . . $ xmlNode# *variable_node = xmlNewTextChildcxx . . $ xmlNewTextChild(4c74f4d7754e7bc8).(parent, ns_definitions, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "local_variable", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1223 | |
| 1224 | struct oval_componentcxx . . $ oval_component# *component = oval_variable_get_componentcxx . . $ oval_variable_get_component(f8f785e0ab2d2d13).(variable); |
| 1225 | oval_component_to_domcxx . . $ oval_component_to_dom(196ec219b578179).(component, doc, variable_node); |
| 1226 | |
| 1227 | return variable_node; |
| 1228 | } |
| 1229 | |
| 1230 | xmlNodecxx . . $ xmlNode# *oval_variable_to_domcxx . . $ oval_variable_to_dom(d067d931851fc55b).(struct oval_variablecxx . . $ oval_variable# * variable, xmlDoccxx . . $ xmlDoc# * doc, xmlNodecxx . . $ xmlNode# * parent) |
| 1231 | { |
| 1232 | xmlNodecxx . . $ xmlNode# *variable_node = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1233 | switch (oval_variable_get_typecxx . . $ oval_variable_get_type(eb4d8c3228dab61c).(variable)) { |
| 1234 | case OVAL_VARIABLE_CONSTANTcxx . . $ OVAL_VARIABLE_CONSTANT.:{ |
| 1235 | variable_node = _oval_VARIABLE_CONSTANT_to_domcxx . . $ _oval_VARIABLE_CONSTANT_to_dom(d067d931851fc55b).(variable, doc, parent); |
| 1236 | } |
| 1237 | break; |
| 1238 | case OVAL_VARIABLE_EXTERNALcxx . . $ OVAL_VARIABLE_EXTERNAL.:{ |
| 1239 | variable_node = _oval_VARIABLE_EXTERNAL_to_domcxx . . $ _oval_VARIABLE_EXTERNAL_to_dom(d067d931851fc55b).(variable, doc, parent); |
| 1240 | } |
| 1241 | break; |
| 1242 | case OVAL_VARIABLE_LOCALcxx . . $ OVAL_VARIABLE_LOCAL.:{ |
| 1243 | variable_node = _oval_VARIABLE_LOCAL_to_domcxx . . $ _oval_VARIABLE_LOCAL_to_dom(d067d931851fc55b).(variable, doc, parent); |
| 1244 | } |
| 1245 | break; |
| 1246 | default: |
| 1247 | break; |
| 1248 | }; |
| 1249 | |
| 1250 | char *id = oval_variable_get_idcxx . . $ oval_variable_get_id(341a3c7e6ea3818b).(variable); |
| 1251 | xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(variable_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "id", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! id); |
| 1252 | |
| 1253 | char version[10]; |
| 1254 | *version = '\0'; |
| 1255 | snprintfcxx . . $ snprintf(ea502d73e74c754c).(version, sizeof(version), "%d", oval_variable_get_versioncxx . . $ oval_variable_get_version(f6706f9e6ffb58be).(variable)); |
| 1256 | xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(variable_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "version", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! version); |
| 1257 | |
| 1258 | oval_datatype_tcxx . . $ oval_datatype_t# datatype = oval_variable_get_datatypecxx . . $ oval_variable_get_datatype(2e3f1ca3e300175b).(variable); |
| 1259 | xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(variable_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "datatype", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! oval_datatype_get_textcxx . . $ oval_datatype_get_text(a950b89baeb79474).(datatype)); |
| 1260 | |
| 1261 | char *comm = oval_variable_get_commentcxx . . $ oval_variable_get_comment(341a3c7e6ea3818b).(variable); |
| 1262 | xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(variable_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "comment", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! comm); |
| 1263 | |
| 1264 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! deprecated = oval_variable_get_deprecatedcxx . . $ oval_variable_get_deprecated(1ba74696f4b5cdca).(variable); |
| 1265 | if (deprecated) |
| 1266 | xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(variable_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "deprecated", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "true"); |
| 1267 | |
| 1268 | return variable_node; |
| 1269 | } |