| 1 | /** |
| 2 | * @addtogroup PROBEAPI |
| 3 | * @{ |
| 4 | * @file probe-api.c |
| 5 | * @brief Probe API implmentation |
| 6 | * @author "Daniel Kopecek" <[email protected]> |
| 7 | * @author "Tomas Heinrich" <[email protected]> |
| 8 | */ |
| 9 | /* |
| 10 | * Copyright 2009-2011 Red Hat Inc., Durham, North Carolina. |
| 11 | * All Rights Reserved. |
| 12 | * |
| 13 | * This library is free software; you can redistribute it and/or |
| 14 | * modify it under the terms of the GNU Lesser General Public |
| 15 | * License as published by the Free Software Foundation; either |
| 16 | * version 2.1 of the License, or (at your option) any later version. |
| 17 | * |
| 18 | * This library is distributed in the hope that it will be useful, |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 21 | * Lesser General Public License for more details. |
| 22 | * |
| 23 | * You should have received a copy of the GNU Lesser General Public |
| 24 | * License along with this library; if not, write to the Free Software |
| 25 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 26 | * |
| 27 | * Authors: |
| 28 | * Daniel Kopecek <[email protected]> |
| 29 | * Tomas Heinrich <[email protected]> |
| 30 | */ |
| 31 | |
| 32 | #ifdef HAVE_CONFIG_Hcxx . . $ `<built-in>:409:9`! |
| 33 | #include <config.h>cxx . . $ `<file>/build/config.h`/ |
| 34 | #endif |
| 35 | |
| 36 | #include <stdarg.h> |
| 37 | #include <string.h> |
| 38 | #include <stdbool.h> |
| 39 | #include <errno.h> |
| 40 | #ifdef OS_WINDOWS |
| 41 | #include <winsock2.h> |
| 42 | #include <in6addr.h> |
| 43 | #include <ws2tcpip.h> |
| 44 | #else |
| 45 | #include <arpa/inet.h> /* inet_pton() in probe_ent_from_cstr() */ |
| 46 | #include <netinet/in.h> |
| 47 | #include <sys/socket.h> |
| 48 | #endif |
| 49 | |
| 50 | #include "debug_priv.h"cxx . . $ `<file>/src/common/debug_priv.h`/ |
| 51 | #include "_probe-api.h"cxx . . $ `<file>/src/OVAL/probes/_probe-api.h`/ |
| 52 | #include "oval_probe_impl.h"cxx . . $ `<file>/src/OVAL/oval_probe_impl.h`/ |
| 53 | #include "probe/entcmp.h"cxx . . $ `<file>/src/OVAL/probes/probe/entcmp.h`/ |
| 54 | #include "probe/probe.h"cxx . . $ `<file>/src/OVAL/probes/probe/probe.h`/ |
| 55 | #include "SEAP/generic/strto.h"cxx . . $ `<file>/src/OVAL/probes/SEAP/generic/strto.h`/ |
| 56 | #include "oscap_helpers.h"cxx . . $ `<file>/src/common/public/oscap_helpers.h`/ |
| 57 | |
| 58 | extern probe_rcache_tcxx . . $ probe_rcache_t# *OSCAP_GSYMcxx . . $ `src/common/util.h:444:9`!(pcache); |
| 59 | extern probe_ncache_tcxx . . $ probe_ncache_t# *OSCAP_GSYMcxx . . $ `src/common/util.h:444:9`!(ncache); |
| 60 | extern struct id_desc_tcxx . . $ id_desc_t# OSCAP_GSYMcxx . . $ `src/common/util.h:444:9`!(id_desc); |
| 61 | extern probe_option_tcxx . . $ probe_option_t# *OSCAP_GSYMcxx . . $ `src/common/util.h:444:9`!(probe_optdef); |
| 62 | extern size_t OSCAP_GSYMcxx . . $ `src/common/util.h:444:9`!(probe_optdef_count); |
| 63 | |
| 64 | /* |
| 65 | * items |
| 66 | */ |
| 67 | SEXP_tcxx . . $ SEXP_t# *probe_item_creatcxx . . $ probe_item_creat(7fa6a2e8307f6614).(const char *name, SEXP_tcxx . . $ SEXP_t# * attrs, ...) |
| 68 | { |
| 69 | va_listcxx . . $ va_list# ap; |
| 70 | SEXP_tcxx . . $ SEXP_t# *itm, *ns, *val, *ent; |
| 71 | |
| 72 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(ap, attrs); |
| 73 | |
| 74 | itm = probe_item_newcxx . . $ probe_item_new(ca18d10048afa0ff).(name, attrs); |
| 75 | name = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, const char *); |
| 76 | |
| 77 | while (name != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 78 | attrs = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, SEXP_t *); |
| 79 | val = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, SEXP_t *); |
| 80 | |
| 81 | ns = probe_ncache_refcxx . . $ probe_ncache_ref(be2a40239769fba4). (OSCAP_GSYMcxx . . $ `src/common/util.h:444:9`!(ncache), name); |
| 82 | ent = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 83 | |
| 84 | if (attrs != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 85 | SEXP_tcxx . . $ SEXP_t# *nl, *nj; |
| 86 | |
| 87 | nl = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(ns, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 88 | nj = SEXP_list_joincxx . . $ SEXP_list_join(fcf1a664115faa7).(nl, attrs); |
| 89 | |
| 90 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(ent, nj); |
| 91 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(nl); |
| 92 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(nj); |
| 93 | } else |
| 94 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(ent, ns); |
| 95 | |
| 96 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ns); |
| 97 | |
| 98 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(ent, val); |
| 99 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(itm, ent); |
| 100 | |
| 101 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent); |
| 102 | |
| 103 | name = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, const char *); |
| 104 | } |
| 105 | |
| 106 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(ap); |
| 107 | |
| 108 | return (itm); |
| 109 | } |
| 110 | |
| 111 | SEXP_tcxx . . $ SEXP_t# *probe_item_newcxx . . $ probe_item_new(ca18d10048afa0ff).(const char *name, SEXP_tcxx . . $ SEXP_t# * attrs) |
| 112 | { |
| 113 | SEXP_tcxx . . $ SEXP_t# *itm, *sid, *attr; |
| 114 | |
| 115 | /* |
| 116 | * Allocate space for the ID which will be generated |
| 117 | * in the icache worker |
| 118 | */ |
| 119 | sid = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2).("", 0); |
| 120 | attr = probe_attr_creatcxx . . $ probe_attr_creat(5e3fef9c42f0315b).("id", sid, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 121 | |
| 122 | if (attrs != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 123 | attrs = SEXP_list_joincxx . . $ SEXP_list_join(fcf1a664115faa7).(attr, attrs); |
| 124 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(attr); |
| 125 | } else |
| 126 | attrs = attr; |
| 127 | /* |
| 128 | * Objects have the same structure as items. |
| 129 | */ |
| 130 | itm = probe_obj_newcxx . . $ probe_obj_new(ca18d10048afa0ff).(name, attrs); |
| 131 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(sid); |
| 132 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(attrs); |
| 133 | |
| 134 | return itm; |
| 135 | } |
| 136 | |
| 137 | SEXP_tcxx . . $ SEXP_t# *probe_item_attr_addcxx . . $ probe_item_attr_add(733bdcb6a09ce7ed).(SEXP_tcxx . . $ SEXP_t# * item, const char *name, SEXP_tcxx . . $ SEXP_t# * val) |
| 138 | { |
| 139 | SEXP_tcxx . . $ SEXP_t# *n_ref, *ns; |
| 140 | |
| 141 | if (val == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 142 | ns = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2).(name, strlencxx . . $ strlen(751346f8406fd082).(name)); |
| 143 | else |
| 144 | ns = SEXP_string_newfcxx . . $ SEXP_string_newf(b2137ed863725962).(":%s", name); |
| 145 | |
| 146 | n_ref = SEXP_listref_firstcxx . . $ SEXP_listref_first(478b347fcbbad3c5).(item); |
| 147 | |
| 148 | if (SEXP_listpcxx . . $ SEXP_listp(85f078d1f48ac431).(n_ref)) { |
| 149 | /* |
| 150 | * There are already some attributes. |
| 151 | * Just add the new to the list. |
| 152 | */ |
| 153 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(n_ref, ns); |
| 154 | |
| 155 | if (val != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 156 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(n_ref, val); |
| 157 | } else { |
| 158 | /* |
| 159 | * There aren't attributes in this item. |
| 160 | * We need to replace the item name S-exp |
| 161 | * with a list containing the item name |
| 162 | * S-exp and the attribute. |
| 163 | */ |
| 164 | SEXP_tcxx . . $ SEXP_t# *nl; |
| 165 | SEXP_tcxx . . $ SEXP_t# *x_ref; |
| 166 | |
| 167 | x_ref = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(item, 1); |
| 168 | nl = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(x_ref, ns, val, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 169 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(x_ref); |
| 170 | |
| 171 | x_ref = SEXP_list_replacecxx . . $ SEXP_list_replace(e5ee5adb82430ce5).(item, 1, nl); |
| 172 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(x_ref); |
| 173 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(nl); |
| 174 | } |
| 175 | |
| 176 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(n_ref); |
| 177 | |
| 178 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ns); |
| 179 | |
| 180 | return (val); |
| 181 | } |
| 182 | |
| 183 | SEXP_tcxx . . $ SEXP_t# *probe_item_ent_addcxx . . $ probe_item_ent_add(9f488d3b029fc9d1).(SEXP_tcxx . . $ SEXP_t# *item, const char *name, SEXP_tcxx . . $ SEXP_t# *attrs, SEXP_tcxx . . $ SEXP_t# *val) |
| 184 | { |
| 185 | SEXP_tcxx . . $ SEXP_t# *ent; |
| 186 | |
| 187 | ent = probe_ent_creat1cxx . . $ probe_ent_creat1(84b3695e4a0e659a).(name, attrs, val); |
| 188 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(item, ent); |
| 189 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent); |
| 190 | |
| 191 | return (item); |
| 192 | } |
| 193 | |
| 194 | int probe_item_setstatuscxx . . $ probe_item_setstatus(112b785eb420e6c0).(SEXP_tcxx . . $ SEXP_t# *obj, oval_syschar_status_tcxx . . $ oval_syschar_status_t# status) |
| 195 | { |
| 196 | SEXP_tcxx . . $ SEXP_t# *r0; |
| 197 | |
| 198 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(obj != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 199 | |
| 200 | probe_item_attr_addcxx . . $ probe_item_attr_add(733bdcb6a09ce7ed).(obj, "status", r0 = SEXP_number_newi_32cxx . . $ SEXP_number_newi_32(ac44525e09ce977a).((int) status)); |
| 201 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 202 | |
| 203 | return (0); |
| 204 | } |
| 205 | |
| 206 | int probe_itement_setstatuscxx . . $ probe_itement_setstatus(998e25cd01fde21b).(SEXP_tcxx . . $ SEXP_t# *obj, const char *name, uint32_tcxx . . $ uint32_t# n, oval_syschar_status_tcxx . . $ oval_syschar_status_t# status) |
| 207 | { |
| 208 | SEXP_tcxx . . $ SEXP_t# *ent_h, *ent_s, *r0; |
| 209 | |
| 210 | ent_h = probe_item_getentcxx . . $ `src/OVAL/probes/public/probe-api.h:143:9`! (obj, name, n); |
| 211 | ent_s = SEXP_unrefcxx . . $ SEXP_unref(478b347fcbbad3c5). (ent_h); |
| 212 | |
| 213 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(ent_s != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 214 | |
| 215 | probe_ent_attr_addcxx . . $ probe_ent_attr_add(733bdcb6a09ce7ed). (ent_s, "status", r0 = SEXP_number_newi_32cxx . . $ SEXP_number_newi_32(ac44525e09ce977a). ((int) status)); |
| 216 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (ent_s); |
| 217 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (r0); |
| 218 | |
| 219 | return (0); |
| 220 | } |
| 221 | |
| 222 | void probe_item_resetidctrcxx . . $ probe_item_resetidctr(8770571404f374a).(struct id_desc_tcxx . . $ id_desc_t# *id_desc) |
| 223 | { |
| 224 | id_desc->item_id_ctrcxx . . $ id_desc_t#item_id_ctr. = 1; |
| 225 | } |
| 226 | |
| 227 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! probe_item_filteredcxx . . $ probe_item_filtered(24018bafaaa94db3).(const SEXP_tcxx . . $ SEXP_t# *item, const SEXP_tcxx . . $ SEXP_t# *filters) |
| 228 | { |
| 229 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! filtered = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 230 | SEXP_tcxx . . $ SEXP_t# *filter, *ste; |
| 231 | |
| 232 | SEXP_list_foreachcxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:470:9`!(filter, filters) { |
| 233 | SEXP_tcxx . . $ SEXP_t# *felm, *ste_res, *r0; |
| 234 | oval_result_tcxx . . $ oval_result_t# ores; |
| 235 | oval_operator_tcxx . . $ oval_operator_t# oopr; |
| 236 | oval_filter_action_tcxx . . $ oval_filter_action_t# ofact; |
| 237 | |
| 238 | r0 = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(filter); |
| 239 | ofact = SEXP_number_getucxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:145:10`!(r0); |
| 240 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 241 | ste = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(filter, 2); |
| 242 | ste_res = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 243 | |
| 244 | SEXP_sublist_foreachcxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:480:9`!(felm, ste, 2, SEXP_LIST_ENDcxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:483:9`!) { |
| 245 | SEXP_tcxx . . $ SEXP_t# *ielm, *elm_res; |
| 246 | char *elm_name; |
| 247 | oval_check_tcxx . . $ oval_check_t# ochk; |
| 248 | int i; |
| 249 | |
| 250 | elm_res = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 251 | elm_name = probe_ent_getnamecxx . . $ probe_ent_getname(c831a2fa12818dfe).(felm); |
| 252 | |
| 253 | for (i = 1;; ++i) { |
| 254 | ielm = probe_obj_getentcxx . . $ probe_obj_getent(7907a01f2ff841f3).(item, elm_name, i); |
| 255 | |
| 256 | if (ielm == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 257 | break; |
| 258 | |
| 259 | ores = probe_entste_cmpcxx . . $ probe_entste_cmp(e245451a1311e799).(felm, ielm); |
| 260 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(elm_res, r0 = SEXP_number_newi_32cxx . . $ SEXP_number_newi_32(ac44525e09ce977a).(ores)); |
| 261 | |
| 262 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ielm); |
| 263 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 264 | } |
| 265 | |
| 266 | if (SEXP_list_lengthcxx . . $ SEXP_list_length(7b7039adf1662ab5).(elm_res) > 0) { |
| 267 | r0 = probe_ent_getattrvalcxx . . $ probe_ent_getattrval(42b37380d22a3312).(felm, "entity_check"); |
| 268 | |
| 269 | if (r0 == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 270 | ochk = OVAL_CHECK_ALLcxx . . $ OVAL_CHECK_ALL.; |
| 271 | else |
| 272 | ochk = SEXP_number_geti_32cxx . . $ SEXP_number_geti_32(e77439d026b7e3ce).(r0); |
| 273 | |
| 274 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 275 | |
| 276 | ores = probe_ent_result_bychkcxx . . $ probe_ent_result_bychk(b32db698aeb51a68).(elm_res, ochk); |
| 277 | } else { |
| 278 | ores = OVAL_RESULT_FALSEcxx . . $ OVAL_RESULT_FALSE.; |
| 279 | } |
| 280 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(ste_res, r0 = SEXP_number_newi_32cxx . . $ SEXP_number_newi_32(ac44525e09ce977a).(ores)); |
| 281 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 282 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(elm_res); |
| 283 | freecxx . . $ free(5d22bdacc48458e8).(elm_name); |
| 284 | } |
| 285 | |
| 286 | r0 = probe_ent_getattrvalcxx . . $ probe_ent_getattrval(42b37380d22a3312).(ste, "operator"); |
| 287 | if (r0 == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 288 | oopr = OVAL_OPERATOR_ANDcxx . . $ OVAL_OPERATOR_AND.; |
| 289 | else |
| 290 | oopr = SEXP_number_geti_32cxx . . $ SEXP_number_geti_32(e77439d026b7e3ce).(r0); |
| 291 | ores = probe_ent_result_byoprcxx . . $ probe_ent_result_byopr(c1aad969648ee96f).(ste_res, oopr); |
| 292 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ste); |
| 293 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ste_res); |
| 294 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 295 | |
| 296 | if ((ores == OVAL_RESULT_TRUEcxx . . $ OVAL_RESULT_TRUE. && ofact == OVAL_FILTER_ACTION_EXCLUDEcxx . . $ OVAL_FILTER_ACTION_EXCLUDE.) |
| 297 | || (ores == OVAL_RESULT_FALSEcxx . . $ OVAL_RESULT_FALSE. && ofact == OVAL_FILTER_ACTION_INCLUDEcxx . . $ OVAL_FILTER_ACTION_INCLUDE.)) { |
| 298 | filtered = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 299 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(filter); |
| 300 | break; |
| 301 | } |
| 302 | } |
| 303 | |
| 304 | return filtered; |
| 305 | } |
| 306 | |
| 307 | /* |
| 308 | * attributes |
| 309 | */ |
| 310 | |
| 311 | SEXP_tcxx . . $ SEXP_t# *probe_attr_creatcxx . . $ probe_attr_creat(5e3fef9c42f0315b).(const char *name, const SEXP_tcxx . . $ SEXP_t# * val, ...) |
| 312 | { |
| 313 | va_listcxx . . $ va_list# ap; |
| 314 | SEXP_tcxx . . $ SEXP_t# *list, *ns; |
| 315 | |
| 316 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(ap, val); |
| 317 | list = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 318 | |
| 319 | while (name != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 320 | if (val == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 321 | ns = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2).(name, strlencxx . . $ strlen(751346f8406fd082).(name)); |
| 322 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(list, ns); |
| 323 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ns); |
| 324 | } else { |
| 325 | ns = SEXP_string_newfcxx . . $ SEXP_string_newf(b2137ed863725962).(":%s", name); |
| 326 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(list, ns); |
| 327 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(list, val); |
| 328 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ns); |
| 329 | } |
| 330 | |
| 331 | name = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, const char *); |
| 332 | val = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, SEXP_t *); |
| 333 | } |
| 334 | |
| 335 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(ap); |
| 336 | |
| 337 | return (list); |
| 338 | } |
| 339 | |
| 340 | /* |
| 341 | * objects |
| 342 | */ |
| 343 | |
| 344 | SEXP_tcxx . . $ SEXP_t# *probe_obj_creatcxx . . $ probe_obj_creat(7fa6a2e8307f6614).(const char *name, SEXP_tcxx . . $ SEXP_t# * attrs, ...) |
| 345 | { |
| 346 | va_listcxx . . $ va_list# ap; |
| 347 | SEXP_tcxx . . $ SEXP_t# *obj, *ns, *val, *ent; |
| 348 | |
| 349 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(ap, attrs); |
| 350 | |
| 351 | obj = probe_obj_newcxx . . $ probe_obj_new(ca18d10048afa0ff).(name, attrs); |
| 352 | name = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, const char *); |
| 353 | |
| 354 | while (name != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 355 | attrs = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, SEXP_t *); |
| 356 | val = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, SEXP_t *); |
| 357 | |
| 358 | ns = probe_ncache_refcxx . . $ probe_ncache_ref(be2a40239769fba4). (OSCAP_GSYMcxx . . $ `src/common/util.h:444:9`!(ncache), name); |
| 359 | ent = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 360 | |
| 361 | if (attrs != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 362 | SEXP_tcxx . . $ SEXP_t# *nl, *nj; |
| 363 | |
| 364 | nl = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(ns, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 365 | nj = SEXP_list_joincxx . . $ SEXP_list_join(fcf1a664115faa7).(nl, attrs); |
| 366 | |
| 367 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(ent, nj); |
| 368 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(nl); |
| 369 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(nj); |
| 370 | } else |
| 371 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(ent, ns); |
| 372 | |
| 373 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ns); |
| 374 | |
| 375 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(ent, val); |
| 376 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(obj, ent); |
| 377 | |
| 378 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent); |
| 379 | |
| 380 | name = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, const char *); |
| 381 | } |
| 382 | |
| 383 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(ap); |
| 384 | return (obj); |
| 385 | } |
| 386 | |
| 387 | SEXP_tcxx . . $ SEXP_t# *probe_obj_newcxx . . $ probe_obj_new(ca18d10048afa0ff).(const char *name, SEXP_tcxx . . $ SEXP_t# * attrs) |
| 388 | { |
| 389 | SEXP_tcxx . . $ SEXP_t# *obj, *ns; |
| 390 | |
| 391 | obj = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 392 | ns = probe_ncache_refcxx . . $ probe_ncache_ref(be2a40239769fba4). (OSCAP_GSYMcxx . . $ `src/common/util.h:444:9`!(ncache), name); |
| 393 | |
| 394 | if (attrs != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 395 | SEXP_tcxx . . $ SEXP_t# *nl, *nj; |
| 396 | |
| 397 | nl = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(ns, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 398 | nj = SEXP_list_joincxx . . $ SEXP_list_join(fcf1a664115faa7).(nl, attrs); |
| 399 | |
| 400 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(obj, nj); |
| 401 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(nl); |
| 402 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(nj); |
| 403 | } else |
| 404 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(obj, ns); |
| 405 | |
| 406 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ns); |
| 407 | |
| 408 | return (obj); |
| 409 | } |
| 410 | |
| 411 | SEXP_tcxx . . $ SEXP_t# *probe_obj_getentcxx . . $ probe_obj_getent(7907a01f2ff841f3).(const SEXP_tcxx . . $ SEXP_t# * obj, const char *name, uint32_tcxx . . $ uint32_t# n) |
| 412 | { |
| 413 | SEXP_tcxx . . $ SEXP_t# *objents, *ent, *ent_name; |
| 414 | |
| 415 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(obj != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 416 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(name != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 417 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(n > 0); |
| 418 | |
| 419 | ent = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 420 | objents = SEXP_list_restcxx . . $ SEXP_list_rest(2f7f980afaaae0f0).(obj); |
| 421 | |
| 422 | SEXP_list_foreachcxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:470:9`!(ent, objents) { |
| 423 | ent_name = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(ent); |
| 424 | |
| 425 | if (SEXP_listpcxx . . $ SEXP_listp(85f078d1f48ac431).(ent_name)) { |
| 426 | SEXP_tcxx . . $ SEXP_t# *nr; |
| 427 | |
| 428 | nr = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(ent_name); |
| 429 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent_name); |
| 430 | ent_name = nr; |
| 431 | } |
| 432 | |
| 433 | if (SEXP_stringpcxx . . $ SEXP_stringp(85f078d1f48ac431).(ent_name)) { |
| 434 | #if !defined(NDEBUGcxx . . $ `<built-in>:425:9`!) && defined(SEAP_VERBOSE_DEBUG) |
| 435 | char buf[128]; |
| 436 | SEXP_string_cstr_r(ent_name, buf, sizeof buf); |
| 437 | dD("1=\"%s\", 2=\"%s\", n=%u", buf, name, n); |
| 438 | #endif |
| 439 | |
| 440 | if (SEXP_strcmpcxx . . $ SEXP_strcmp(3ef1a37bcb3c2a).(ent_name, name) == 0 && (--n == 0)) { |
| 441 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent_name); |
| 442 | break; |
| 443 | } |
| 444 | } |
| 445 | |
| 446 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent_name); |
| 447 | } |
| 448 | |
| 449 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(objents); |
| 450 | |
| 451 | return (ent); |
| 452 | } |
| 453 | |
| 454 | SEXP_tcxx . . $ SEXP_t# *probe_obj_getentvalcxx . . $ probe_obj_getentval(7907a01f2ff841f3).(const SEXP_tcxx . . $ SEXP_t# * obj, const char *name, uint32_tcxx . . $ uint32_t# n) |
| 455 | { |
| 456 | SEXP_tcxx . . $ SEXP_t# *ent, *val; |
| 457 | |
| 458 | ent = probe_obj_getentcxx . . $ probe_obj_getent(7907a01f2ff841f3).(obj, name, n); |
| 459 | val = probe_ent_getvalcxx . . $ probe_ent_getval(2f7f980afaaae0f0).(ent); |
| 460 | |
| 461 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent); |
| 462 | |
| 463 | return (val); |
| 464 | } |
| 465 | |
| 466 | int probe_obj_getentvalscxx . . $ probe_obj_getentvals(5064ef95f2488283).(const SEXP_tcxx . . $ SEXP_t# * obj, const char *name, uint32_tcxx . . $ uint32_t# n, SEXP_tcxx . . $ SEXP_t# ** res) |
| 467 | { |
| 468 | SEXP_tcxx . . $ SEXP_t# *ent; |
| 469 | int ret; |
| 470 | |
| 471 | ent = probe_obj_getentcxx . . $ probe_obj_getent(7907a01f2ff841f3).(obj, name, n); |
| 472 | ret = probe_ent_getvalscxx . . $ probe_ent_getvals(87c285983fc46746).(ent, res); |
| 473 | |
| 474 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent); |
| 475 | |
| 476 | return (ret); |
| 477 | } |
| 478 | |
| 479 | oval_schema_version_tcxx . . $ oval_schema_version_t# probe_obj_get_platform_schema_versioncxx . . $ probe_obj_get_platform_schema_version(5bacca80194debea).(const SEXP_tcxx . . $ SEXP_t# *obj) |
| 480 | { |
| 481 | SEXP_tcxx . . $ SEXP_t# *sexp_ver; |
| 482 | |
| 483 | if (obj == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 484 | return OVAL_SCHEMA_VERSION_INVALIDcxx . . $ `src/OVAL/public/oval_schema_version.h:38:9`!; |
| 485 | sexp_ver = probe_obj_getattrvalcxx . . $ probe_obj_getattrval(42b37380d22a3312).(obj, "oval_version"); |
| 486 | |
| 487 | if (!SEXP_stringpcxx . . $ SEXP_stringp(85f078d1f48ac431).(sexp_ver)) { |
| 488 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(sexp_ver); |
| 489 | return OVAL_SCHEMA_VERSION_INVALIDcxx . . $ `src/OVAL/public/oval_schema_version.h:38:9`!; |
| 490 | } |
| 491 | |
| 492 | char *ver = SEXP_string_cstrcxx . . $ SEXP_string_cstr(c831a2fa12818dfe).(sexp_ver); |
| 493 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(sexp_ver); |
| 494 | oval_schema_version_tcxx . . $ oval_schema_version_t# parsed_version = oval_schema_version_from_cstrcxx . . $ oval_schema_version_from_cstr(da442b0b9c467d6b).(ver); |
| 495 | freecxx . . $ free(5d22bdacc48458e8).(ver); |
| 496 | return parsed_version; |
| 497 | } |
| 498 | |
| 499 | |
| 500 | |
| 501 | SEXP_tcxx . . $ SEXP_t# *probe_obj_getattrvalcxx . . $ probe_obj_getattrval(42b37380d22a3312).(const SEXP_tcxx . . $ SEXP_t# * obj, const char *name) |
| 502 | { |
| 503 | SEXP_tcxx . . $ SEXP_t# *obj_name; |
| 504 | |
| 505 | obj_name = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(obj); |
| 506 | |
| 507 | if (SEXP_listpcxx . . $ SEXP_listp(85f078d1f48ac431).(obj_name)) { |
| 508 | uint32_tcxx . . $ uint32_t# i; |
| 509 | SEXP_tcxx . . $ SEXP_t# *attr; |
| 510 | char *name_buf = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 511 | |
| 512 | i = 2; |
| 513 | |
| 514 | while ((attr = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(obj_name, i)) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 515 | if (SEXP_stringpcxx . . $ SEXP_stringp(85f078d1f48ac431).(attr)) { |
| 516 | if (SEXP_string_nthcxx . . $ SEXP_string_nth(229c2c0bb207cd4a).(attr, 1) == ':') { |
| 517 | if (name_buf == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 518 | name_buf = oscap_sprintfcxx . . $ oscap_sprintf(a849077ff1b8d812).(":%s", name); |
| 519 | } |
| 520 | if (SEXP_strcmpcxx . . $ SEXP_strcmp(3ef1a37bcb3c2a).(attr, name_buf) == 0) { |
| 521 | SEXP_tcxx . . $ SEXP_t# *val; |
| 522 | |
| 523 | val = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(obj_name, i + 1); |
| 524 | freecxx . . $ free(5d22bdacc48458e8).(name_buf); |
| 525 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(attr); |
| 526 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(obj_name); |
| 527 | |
| 528 | return (val); |
| 529 | } |
| 530 | |
| 531 | ++i; |
| 532 | } |
| 533 | |
| 534 | ++i; |
| 535 | } |
| 536 | |
| 537 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(attr); |
| 538 | } |
| 539 | freecxx . . $ free(5d22bdacc48458e8).(name_buf); |
| 540 | } |
| 541 | |
| 542 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(obj_name); |
| 543 | |
| 544 | return (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 545 | } |
| 546 | |
| 547 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! probe_obj_attrexistscxx . . $ probe_obj_attrexists(7326d2b72b90fa4d).(const SEXP_tcxx . . $ SEXP_t# * obj, const char *name) |
| 548 | { |
| 549 | SEXP_tcxx . . $ SEXP_t# *obj_name; |
| 550 | obj_name = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(obj); |
| 551 | |
| 552 | if (SEXP_listpcxx . . $ SEXP_listp(85f078d1f48ac431).(obj_name)) { |
| 553 | uint32_tcxx . . $ uint32_t# i; |
| 554 | SEXP_tcxx . . $ SEXP_t# *attr; |
| 555 | char *name_buf = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 556 | |
| 557 | i = 2; |
| 558 | |
| 559 | while ((attr = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(obj_name, i)) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 560 | if (SEXP_stringpcxx . . $ SEXP_stringp(85f078d1f48ac431).(attr)) { |
| 561 | if (SEXP_string_nthcxx . . $ SEXP_string_nth(229c2c0bb207cd4a).(attr, 1) == ':') { |
| 562 | if (name_buf == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 563 | name_buf = oscap_sprintfcxx . . $ oscap_sprintf(a849077ff1b8d812).(":%s", name); |
| 564 | } |
| 565 | if (SEXP_strcmpcxx . . $ SEXP_strcmp(3ef1a37bcb3c2a).(attr, name_buf) == 0) { |
| 566 | freecxx . . $ free(5d22bdacc48458e8).(name_buf); |
| 567 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(attr); |
| 568 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(obj_name); |
| 569 | |
| 570 | return (truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 571 | } |
| 572 | ++i; |
| 573 | } else { |
| 574 | if (SEXP_strcmpcxx . . $ SEXP_strcmp(3ef1a37bcb3c2a).(attr, name) == 0) { |
| 575 | freecxx . . $ free(5d22bdacc48458e8).(name_buf); |
| 576 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(attr); |
| 577 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(obj_name); |
| 578 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 579 | } |
| 580 | } |
| 581 | ++i; |
| 582 | } |
| 583 | |
| 584 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(attr); |
| 585 | } |
| 586 | freecxx . . $ free(5d22bdacc48458e8).(name_buf); |
| 587 | } |
| 588 | |
| 589 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(obj_name); |
| 590 | |
| 591 | return (falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 592 | } |
| 593 | |
| 594 | int probe_obj_setstatuscxx . . $ probe_obj_setstatus(112b785eb420e6c0).(SEXP_tcxx . . $ SEXP_t# * obj, oval_syschar_status_tcxx . . $ oval_syschar_status_t# status) |
| 595 | { |
| 596 | SEXP_tcxx . . $ SEXP_t# *r0; |
| 597 | |
| 598 | probe_item_attr_addcxx . . $ probe_item_attr_add(733bdcb6a09ce7ed).(obj, "status", r0 = SEXP_number_newi_32cxx . . $ SEXP_number_newi_32(ac44525e09ce977a).(status)); |
| 599 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 600 | |
| 601 | return (-1); |
| 602 | } |
| 603 | |
| 604 | char *probe_obj_getnamecxx . . $ probe_obj_getname(c831a2fa12818dfe).(const SEXP_tcxx . . $ SEXP_t# * obj) |
| 605 | { |
| 606 | return probe_ent_getnamecxx . . $ probe_ent_getname(c831a2fa12818dfe).(obj); |
| 607 | } |
| 608 | |
| 609 | size_t probe_obj_getname_rcxx . . $ probe_obj_getname_r(ca07af91a4fa826f).(const SEXP_tcxx . . $ SEXP_t# * obj, char *buffer, size_t buflen) |
| 610 | { |
| 611 | return probe_ent_getname_rcxx . . $ probe_ent_getname_r(ca07af91a4fa826f).(obj, buffer, buflen); |
| 612 | } |
| 613 | |
| 614 | /* |
| 615 | * collected objects |
| 616 | */ |
| 617 | SEXP_tcxx . . $ SEXP_t# *probe_cobj_newcxx . . $ probe_cobj_new(4e082355872fd045).(oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag, SEXP_tcxx . . $ SEXP_t# *msg_list, SEXP_tcxx . . $ SEXP_t# *item_list, SEXP_tcxx . . $ SEXP_t# *mask_list) |
| 618 | { |
| 619 | SEXP_tcxx . . $ SEXP_t# *cobj, *r0; |
| 620 | |
| 621 | msg_list = (msg_list == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) ? SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) : SEXP_refcxx . . $ SEXP_ref(2f7f980afaaae0f0).(msg_list); |
| 622 | item_list = (item_list == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) ? SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) : SEXP_refcxx . . $ SEXP_ref(2f7f980afaaae0f0).(item_list); |
| 623 | mask_list = mask_list == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! ? SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) : SEXP_refcxx . . $ SEXP_ref(2f7f980afaaae0f0).(mask_list); |
| 624 | cobj = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(r0 = SEXP_number_newucxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:133:9`!(flag), |
| 625 | msg_list, |
| 626 | item_list, |
| 627 | mask_list, |
| 628 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 629 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(msg_list); |
| 630 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(item_list); |
| 631 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(mask_list); |
| 632 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 633 | |
| 634 | return cobj; |
| 635 | } |
| 636 | |
| 637 | int probe_cobj_add_msgcxx . . $ probe_cobj_add_msg(ef7ee42b5817e0be).(SEXP_tcxx . . $ SEXP_t# *cobj, const SEXP_tcxx . . $ SEXP_t# *msg) |
| 638 | { |
| 639 | SEXP_tcxx . . $ SEXP_t# *lst; |
| 640 | |
| 641 | lst = SEXP_listref_nthcxx . . $ SEXP_listref_nth(3d152c928d5432a1).(cobj, 2); |
| 642 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(lst, msg); |
| 643 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(lst); |
| 644 | |
| 645 | return 0; |
| 646 | } |
| 647 | |
| 648 | SEXP_tcxx . . $ SEXP_t# *probe_cobj_get_msgscxx . . $ probe_cobj_get_msgs(2f7f980afaaae0f0).(const SEXP_tcxx . . $ SEXP_t# *cobj) |
| 649 | { |
| 650 | return SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(cobj, 2); |
| 651 | } |
| 652 | |
| 653 | SEXP_tcxx . . $ SEXP_t# *probe_cobj_get_maskcxx . . $ probe_cobj_get_mask(2f7f980afaaae0f0).(const SEXP_tcxx . . $ SEXP_t# *cobj) |
| 654 | { |
| 655 | return SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(cobj, 4); |
| 656 | } |
| 657 | |
| 658 | static SEXP_tcxx . . $ SEXP_t# *probe_item_optimizecxx . . $ probe_item_optimize(2f7f980afaaae0f0).(const SEXP_tcxx . . $ SEXP_t# *item); |
| 659 | |
| 660 | int probe_cobj_add_itemcxx . . $ probe_cobj_add_item(ef7ee42b5817e0be).(SEXP_tcxx . . $ SEXP_t# *cobj, const SEXP_tcxx . . $ SEXP_t# *item) |
| 661 | { |
| 662 | SEXP_tcxx . . $ SEXP_t# *lst, *oitem; |
| 663 | |
| 664 | lst = SEXP_listref_nthcxx . . $ SEXP_listref_nth(3d152c928d5432a1).(cobj, 3); |
| 665 | oitem = probe_item_optimizecxx . . $ probe_item_optimize(2f7f980afaaae0f0).(item); |
| 666 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(lst, oitem); |
| 667 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(lst); |
| 668 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(oitem); |
| 669 | |
| 670 | return 0; |
| 671 | } |
| 672 | |
| 673 | SEXP_tcxx . . $ SEXP_t# *probe_cobj_get_itemscxx . . $ probe_cobj_get_items(2f7f980afaaae0f0).(const SEXP_tcxx . . $ SEXP_t# *cobj) |
| 674 | { |
| 675 | return SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(cobj, 3); |
| 676 | } |
| 677 | |
| 678 | void probe_cobj_set_flagcxx . . $ probe_cobj_set_flag(644bab5dffe689c).(SEXP_tcxx . . $ SEXP_t# *cobj, oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag) |
| 679 | { |
| 680 | SEXP_tcxx . . $ SEXP_t# *sflag, *old_sflag; |
| 681 | oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# of; |
| 682 | |
| 683 | sflag = SEXP_number_newucxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:133:9`!(flag); |
| 684 | old_sflag = SEXP_list_replacecxx . . $ SEXP_list_replace(e5ee5adb82430ce5).(cobj, 1, sflag); |
| 685 | of = SEXP_number_getucxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:145:10`!(old_sflag); |
| 686 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(old_sflag); |
| 687 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(sflag); |
| 688 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("old flag: %d, new flag: %d.", of, flag); |
| 689 | } |
| 690 | |
| 691 | oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# probe_cobj_get_flagcxx . . $ probe_cobj_get_flag(e91d00b32587b9e6).(const SEXP_tcxx . . $ SEXP_t# *cobj) |
| 692 | { |
| 693 | SEXP_tcxx . . $ SEXP_t# *sflag; |
| 694 | oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag; |
| 695 | |
| 696 | sflag = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(cobj); |
| 697 | if (sflag == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 698 | dEcxx . . $ `src/common/debug_priv.h:63:9`!("sflag == NULL."); |
| 699 | return SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN.; |
| 700 | } |
| 701 | |
| 702 | flag = SEXP_number_getucxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:145:10`!(sflag); |
| 703 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(sflag); |
| 704 | |
| 705 | return flag; |
| 706 | } |
| 707 | |
| 708 | oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# probe_cobj_combine_flagscxx . . $ probe_cobj_combine_flags(1090683b7fc8f1f4).(oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# f1, |
| 709 | oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# f2, |
| 710 | oval_setobject_operation_tcxx . . $ oval_setobject_operation_t# op) |
| 711 | { |
| 712 | oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 713 | |
| 714 | switch (op) { |
| 715 | case OVAL_SET_OPERATION_COMPLEMENTcxx . . $ OVAL_SET_OPERATION_COMPLEMENT.: |
| 716 | if (f1 == SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.) { |
| 717 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 718 | } else if (f1 == SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.) { |
| 719 | if (f2 == SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE. || f2 == SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.) { |
| 720 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 721 | } else if (f2 == SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE. || f2 == SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.) { |
| 722 | result = SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.; |
| 723 | } else if (f2 == SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.) { |
| 724 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 725 | } else if (f2 == SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.) { |
| 726 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 727 | } |
| 728 | } else if (f1 == SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.) { |
| 729 | if (f2 == SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE. || f2 == SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.) { |
| 730 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 731 | } else if (f2 == SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.) { |
| 732 | result = SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.; |
| 733 | } else if (f2 == SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.) { |
| 734 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 735 | } else if (f2 == SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.) { |
| 736 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 737 | } else if (f2 == SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.) { |
| 738 | result = SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.; |
| 739 | } |
| 740 | } else if (f1 == SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.) { |
| 741 | if (f2 != SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.) { |
| 742 | result = SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.; |
| 743 | } else { |
| 744 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 745 | } |
| 746 | } else if (f1 == SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.) { |
| 747 | if (f2 != SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE. && f2 != SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.) { |
| 748 | result = SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.; |
| 749 | } else { |
| 750 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 751 | } |
| 752 | } else if (f1 == SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.) { |
| 753 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 754 | } |
| 755 | break; |
| 756 | |
| 757 | case OVAL_SET_OPERATION_INTERSECTIONcxx . . $ OVAL_SET_OPERATION_INTERSECTION.: |
| 758 | if (f1 == SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.) { |
| 759 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 760 | } else if (f1 == SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.) { |
| 761 | if (f2 == SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.) { |
| 762 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 763 | } else if (f2 == SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.) { |
| 764 | result = SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.; |
| 765 | } else if (f2 == SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE. || f2 == SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.) { |
| 766 | result = SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.; |
| 767 | } else if (f2 == SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.) { |
| 768 | result = SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.; |
| 769 | } else if (f2 == SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.) { |
| 770 | result = SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.; |
| 771 | } |
| 772 | } else if (f1 == SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.) { |
| 773 | if (f2 == SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.) { |
| 774 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 775 | } else if (f2 == SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.) { |
| 776 | result = SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.; |
| 777 | } else if (f2 == SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.) { |
| 778 | result = SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.; |
| 779 | } else if (f2 == SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED. || f2 == SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE. || f2 == SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.) { |
| 780 | result = SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.; |
| 781 | } |
| 782 | } else if (f1 == SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.) { |
| 783 | result = SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.; |
| 784 | } else if (f1 == SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.) { |
| 785 | if (f2 == SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.) { |
| 786 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 787 | } else if (f2 == SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.) { |
| 788 | result = SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.; |
| 789 | } else if (f2 == SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE. || f2 == SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE. || f2 == SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE. || f2 == SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.) { |
| 790 | result = SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.; |
| 791 | } |
| 792 | } else if (f1 == SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.) { |
| 793 | if (f2 == SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.) { |
| 794 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 795 | } else if (f2 == SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.) { |
| 796 | result = SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.; |
| 797 | } else if (f2 == SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.) { |
| 798 | result = SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.; |
| 799 | } else if (f2 == SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.) { |
| 800 | result = SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.; |
| 801 | } else if (f2 == SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.) { |
| 802 | result = SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.; |
| 803 | } else if (f2 == SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.) { |
| 804 | result = SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.; |
| 805 | } |
| 806 | } |
| 807 | break; |
| 808 | |
| 809 | case OVAL_SET_OPERATION_UNIONcxx . . $ OVAL_SET_OPERATION_UNION.: |
| 810 | if (f1 == SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.) { |
| 811 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 812 | } else if (f1 == SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.) { |
| 813 | if (f2 == SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.) { |
| 814 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 815 | } else if (f2 == SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE. || f2 == SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST. || f2 == SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.) { |
| 816 | result = SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.; |
| 817 | } else if (f2 == SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE. || f2 == SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.) { |
| 818 | result = SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.; |
| 819 | } |
| 820 | } else if (f1 == SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.) { |
| 821 | if (f2 != SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.) { |
| 822 | result = SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.; |
| 823 | } else { |
| 824 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 825 | } |
| 826 | } else if (f1 == SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.) { |
| 827 | if (f2 == SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.) { |
| 828 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 829 | } else if (f2 == SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.) { |
| 830 | result = SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.; |
| 831 | } else if (f2 == SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE. || f2 == SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.) { |
| 832 | result = SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.; |
| 833 | } else if (f2 == SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE. || f2 == SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.) { |
| 834 | result = SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.; |
| 835 | } |
| 836 | } else if (f1 == SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.) { |
| 837 | if (f2 == SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.) { |
| 838 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 839 | } else if (f2 == SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE. || f2 == SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE. || f2 == SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.) { |
| 840 | result = SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.; |
| 841 | } else if (f2 == SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE. || f2 == SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.) { |
| 842 | result = SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.; |
| 843 | } |
| 844 | } else if (f1 == SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.) { |
| 845 | if (f2 == SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.) { |
| 846 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 847 | } else if (f2 == SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.) { |
| 848 | result = SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.; |
| 849 | } else if (f2 == SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.) { |
| 850 | result = SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.; |
| 851 | } else if (f2 == SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.) { |
| 852 | result = SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.; |
| 853 | } else if (f2 == SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.) { |
| 854 | result = SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.; |
| 855 | } else if (f2 == SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.) { |
| 856 | result = SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.; |
| 857 | } |
| 858 | } |
| 859 | break; |
| 860 | |
| 861 | default: |
| 862 | result = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 863 | } |
| 864 | |
| 865 | return result; |
| 866 | } |
| 867 | |
| 868 | oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# probe_cobj_compute_flagcxx . . $ probe_cobj_compute_flag(19bcac5beadb52f6).(SEXP_tcxx . . $ SEXP_t# *cobj) |
| 869 | { |
| 870 | oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag; |
| 871 | SEXP_tcxx . . $ SEXP_t# *items, *item; |
| 872 | int error_cnt = 0; |
| 873 | int exists_cnt = 0; |
| 874 | int not_collected_cnt = 0; |
| 875 | |
| 876 | items = probe_cobj_get_itemscxx . . $ probe_cobj_get_items(2f7f980afaaae0f0).(cobj); |
| 877 | SEXP_list_foreachcxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:470:9`!(item, items) { |
| 878 | switch (probe_ent_getstatuscxx . . $ probe_ent_getstatus(b361a2e29ea6a769).(item)) { |
| 879 | case SYSCHAR_STATUS_ERRORcxx . . $ SYSCHAR_STATUS_ERROR.: |
| 880 | ++error_cnt; |
| 881 | break; |
| 882 | case SYSCHAR_STATUS_EXISTScxx . . $ SYSCHAR_STATUS_EXISTS.: |
| 883 | ++exists_cnt; |
| 884 | break; |
| 885 | case SYSCHAR_STATUS_DOES_NOT_EXISTcxx . . $ SYSCHAR_STATUS_DOES_NOT_EXIST.: |
| 886 | break; |
| 887 | case SYSCHAR_STATUS_NOT_COLLECTEDcxx . . $ SYSCHAR_STATUS_NOT_COLLECTED.: |
| 888 | ++not_collected_cnt; |
| 889 | break; |
| 890 | default: |
| 891 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(item); |
| 892 | flag = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 893 | goto cleanup; |
| 894 | } |
| 895 | } |
| 896 | |
| 897 | if (error_cnt > 0) { |
| 898 | flag = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.; |
| 899 | } else if (not_collected_cnt > 0) { |
| 900 | flag = SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.; |
| 901 | } else if (exists_cnt > 0) { |
| 902 | flag = SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.; |
| 903 | } else { |
| 904 | flag = SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.; |
| 905 | } |
| 906 | |
| 907 | if (probe_cobj_get_flagcxx . . $ probe_cobj_get_flag(e91d00b32587b9e6).(cobj) == SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN.) |
| 908 | probe_cobj_set_flagcxx . . $ probe_cobj_set_flag(644bab5dffe689c).(cobj, flag); |
| 909 | |
| 910 | cleanup: |
| 911 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(items); |
| 912 | return flag; |
| 913 | } |
| 914 | |
| 915 | /* |
| 916 | * messages |
| 917 | */ |
| 918 | SEXP_tcxx . . $ SEXP_t# *probe_msg_creatcxx . . $ probe_msg_creat(c07e3aa4e7ab9719).(oval_message_level_tcxx . . $ oval_message_level_t# level, char *message) |
| 919 | { |
| 920 | SEXP_tcxx . . $ SEXP_t# *lvl, *str, *msg; |
| 921 | |
| 922 | dIcxx . . $ `src/common/debug_priv.h:61:9`!("%s", message); |
| 923 | lvl = SEXP_number_newucxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:133:9`!(level); |
| 924 | str = SEXP_string_newfcxx . . $ SEXP_string_newf(b2137ed863725962).("%s", message); |
| 925 | msg = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(lvl, str, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 926 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(lvl); |
| 927 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(str); |
| 928 | |
| 929 | return msg; |
| 930 | } |
| 931 | |
| 932 | SEXP_tcxx . . $ SEXP_t# *probe_msg_creatfcxx . . $ probe_msg_creatf(2da488f08a70551b).(oval_message_level_tcxx . . $ oval_message_level_t# level, const char *fmt, ...) |
| 933 | { |
| 934 | va_listcxx . . $ va_list# alist; |
| 935 | int len = 0; |
| 936 | SEXP_tcxx . . $ SEXP_t# *lvl, *str, *msg; |
| 937 | char *cstr = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 938 | |
| 939 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(alist, fmt); |
| 940 | len = vsnprintfcxx . . $ vsnprintf(a85eea89d1bd834f).(cstr, len, fmt, alist); |
| 941 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(alist); |
| 942 | |
| 943 | if (len < 0) { |
| 944 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 945 | } |
| 946 | |
| 947 | len++; |
| 948 | cstr = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(len); |
| 949 | |
| 950 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(alist, fmt); |
| 951 | len = vsnprintfcxx . . $ vsnprintf(a85eea89d1bd834f).(cstr, len, fmt, alist); |
| 952 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(alist); |
| 953 | |
| 954 | if (len < 0) { |
| 955 | freecxx . . $ free(5d22bdacc48458e8).(cstr); |
| 956 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 957 | } |
| 958 | |
| 959 | dIcxx . . $ `src/common/debug_priv.h:61:9`!("%s", cstr); |
| 960 | str = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2).(cstr, len); |
| 961 | freecxx . . $ free(5d22bdacc48458e8).(cstr); |
| 962 | lvl = SEXP_number_newucxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:133:9`!(level); |
| 963 | msg = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(lvl, str, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 964 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(lvl); |
| 965 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(str); |
| 966 | |
| 967 | return msg; |
| 968 | } |
| 969 | |
| 970 | /* |
| 971 | * entities |
| 972 | */ |
| 973 | SEXP_tcxx . . $ SEXP_t# *probe_ent_creatcxx . . $ probe_ent_creat(ad4959c2fa136b46).(const char *name, SEXP_tcxx . . $ SEXP_t# * attrs, SEXP_tcxx . . $ SEXP_t# * val, ...) |
| 974 | { |
| 975 | va_listcxx . . $ va_list# ap; |
| 976 | SEXP_tcxx . . $ SEXP_t# *ent_list, *ent; |
| 977 | |
| 978 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(ap, val); |
| 979 | ent_list = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 980 | |
| 981 | while (name != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 982 | ent = probe_ent_creat1cxx . . $ probe_ent_creat1(84b3695e4a0e659a).(name, attrs, val); |
| 983 | |
| 984 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(ent_list, ent); |
| 985 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent); |
| 986 | |
| 987 | name = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, const char *); |
| 988 | attrs = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, SEXP_t *); |
| 989 | val = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, SEXP_t *); |
| 990 | } |
| 991 | |
| 992 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(ap); |
| 993 | |
| 994 | return (ent_list); |
| 995 | } |
| 996 | |
| 997 | SEXP_tcxx . . $ SEXP_t# *probe_ent_creat1cxx . . $ probe_ent_creat1(84b3695e4a0e659a).(const char *name, SEXP_tcxx . . $ SEXP_t# * attrs, SEXP_tcxx . . $ SEXP_t# * val) |
| 998 | { |
| 999 | SEXP_tcxx . . $ SEXP_t# *ent, *ns; |
| 1000 | |
| 1001 | ent = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1002 | ns = probe_ncache_refcxx . . $ probe_ncache_ref(be2a40239769fba4). (OSCAP_GSYMcxx . . $ `src/common/util.h:444:9`!(ncache), name); |
| 1003 | |
| 1004 | if (attrs != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1005 | SEXP_tcxx . . $ SEXP_t# *nl, *nj; |
| 1006 | |
| 1007 | nl = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(ns, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1008 | nj = SEXP_list_joincxx . . $ SEXP_list_join(fcf1a664115faa7).(nl, attrs); |
| 1009 | |
| 1010 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(ent, nj); |
| 1011 | |
| 1012 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(nl); |
| 1013 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(nj); |
| 1014 | } else |
| 1015 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(ent, ns); |
| 1016 | |
| 1017 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ns); |
| 1018 | |
| 1019 | if (val != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1020 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(ent, val); |
| 1021 | |
| 1022 | return (ent); |
| 1023 | } |
| 1024 | |
| 1025 | SEXP_tcxx . . $ SEXP_t# *probe_ent_attr_addcxx . . $ probe_ent_attr_add(733bdcb6a09ce7ed).(SEXP_tcxx . . $ SEXP_t# * ent, const char *name, SEXP_tcxx . . $ SEXP_t# * val) |
| 1026 | { |
| 1027 | return (probe_item_attr_addcxx . . $ probe_item_attr_add(733bdcb6a09ce7ed).(ent, name, val)); |
| 1028 | } |
| 1029 | |
| 1030 | int probe_ent_getvalscxx . . $ probe_ent_getvals(87c285983fc46746).(const SEXP_tcxx . . $ SEXP_t# * ent, SEXP_tcxx . . $ SEXP_t# ** res) |
| 1031 | { |
| 1032 | SEXP_tcxx . . $ SEXP_t# *val_lst; |
| 1033 | int len; |
| 1034 | |
| 1035 | if (probe_ent_attrexistscxx . . $ probe_ent_attrexists(7326d2b72b90fa4d).(ent, "var_ref")) |
| 1036 | val_lst = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(ent, 2); |
| 1037 | else |
| 1038 | val_lst = SEXP_list_restcxx . . $ SEXP_list_rest(2f7f980afaaae0f0).(ent); |
| 1039 | len = SEXP_list_lengthcxx . . $ SEXP_list_length(7b7039adf1662ab5).(val_lst); |
| 1040 | |
| 1041 | if (res != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1042 | (*res) = val_lst; |
| 1043 | else |
| 1044 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(val_lst); |
| 1045 | |
| 1046 | return (len); |
| 1047 | } |
| 1048 | |
| 1049 | SEXP_tcxx . . $ SEXP_t# *probe_ent_getvalcxx . . $ probe_ent_getval(2f7f980afaaae0f0).(const SEXP_tcxx . . $ SEXP_t# * ent) |
| 1050 | { |
| 1051 | if (probe_ent_attrexistscxx . . $ probe_ent_attrexists(7326d2b72b90fa4d).(ent, "var_ref")) { |
| 1052 | SEXP_tcxx . . $ SEXP_t# *r0, *r1; |
| 1053 | unsigned int val_idx; |
| 1054 | |
| 1055 | r0 = probe_ent_getattrvalcxx . . $ probe_ent_getattrval(42b37380d22a3312).(ent, "val_idx"); |
| 1056 | if (r0 == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1057 | r0 = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(ent, 2); |
| 1058 | r1 = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(r0); |
| 1059 | } else { |
| 1060 | val_idx = SEXP_number_getucxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:145:10`!(r0); |
| 1061 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 1062 | |
| 1063 | r0 = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(ent, 2); |
| 1064 | r1 = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(r0, val_idx + 1); |
| 1065 | } |
| 1066 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 1067 | |
| 1068 | return r1; |
| 1069 | } else { |
| 1070 | return (SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(ent, 2)); |
| 1071 | } |
| 1072 | } |
| 1073 | |
| 1074 | SEXP_tcxx . . $ SEXP_t# *probe_ent_getattrvalcxx . . $ probe_ent_getattrval(42b37380d22a3312).(const SEXP_tcxx . . $ SEXP_t# * ent, const char *name) |
| 1075 | { |
| 1076 | SEXP_tcxx . . $ SEXP_t# *attrs; |
| 1077 | |
| 1078 | if (ent == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1079 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EFAULTcxx . . $ `<external>/8987895939074593727/errno-base.h:18:9`!; |
| 1080 | return (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1081 | } |
| 1082 | |
| 1083 | attrs = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(ent); |
| 1084 | |
| 1085 | if (SEXP_listpcxx . . $ SEXP_listp(85f078d1f48ac431).(attrs)) { |
| 1086 | SEXP_tcxx . . $ SEXP_t# *attr; |
| 1087 | uint32_tcxx . . $ uint32_t# i; |
| 1088 | |
| 1089 | i = 2; |
| 1090 | |
| 1091 | while ((attr = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(attrs, i)) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1092 | if (SEXP_stringpcxx . . $ SEXP_stringp(85f078d1f48ac431).(attr)) { |
| 1093 | char attr_name[32 + 1]; |
| 1094 | size_t attr_nlen; |
| 1095 | |
| 1096 | attr_nlen = SEXP_string_cstr_rcxx . . $ SEXP_string_cstr_r(ca07af91a4fa826f).(attr, attr_name, sizeof attr_name); |
| 1097 | |
| 1098 | if (attr_nlen > 2) { |
| 1099 | if (attr_name[0] == ':') { |
| 1100 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(attr_name + 1, name) == 0) { |
| 1101 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(attr); |
| 1102 | attr = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(attrs, i + 1); |
| 1103 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(attrs); |
| 1104 | return attr; |
| 1105 | } |
| 1106 | } |
| 1107 | } |
| 1108 | } |
| 1109 | |
| 1110 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(attr); |
| 1111 | ++i; |
| 1112 | } |
| 1113 | } |
| 1114 | |
| 1115 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(attrs); |
| 1116 | return (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1117 | } |
| 1118 | |
| 1119 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! probe_ent_attrexistscxx . . $ probe_ent_attrexists(7326d2b72b90fa4d).(const SEXP_tcxx . . $ SEXP_t# * ent, const char *name) |
| 1120 | { |
| 1121 | return probe_obj_attrexistscxx . . $ probe_obj_attrexists(7326d2b72b90fa4d).(ent, name); |
| 1122 | } |
| 1123 | |
| 1124 | int probe_ent_setdatatypecxx . . $ probe_ent_setdatatype(fec947bd1b7be7b5).(SEXP_tcxx . . $ SEXP_t# *ent, oval_datatype_tcxx . . $ oval_datatype_t# type) |
| 1125 | { |
| 1126 | const char *strtype; |
| 1127 | |
| 1128 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(ent != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1129 | |
| 1130 | switch (type) { |
| 1131 | case OVAL_DATATYPE_BOOLEANcxx . . $ OVAL_DATATYPE_BOOLEAN.: |
| 1132 | case OVAL_DATATYPE_FLOATcxx . . $ OVAL_DATATYPE_FLOAT.: |
| 1133 | case OVAL_DATATYPE_INTEGERcxx . . $ OVAL_DATATYPE_INTEGER.: |
| 1134 | case OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING.: |
| 1135 | /* these are stored directly in each SEXP */ |
| 1136 | return 0; |
| 1137 | default: |
| 1138 | /* set the SEXP to a user datatype */ |
| 1139 | strtype = oval_datatype_get_textcxx . . $ oval_datatype_get_text(a950b89baeb79474).(type); |
| 1140 | return SEXP_datatype_setcxx . . $ SEXP_datatype_set(a2348636b07aef22).(ent, strtype); |
| 1141 | } |
| 1142 | } |
| 1143 | |
| 1144 | static oval_datatype_tcxx . . $ oval_datatype_t# _sexp_val_getdatatypecxx . . $ _sexp_val_getdatatype(576ef4d818d367a9).(const SEXP_tcxx . . $ SEXP_t# *val) |
| 1145 | { |
| 1146 | SEXP_type_tcxx . . $ SEXP_type_t# sdt; |
| 1147 | SEXP_numtype_tcxx . . $ SEXP_numtype_t# sndt; |
| 1148 | |
| 1149 | sdt = SEXP_typeofcxx . . $ SEXP_typeof(dfe0d2bfa8d6f3af).(val); |
| 1150 | |
| 1151 | switch (sdt) { |
| 1152 | case SEXP_TYPE_STRINGcxx . . $ `src/OVAL/probes/SEAP/public/sexp-types.h:76:9`!: |
| 1153 | return OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING.; |
| 1154 | case SEXP_TYPE_NUMBERcxx . . $ `src/OVAL/probes/SEAP/public/sexp-types.h:77:9`!: |
| 1155 | sndt = SEXP_number_typecxx . . $ SEXP_number_type(dfe0d2bfa8d6f3af).(val); |
| 1156 | switch (sndt) { |
| 1157 | case SEXP_NUM_BOOLcxx . . $ `src/OVAL/probes/SEAP/public/sexp-types.h:37:9`!: |
| 1158 | return OVAL_DATATYPE_BOOLEANcxx . . $ OVAL_DATATYPE_BOOLEAN.; |
| 1159 | case SEXP_NUM_FLOATcxx . . $ `src/OVAL/probes/SEAP/public/sexp-types.h:64:9`!: |
| 1160 | return OVAL_DATATYPE_FLOATcxx . . $ OVAL_DATATYPE_FLOAT.; |
| 1161 | default: /* everything else is considered an integer */ |
| 1162 | return OVAL_DATATYPE_INTEGERcxx . . $ OVAL_DATATYPE_INTEGER.; |
| 1163 | } |
| 1164 | default: |
| 1165 | dEcxx . . $ `src/common/debug_priv.h:63:9`!("Unexpected SEXP datatype: %d, '%s'.", sdt, SEXP_strtype(val)); |
| 1166 | return OVAL_DATATYPE_UNKNOWNcxx . . $ OVAL_DATATYPE_UNKNOWN.; |
| 1167 | } |
| 1168 | } |
| 1169 | |
| 1170 | oval_datatype_tcxx . . $ oval_datatype_t# probe_ent_getdatatypecxx . . $ probe_ent_getdatatype(576ef4d818d367a9).(const SEXP_tcxx . . $ SEXP_t# * ent) |
| 1171 | { |
| 1172 | const char *str; |
| 1173 | |
| 1174 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(ent != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1175 | |
| 1176 | str = SEXP_datatypecxx . . $ SEXP_datatype(d49ba2cc1d178e85).(ent); |
| 1177 | if (str != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1178 | /* user datatype */ |
| 1179 | return oval_datatype_from_textcxx . . $ oval_datatype_from_text(a3149e9731df5e07).(str); |
| 1180 | } else { |
| 1181 | /* SEXP datatype */ |
| 1182 | SEXP_tcxx . . $ SEXP_t# *val; |
| 1183 | oval_datatype_tcxx . . $ oval_datatype_t# dt; |
| 1184 | |
| 1185 | val = probe_ent_getvalcxx . . $ probe_ent_getval(2f7f980afaaae0f0).(ent); |
| 1186 | if (val == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1187 | return OVAL_DATATYPE_UNKNOWNcxx . . $ OVAL_DATATYPE_UNKNOWN.; |
| 1188 | |
| 1189 | dt = _sexp_val_getdatatypecxx . . $ _sexp_val_getdatatype(576ef4d818d367a9).(val); |
| 1190 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(val); |
| 1191 | |
| 1192 | return dt; |
| 1193 | } |
| 1194 | } |
| 1195 | |
| 1196 | int probe_ent_setmaskcxx . . $ probe_ent_setmask(a4e805e021c3dfae).(SEXP_tcxx . . $ SEXP_t# * ent, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! mask) |
| 1197 | { |
| 1198 | /* TBI */ |
| 1199 | return (-1); |
| 1200 | } |
| 1201 | |
| 1202 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! probe_ent_getmaskcxx . . $ probe_ent_getmask(85f078d1f48ac431).(const SEXP_tcxx . . $ SEXP_t# * ent) |
| 1203 | { |
| 1204 | /* TBI */ |
| 1205 | return (falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 1206 | } |
| 1207 | |
| 1208 | int probe_ent_setstatuscxx . . $ probe_ent_setstatus(112b785eb420e6c0).(SEXP_tcxx . . $ SEXP_t# * ent, oval_syschar_status_tcxx . . $ oval_syschar_status_t# status) |
| 1209 | { |
| 1210 | SEXP_tcxx . . $ SEXP_t# *r0; |
| 1211 | |
| 1212 | probe_item_attr_addcxx . . $ probe_item_attr_add(733bdcb6a09ce7ed). (ent, "status", r0 = SEXP_number_newi_32cxx . . $ SEXP_number_newi_32(ac44525e09ce977a).(status)); |
| 1213 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 1214 | |
| 1215 | return (0); |
| 1216 | } |
| 1217 | |
| 1218 | oval_syschar_status_tcxx . . $ oval_syschar_status_t# probe_ent_getstatuscxx . . $ probe_ent_getstatus(b361a2e29ea6a769).(const SEXP_tcxx . . $ SEXP_t# * ent) |
| 1219 | { |
| 1220 | SEXP_tcxx . . $ SEXP_t# *val; |
| 1221 | oval_syschar_status_tcxx . . $ oval_syschar_status_t# sta; |
| 1222 | |
| 1223 | val = probe_ent_getattrvalcxx . . $ probe_ent_getattrval(42b37380d22a3312). (ent, "status"); |
| 1224 | |
| 1225 | if (val != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1226 | sta = (oval_syschar_status_tcxx . . $ oval_syschar_status_t#) SEXP_number_geti_32cxx . . $ SEXP_number_geti_32(e77439d026b7e3ce). (val); |
| 1227 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (val); |
| 1228 | } else { |
| 1229 | sta = SYSCHAR_STATUS_EXISTScxx . . $ SYSCHAR_STATUS_EXISTS.; |
| 1230 | } |
| 1231 | |
| 1232 | return (sta); |
| 1233 | } |
| 1234 | |
| 1235 | char *probe_ent_getnamecxx . . $ probe_ent_getname(c831a2fa12818dfe).(const SEXP_tcxx . . $ SEXP_t# * ent) |
| 1236 | { |
| 1237 | SEXP_tcxx . . $ SEXP_t# *ent_name; |
| 1238 | char *name_str; |
| 1239 | |
| 1240 | if (ent == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1241 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EFAULTcxx . . $ `<external>/8987895939074593727/errno-base.h:18:9`!; |
| 1242 | return (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1243 | } |
| 1244 | |
| 1245 | name_str = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1246 | ent_name = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(ent); |
| 1247 | |
| 1248 | if (ent_name == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1249 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 1250 | return (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1251 | } |
| 1252 | |
| 1253 | SEXP_type_tcxx . . $ SEXP_type_t# sexp_type = SEXP_typeofcxx . . $ SEXP_typeof(dfe0d2bfa8d6f3af).(ent_name); |
| 1254 | if (sexp_type == SEXP_TYPE_LISTcxx . . $ `src/OVAL/probes/SEAP/public/sexp-types.h:78:9`!) { |
| 1255 | SEXP_tcxx . . $ SEXP_t# *tmp; |
| 1256 | |
| 1257 | tmp = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(ent_name); |
| 1258 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent_name); |
| 1259 | ent_name = tmp; |
| 1260 | |
| 1261 | if (!SEXP_stringpcxx . . $ SEXP_stringp(85f078d1f48ac431).(ent_name)) { |
| 1262 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent_name); |
| 1263 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 1264 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1265 | } |
| 1266 | } |
| 1267 | if (sexp_type == SEXP_TYPE_LISTcxx . . $ `src/OVAL/probes/SEAP/public/sexp-types.h:78:9`! || sexp_type == SEXP_TYPE_STRINGcxx . . $ `src/OVAL/probes/SEAP/public/sexp-types.h:76:9`!) { |
| 1268 | if (SEXP_string_lengthcxx . . $ SEXP_string_length(7b7039adf1662ab5).(ent_name) > 0) |
| 1269 | name_str = SEXP_string_cstrcxx . . $ SEXP_string_cstr(c831a2fa12818dfe).(ent_name); |
| 1270 | else |
| 1271 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 1272 | } |
| 1273 | |
| 1274 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent_name); |
| 1275 | |
| 1276 | return (name_str); |
| 1277 | } |
| 1278 | |
| 1279 | size_t probe_ent_getname_rcxx . . $ probe_ent_getname_r(ca07af91a4fa826f).(const SEXP_tcxx . . $ SEXP_t# * ent, char *buffer, size_t buflen) |
| 1280 | { |
| 1281 | SEXP_tcxx . . $ SEXP_t# *ent_name; |
| 1282 | size_t name_len; |
| 1283 | |
| 1284 | if (ent == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1285 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EFAULTcxx . . $ `<external>/8987895939074593727/errno-base.h:18:9`!; |
| 1286 | return (0); |
| 1287 | } |
| 1288 | |
| 1289 | name_len = 0; |
| 1290 | ent_name = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(ent); |
| 1291 | |
| 1292 | if (ent_name == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1293 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 1294 | return (0); |
| 1295 | } |
| 1296 | |
| 1297 | SEXP_type_tcxx . . $ SEXP_type_t# sexp_type = SEXP_typeofcxx . . $ SEXP_typeof(dfe0d2bfa8d6f3af).(ent_name); |
| 1298 | if (sexp_type == SEXP_TYPE_LISTcxx . . $ `src/OVAL/probes/SEAP/public/sexp-types.h:78:9`!) { |
| 1299 | SEXP_tcxx . . $ SEXP_t# *tmp; |
| 1300 | |
| 1301 | tmp = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(ent_name); |
| 1302 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent_name); |
| 1303 | ent_name = tmp; |
| 1304 | |
| 1305 | if (!SEXP_stringpcxx . . $ SEXP_stringp(85f078d1f48ac431).(ent_name)) { |
| 1306 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent_name); |
| 1307 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 1308 | return name_len; |
| 1309 | } |
| 1310 | } |
| 1311 | if (sexp_type == SEXP_TYPE_LISTcxx . . $ `src/OVAL/probes/SEAP/public/sexp-types.h:78:9`! || sexp_type == SEXP_TYPE_STRINGcxx . . $ `src/OVAL/probes/SEAP/public/sexp-types.h:76:9`!) { |
| 1312 | if (SEXP_string_lengthcxx . . $ SEXP_string_length(7b7039adf1662ab5).(ent_name) > 0) |
| 1313 | name_len = SEXP_string_cstr_rcxx . . $ SEXP_string_cstr_r(ca07af91a4fa826f).(ent_name, buffer, buflen); |
| 1314 | else |
| 1315 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 1316 | } |
| 1317 | |
| 1318 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent_name); |
| 1319 | |
| 1320 | return (name_len); |
| 1321 | } |
| 1322 | |
| 1323 | void probe_freecxx . . $ probe_free(c6b28547479798f4).(SEXP_tcxx . . $ SEXP_t# * obj) |
| 1324 | { |
| 1325 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(obj); |
| 1326 | } |
| 1327 | |
| 1328 | void probe_filebehaviors_canonicalizecxx . . $ probe_filebehaviors_canonicalize(e661f441b24a5de6).(SEXP_tcxx . . $ SEXP_t# **behaviors) |
| 1329 | { |
| 1330 | SEXP_tcxx . . $ SEXP_t# *bhs, *r0; |
| 1331 | |
| 1332 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(behaviors != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1333 | |
| 1334 | bhs = *behaviors; |
| 1335 | |
| 1336 | if (!bhs) { |
| 1337 | r0 = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1338 | bhs = *behaviors = probe_ent_creat1cxx . . $ probe_ent_creat1(84b3695e4a0e659a).("behaviors", r0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1339 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 1340 | } |
| 1341 | |
| 1342 | if (!probe_ent_attrexistscxx . . $ probe_ent_attrexists(7326d2b72b90fa4d).(bhs, "max_depth")) { |
| 1343 | r0 = SEXP_string_newfcxx . . $ SEXP_string_newf(b2137ed863725962).("-1"); |
| 1344 | probe_ent_attr_addcxx . . $ probe_ent_attr_add(733bdcb6a09ce7ed).(bhs, "max_depth", r0); |
| 1345 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 1346 | } |
| 1347 | if (!probe_ent_attrexistscxx . . $ probe_ent_attrexists(7326d2b72b90fa4d).(bhs, "recurse")) { |
| 1348 | r0 = SEXP_string_newfcxx . . $ SEXP_string_newf(b2137ed863725962).("symlinks and directories"); |
| 1349 | probe_ent_attr_addcxx . . $ probe_ent_attr_add(733bdcb6a09ce7ed).(bhs, "recurse", r0); |
| 1350 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 1351 | } |
| 1352 | if (!probe_ent_attrexistscxx . . $ probe_ent_attrexists(7326d2b72b90fa4d).(bhs, "recurse_direction")) { |
| 1353 | r0 = SEXP_string_newfcxx . . $ SEXP_string_newf(b2137ed863725962).("none"); |
| 1354 | probe_ent_attr_addcxx . . $ probe_ent_attr_add(733bdcb6a09ce7ed).(bhs, "recurse_direction", r0); |
| 1355 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 1356 | } |
| 1357 | if (!probe_ent_attrexistscxx . . $ probe_ent_attrexists(7326d2b72b90fa4d).(bhs, "recurse_file_system")) { |
| 1358 | r0 = SEXP_string_newfcxx . . $ SEXP_string_newf(b2137ed863725962).("all"); |
| 1359 | probe_ent_attr_addcxx . . $ probe_ent_attr_add(733bdcb6a09ce7ed).(bhs, "recurse_file_system", r0); |
| 1360 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 1361 | } |
| 1362 | } |
| 1363 | |
| 1364 | void probe_tfc54behaviors_canonicalizecxx . . $ probe_tfc54behaviors_canonicalize(e661f441b24a5de6).(SEXP_tcxx . . $ SEXP_t# **behaviors) |
| 1365 | { |
| 1366 | SEXP_tcxx . . $ SEXP_t# *bhs, *r0; |
| 1367 | |
| 1368 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(behaviors != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1369 | |
| 1370 | bhs = *behaviors; |
| 1371 | |
| 1372 | if (!bhs) { |
| 1373 | r0 = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1374 | bhs = *behaviors = probe_ent_creat1cxx . . $ probe_ent_creat1(84b3695e4a0e659a).("behaviors", r0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1375 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 1376 | } |
| 1377 | |
| 1378 | probe_filebehaviors_canonicalizecxx . . $ probe_filebehaviors_canonicalize(e661f441b24a5de6).(&bhs); |
| 1379 | |
| 1380 | if (!probe_ent_attrexistscxx . . $ probe_ent_attrexists(7326d2b72b90fa4d).(bhs, "ignore_case")) { |
| 1381 | r0 = SEXP_string_newfcxx . . $ SEXP_string_newf(b2137ed863725962).("0"); |
| 1382 | probe_ent_attr_addcxx . . $ probe_ent_attr_add(733bdcb6a09ce7ed).(bhs, "ignore_case", r0); |
| 1383 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 1384 | } |
| 1385 | if (!probe_ent_attrexistscxx . . $ probe_ent_attrexists(7326d2b72b90fa4d).(bhs, "multiline")) { |
| 1386 | r0 = SEXP_string_newfcxx . . $ SEXP_string_newf(b2137ed863725962).("1"); |
| 1387 | probe_ent_attr_addcxx . . $ probe_ent_attr_add(733bdcb6a09ce7ed).(bhs, "multiline", r0); |
| 1388 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 1389 | } |
| 1390 | if (!probe_ent_attrexistscxx . . $ probe_ent_attrexists(7326d2b72b90fa4d).(bhs, "singleline")) { |
| 1391 | r0 = SEXP_string_newfcxx . . $ SEXP_string_newf(b2137ed863725962).("0"); |
| 1392 | probe_ent_attr_addcxx . . $ probe_ent_attr_add(733bdcb6a09ce7ed).(bhs, "singleline", r0); |
| 1393 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 1394 | } |
| 1395 | } |
| 1396 | |
| 1397 | /** |
| 1398 | * Return a copy of the supplied item with optimized memory representation |
| 1399 | */ |
| 1400 | static SEXP_tcxx . . $ SEXP_t# *probe_item_optimizecxx . . $ probe_item_optimize(2f7f980afaaae0f0).(const SEXP_tcxx . . $ SEXP_t# *item) |
| 1401 | { |
| 1402 | // todo |
| 1403 | return SEXP_refcxx . . $ SEXP_ref(2f7f980afaaae0f0).(item); |
| 1404 | } |
| 1405 | |
| 1406 | /** |
| 1407 | * The order of (value_name, value_type, *value) argument tuples passed as |
| 1408 | * e.g. 3rd to 5th arguments matters. If you change ordering of those tuples, |
| 1409 | * it will have consequences. |
| 1410 | */ |
| 1411 | SEXP_tcxx . . $ SEXP_t# *probe_item_createcxx . . $ probe_item_create(36b16a6622050a9c).(oval_subtype_tcxx . . $ oval_subtype_t# item_subtype, probe_elmatr_tcxx . . $ probe_elmatr_t# *item_attributes[], |
| 1412 | /* const char *value_name, oval_datatype_t value_type, void *value, */ ...) |
| 1413 | { |
| 1414 | va_listcxx . . $ va_list# ap; |
| 1415 | SEXP_tcxx . . $ SEXP_t# *item, *name_sexp, *value_sexp = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, *entity; |
| 1416 | SEXP_tcxx . . $ SEXP_t# value_sexp_mem, entity_mem; |
| 1417 | const char *value_name, *subtype_name, *family_name; |
| 1418 | oval_family_tcxx . . $ oval_family_t# family; |
| 1419 | char item_name[128]; |
| 1420 | oval_datatype_tcxx . . $ oval_datatype_t# value_type; |
| 1421 | |
| 1422 | char *value_str, **value_stra; |
| 1423 | int64_tcxx . . $ int64_t# value_int; |
| 1424 | double value_flt; |
| 1425 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! value_bool; |
| 1426 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! free_value = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1427 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! multiplied; |
| 1428 | int value_i, multiply; |
| 1429 | |
| 1430 | subtype_name = oval_subtype_to_strcxx . . $ oval_subtype_to_str(ee6b3dcae047e21f).(item_subtype); |
| 1431 | |
| 1432 | if (subtype_name == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1433 | dEcxx . . $ `src/common/debug_priv.h:63:9`!("Invalid/Unknown subtype: %d", (int)item_subtype); |
| 1434 | return (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1435 | } |
| 1436 | |
| 1437 | family = oval_subtype_get_familycxx . . $ oval_subtype_get_family(16c965cbeb40760).(item_subtype); |
| 1438 | family_name = oval_family_get_textcxx . . $ oval_family_get_text(e0888d2a111f8f85).(family); |
| 1439 | snprintfcxx . . $ snprintf(ea502d73e74c754c).(item_name, sizeof(item_name), "%s:%s_item", family_name, subtype_name); |
| 1440 | |
| 1441 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(ap, item_attributes); |
| 1442 | |
| 1443 | item = probe_item_newcxx . . $ probe_item_new(ca18d10048afa0ff).(item_name, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1444 | value_name = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, const char *); |
| 1445 | |
| 1446 | while (value_name != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1447 | value_i = 0; |
| 1448 | multiply = 1; |
| 1449 | multiplied = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1450 | value_type = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, oval_datatype_t); |
| 1451 | |
| 1452 | switch (value_type) { |
| 1453 | case OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING.: |
| 1454 | value_str = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, char *); |
| 1455 | |
| 1456 | if (value_str == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1457 | goto skip; |
| 1458 | |
| 1459 | value_sexp = SEXP_string_new_rcxx . . $ SEXP_string_new_r(26dc94eb5d76b6d1).(&value_sexp_mem, value_str, strlencxx . . $ strlen(751346f8406fd082).(value_str)); |
| 1460 | break; |
| 1461 | case OVAL_DATATYPE_STRING_Mcxx . . $ OVAL_DATATYPE_STRING_M.: |
| 1462 | value_type = OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING.; |
| 1463 | value_stra = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, char **); |
| 1464 | multiplied = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1465 | multiply = 0; |
| 1466 | |
| 1467 | if (value_stra == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1468 | goto skip; |
| 1469 | |
| 1470 | while (value_stra[multiply] != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1471 | ++multiply; |
| 1472 | |
| 1473 | value_sexp = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(SEXP_tcxx . . $ SEXP_t#) * multiply); |
| 1474 | |
| 1475 | for (value_i = 0; value_i < multiply; ++value_i) |
| 1476 | SEXP_string_new_rcxx . . $ SEXP_string_new_r(26dc94eb5d76b6d1).(value_sexp + value_i, value_stra[value_i], strlencxx . . $ strlen(751346f8406fd082).(value_stra[value_i])); |
| 1477 | |
| 1478 | value_i = 0; |
| 1479 | break; |
| 1480 | case OVAL_DATATYPE_BOOLEANcxx . . $ OVAL_DATATYPE_BOOLEAN.: |
| 1481 | value_bool = (boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`!)va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, int); |
| 1482 | value_sexp = SEXP_number_newb_rcxx . . $ SEXP_number_newb_r(bfab421e9c5f4f7d).(&value_sexp_mem, value_bool); |
| 1483 | break; |
| 1484 | case OVAL_DATATYPE_INTEGERcxx . . $ OVAL_DATATYPE_INTEGER.: |
| 1485 | value_int = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, int64_t); |
| 1486 | value_sexp = SEXP_number_newi_64_rcxx . . $ SEXP_number_newi_64_r(9cdf56af611bb354).(&value_sexp_mem, value_int); |
| 1487 | break; |
| 1488 | case OVAL_DATATYPE_FLOATcxx . . $ OVAL_DATATYPE_FLOAT.: |
| 1489 | value_flt = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, double); |
| 1490 | value_sexp = SEXP_number_newf_rcxx . . $ SEXP_number_newf_r(68c776018390b2f6).(&value_sexp_mem, value_flt); |
| 1491 | break; |
| 1492 | case OVAL_DATATYPE_SEXPcxx . . $ OVAL_DATATYPE_SEXP.: |
| 1493 | value_sexp = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, SEXP_t *); |
| 1494 | |
| 1495 | if (value_sexp == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1496 | goto skip; |
| 1497 | else |
| 1498 | free_value = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1499 | |
| 1500 | value_type = _sexp_val_getdatatypecxx . . $ _sexp_val_getdatatype(576ef4d818d367a9).(value_sexp); |
| 1501 | break; |
| 1502 | case OVAL_DATATYPE_RECORDcxx . . $ OVAL_DATATYPE_RECORD.: |
| 1503 | entity = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, SEXP_t *); |
| 1504 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(item, entity); |
| 1505 | goto skip; |
| 1506 | case OVAL_DATATYPE_EVR_STRINGcxx . . $ OVAL_DATATYPE_EVR_STRING.: |
| 1507 | case OVAL_DATATYPE_DEBIAN_EVR_STRINGcxx . . $ OVAL_DATATYPE_DEBIAN_EVR_STRING.: |
| 1508 | case OVAL_DATATYPE_FILESET_REVISIONcxx . . $ OVAL_DATATYPE_FILESET_REVISION.: |
| 1509 | case OVAL_DATATYPE_IOS_VERSIONcxx . . $ OVAL_DATATYPE_IOS_VERSION.: |
| 1510 | case OVAL_DATATYPE_IPV4ADDRcxx . . $ OVAL_DATATYPE_IPV4ADDR.: |
| 1511 | case OVAL_DATATYPE_IPV6ADDRcxx . . $ OVAL_DATATYPE_IPV6ADDR.: |
| 1512 | case OVAL_DATATYPE_VERSIONcxx . . $ OVAL_DATATYPE_VERSION.: |
| 1513 | value_str = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, char *); |
| 1514 | value_sexp = SEXP_string_new_rcxx . . $ SEXP_string_new_r(26dc94eb5d76b6d1).(&value_sexp_mem, value_str, strlencxx . . $ strlen(751346f8406fd082).(value_str)); |
| 1515 | |
| 1516 | break; |
| 1517 | /* TODO */ |
| 1518 | case OVAL_DATATYPE_BINARYcxx . . $ OVAL_DATATYPE_BINARY.: |
| 1519 | case OVAL_DATATYPE_UNKNOWNcxx . . $ OVAL_DATATYPE_UNKNOWN.: |
| 1520 | dEcxx . . $ `src/common/debug_priv.h:63:9`!("Unknown or unsupported OVAL datatype: %d, '%s', name: '%s'.", |
| 1521 | value_type, oval_datatype_get_text(value_type), value_name); |
| 1522 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(item); |
| 1523 | |
| 1524 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(ap); |
| 1525 | return (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1526 | } |
| 1527 | |
| 1528 | name_sexp = probe_ncache_refcxx . . $ probe_ncache_ref(be2a40239769fba4).(OSCAP_GSYMcxx . . $ `src/common/util.h:444:9`!(ncache), value_name); |
| 1529 | |
| 1530 | while(value_i < multiply) { |
| 1531 | entity = SEXP_list_new_rcxx . . $ SEXP_list_new_r(13a47b36db2620da).(&entity_mem, name_sexp, value_sexp + value_i, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1532 | |
| 1533 | if (probe_ent_setdatatypecxx . . $ probe_ent_setdatatype(fec947bd1b7be7b5).(entity, value_type) != 0) { |
| 1534 | SEXP_free_rcxx . . $ SEXP_free_r(c6b28547479798f4).(&entity_mem); |
| 1535 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(name_sexp); |
| 1536 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(item); |
| 1537 | |
| 1538 | if (free_value) { |
| 1539 | while(value_i < multiply) |
| 1540 | SEXP_free_rcxx . . $ SEXP_free_r(c6b28547479798f4).(value_sexp + value_i++); |
| 1541 | if (multiplied) |
| 1542 | freecxx . . $ free(5d22bdacc48458e8).(value_sexp); |
| 1543 | } |
| 1544 | |
| 1545 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(ap); |
| 1546 | return (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1547 | } |
| 1548 | |
| 1549 | if (item == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || entity == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || name_sexp == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1550 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1551 | } |
| 1552 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(item, entity); |
| 1553 | SEXP_free_rcxx . . $ SEXP_free_r(c6b28547479798f4).(&entity_mem); |
| 1554 | |
| 1555 | if (free_value) |
| 1556 | SEXP_free_rcxx . . $ SEXP_free_r(c6b28547479798f4).(value_sexp + value_i); |
| 1557 | ++value_i; |
| 1558 | } |
| 1559 | |
| 1560 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(name_sexp); |
| 1561 | |
| 1562 | if (multiplied) |
| 1563 | freecxx . . $ free(5d22bdacc48458e8).(value_sexp); |
| 1564 | skip: |
| 1565 | value_name = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(ap, const char *); |
| 1566 | free_value = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1567 | } |
| 1568 | |
| 1569 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(ap); |
| 1570 | return (item); |
| 1571 | } |
| 1572 | |
| 1573 | oval_operation_tcxx . . $ oval_operation_t# probe_ent_getoperationcxx . . $ probe_ent_getoperation(8f085ec993ec77d).(SEXP_tcxx . . $ SEXP_t# *entity, oval_operation_tcxx . . $ oval_operation_t# default_op) |
| 1574 | { |
| 1575 | oval_operation_tcxx . . $ oval_operation_t# ret; |
| 1576 | SEXP_tcxx . . $ SEXP_t# *aval; |
| 1577 | |
| 1578 | if (entity == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1579 | dWcxx . . $ `src/common/debug_priv.h:62:9`!("entity == NULL"); |
| 1580 | return (OVAL_OPERATION_UNKNOWNcxx . . $ OVAL_OPERATION_UNKNOWN.); |
| 1581 | } |
| 1582 | |
| 1583 | aval = probe_ent_getattrvalcxx . . $ probe_ent_getattrval(42b37380d22a3312).(entity, "operation"); |
| 1584 | |
| 1585 | if (aval == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1586 | dWcxx . . $ `src/common/debug_priv.h:62:9`!("Attribute \"operation\" not found. Using default."); |
| 1587 | return (default_op); |
| 1588 | } |
| 1589 | |
| 1590 | if (!SEXP_numberpcxx . . $ SEXP_numberp(85f078d1f48ac431).(aval)) { |
| 1591 | dWcxx . . $ `src/common/debug_priv.h:62:9`!("Invalid type"); |
| 1592 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(aval); |
| 1593 | return (OVAL_OPERATION_UNKNOWNcxx . . $ OVAL_OPERATION_UNKNOWN.); |
| 1594 | } |
| 1595 | |
| 1596 | ret = SEXP_number_geti_32cxx . . $ SEXP_number_geti_32(e77439d026b7e3ce).(aval); |
| 1597 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(aval); |
| 1598 | |
| 1599 | return (ret); |
| 1600 | } |
| 1601 | |
| 1602 | int probe_item_add_msgcxx . . $ probe_item_add_msg(c5b7a86259de5bd8).(SEXP_tcxx . . $ SEXP_t# *item, oval_message_level_tcxx . . $ oval_message_level_t# msglvl, char *msgfmt, ...) |
| 1603 | { |
| 1604 | va_listcxx . . $ va_list# ap; |
| 1605 | SEXP_tcxx . . $ SEXP_t# lvl_sexp, msg_sexp; |
| 1606 | SEXP_tcxx . . $ SEXP_t# *attrs; |
| 1607 | char msg_buffer[1024]; |
| 1608 | int msg_length; |
| 1609 | |
| 1610 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(ap, msgfmt); |
| 1611 | |
| 1612 | msg_length = vsnprintfcxx . . $ vsnprintf(a85eea89d1bd834f).(msg_buffer, sizeof msg_buffer, msgfmt, ap); |
| 1613 | |
| 1614 | if (msg_length < 0) { |
| 1615 | dEcxx . . $ `src/common/debug_priv.h:63:9`!("vsnprintf failed! errno=%u, %s.", errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!, strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)); |
| 1616 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(ap); |
| 1617 | return (-1); |
| 1618 | } |
| 1619 | |
| 1620 | if ((size_t)msg_length >= sizeof msg_buffer) { |
| 1621 | dEcxx . . $ `src/common/debug_priv.h:63:9`!("message too long!"); |
| 1622 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(ap); |
| 1623 | return (-1); |
| 1624 | } |
| 1625 | |
| 1626 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(ap); |
| 1627 | |
| 1628 | SEXP_number_newu_32_rcxx . . $ SEXP_number_newu_32_r(3d152c928d5432a1).(&lvl_sexp, msglvl); |
| 1629 | SEXP_string_new_rcxx . . $ SEXP_string_new_r(26dc94eb5d76b6d1).(&msg_sexp, msg_buffer, msg_length); |
| 1630 | |
| 1631 | attrs = probe_attr_creatcxx . . $ probe_attr_creat(5e3fef9c42f0315b).("level", &lvl_sexp, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1632 | probe_item_ent_addcxx . . $ probe_item_ent_add(9f488d3b029fc9d1).(item, "message", attrs, &msg_sexp); |
| 1633 | |
| 1634 | SEXP_free_rcxx . . $ SEXP_free_r(c6b28547479798f4).(&lvl_sexp); |
| 1635 | SEXP_free_rcxx . . $ SEXP_free_r(c6b28547479798f4).(&msg_sexp); |
| 1636 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(attrs); |
| 1637 | |
| 1638 | return (0); |
| 1639 | } |
| 1640 | |
| 1641 | SEXP_tcxx . . $ SEXP_t# *probe_entval_from_cstrcxx . . $ probe_entval_from_cstr(abb8c272acf0bd7e).(oval_datatype_tcxx . . $ oval_datatype_t# type, |
| 1642 | const char *value, size_t vallen) |
| 1643 | { |
| 1644 | SEXP_tcxx . . $ SEXP_t# *ent_val = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1645 | |
| 1646 | if (value == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || vallen == 0) |
| 1647 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1648 | |
| 1649 | switch (type) { |
| 1650 | case OVAL_DATATYPE_FLOATcxx . . $ OVAL_DATATYPE_FLOAT.: |
| 1651 | { |
| 1652 | double val; |
| 1653 | char *end = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1654 | |
| 1655 | val = strto_doublecxx . . $ strto_double(6cb3f5e89ce30b0b).(value, vallen, &end); |
| 1656 | ent_val = SEXP_number_newfcxx . . $ SEXP_number_newf(653b1881b211aa0d).(val); |
| 1657 | |
| 1658 | } break; |
| 1659 | case OVAL_DATATYPE_INTEGERcxx . . $ OVAL_DATATYPE_INTEGER.: |
| 1660 | { |
| 1661 | int64_tcxx . . $ int64_t# val; |
| 1662 | char *end; |
| 1663 | |
| 1664 | val = strto_int64cxx . . $ strto_int64(77ec108ed7a21b00).(value, vallen, &end, 10); |
| 1665 | ent_val = SEXP_number_newi_64cxx . . $ SEXP_number_newi_64(986154d47f221621).(val); |
| 1666 | |
| 1667 | } break; |
| 1668 | case OVAL_DATATYPE_BOOLEANcxx . . $ OVAL_DATATYPE_BOOLEAN.: |
| 1669 | switch(vallen) { |
| 1670 | case 1: |
| 1671 | switch(*value) |
| 1672 | { |
| 1673 | case '1': |
| 1674 | ent_val = SEXP_number_newbcxx . . $ SEXP_number_newb(f1e7d218d08e4133).(truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 1675 | break; |
| 1676 | case '0': |
| 1677 | ent_val = SEXP_number_newbcxx . . $ SEXP_number_newb(f1e7d218d08e4133).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 1678 | break; |
| 1679 | } |
| 1680 | break; |
| 1681 | case 4: |
| 1682 | if (oscap_strncasecmpcxx . . $ oscap_strncasecmp(fd278af2f295fa2e).(value, "true", 4) == 0) |
| 1683 | ent_val = SEXP_number_newbcxx . . $ SEXP_number_newb(f1e7d218d08e4133).(truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 1684 | break; |
| 1685 | case 5: |
| 1686 | if (oscap_strncasecmpcxx . . $ oscap_strncasecmp(fd278af2f295fa2e).(value, "false", 5) == 0) |
| 1687 | ent_val = SEXP_number_newbcxx . . $ SEXP_number_newb(f1e7d218d08e4133).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 1688 | break; |
| 1689 | } |
| 1690 | |
| 1691 | if (ent_val == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1692 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1693 | break; |
| 1694 | |
| 1695 | |
| 1696 | case OVAL_DATATYPE_IPV4ADDRcxx . . $ OVAL_DATATYPE_IPV4ADDR.: |
| 1697 | { |
| 1698 | struct in_addrcxx . . $ in_addr# ip4; |
| 1699 | |
| 1700 | if (inet_ptoncxx . . $ inet_pton(8d303d671d73812).(AF_INETcxx . . $ `<external>/8962547315054503424/socket.h:97:9`!, value, &ip4) != 1) |
| 1701 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1702 | } break; |
| 1703 | case OVAL_DATATYPE_IPV6ADDRcxx . . $ OVAL_DATATYPE_IPV6ADDR.: |
| 1704 | { |
| 1705 | struct in6_addrcxx . . $ in6_addr# ip6; |
| 1706 | |
| 1707 | if (inet_ptoncxx . . $ inet_pton(8d303d671d73812).(AF_INET6cxx . . $ `<external>/8962547315054503424/socket.h:105:9`!, value, &ip6) != 1) |
| 1708 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1709 | } break; |
| 1710 | |
| 1711 | case OVAL_DATATYPE_EVR_STRINGcxx . . $ OVAL_DATATYPE_EVR_STRING.: |
| 1712 | case OVAL_DATATYPE_DEBIAN_EVR_STRINGcxx . . $ OVAL_DATATYPE_DEBIAN_EVR_STRING.: |
| 1713 | case OVAL_DATATYPE_FILESET_REVISIONcxx . . $ OVAL_DATATYPE_FILESET_REVISION.: |
| 1714 | case OVAL_DATATYPE_IOS_VERSIONcxx . . $ OVAL_DATATYPE_IOS_VERSION.: |
| 1715 | case OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING.: |
| 1716 | case OVAL_DATATYPE_VERSIONcxx . . $ OVAL_DATATYPE_VERSION.: |
| 1717 | break; |
| 1718 | |
| 1719 | case OVAL_DATATYPE_BINARYcxx . . $ OVAL_DATATYPE_BINARY.: |
| 1720 | case OVAL_DATATYPE_SEXPcxx . . $ OVAL_DATATYPE_SEXP.: |
| 1721 | case OVAL_DATATYPE_UNKNOWNcxx . . $ OVAL_DATATYPE_UNKNOWN.: |
| 1722 | case OVAL_DATATYPE_STRING_Mcxx . . $ OVAL_DATATYPE_STRING_M.: |
| 1723 | case OVAL_DATATYPE_RECORDcxx . . $ OVAL_DATATYPE_RECORD.: |
| 1724 | default: |
| 1725 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1726 | } |
| 1727 | |
| 1728 | /* |
| 1729 | * If we got here and ent_val is still NULL, then |
| 1730 | * no special conversion procedure is needed and |
| 1731 | * we can simply create an SEXP string... |
| 1732 | */ |
| 1733 | if (ent_val == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1734 | ent_val = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2).(value, vallen); |
| 1735 | |
| 1736 | return ent_val; |
| 1737 | } |
| 1738 | |
| 1739 | SEXP_tcxx . . $ SEXP_t# *probe_ent_from_cstrcxx . . $ probe_ent_from_cstr(935b1e6d5a5c8d85).(const char *name, oval_datatype_tcxx . . $ oval_datatype_t# type, |
| 1740 | const char *value, size_t vallen) |
| 1741 | { |
| 1742 | SEXP_tcxx . . $ SEXP_t# *ent = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, *ent_val = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1743 | |
| 1744 | if (name == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || value == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || vallen == 0) |
| 1745 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1746 | |
| 1747 | ent_val = probe_entval_from_cstrcxx . . $ probe_entval_from_cstr(abb8c272acf0bd7e).(type, value, vallen); |
| 1748 | |
| 1749 | if (ent_val == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1750 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1751 | |
| 1752 | /* Create the entity... */ |
| 1753 | ent = probe_ent_creat1cxx . . $ probe_ent_creat1(84b3695e4a0e659a).(name, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, ent_val); |
| 1754 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent_val); |
| 1755 | |
| 1756 | /* ...and annotate with the specified OVAL datatype */ |
| 1757 | if (probe_ent_setdatatypecxx . . $ probe_ent_setdatatype(fec947bd1b7be7b5).(ent, type) != 0) { |
| 1758 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent); |
| 1759 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1760 | } |
| 1761 | |
| 1762 | return ent; |
| 1763 | } |
| 1764 | |
| 1765 | SEXP_tcxx . . $ SEXP_t# *probe_obj_getmaskcxx . . $ probe_obj_getmask(478b347fcbbad3c5).(SEXP_tcxx . . $ SEXP_t# *obj) |
| 1766 | { |
| 1767 | SEXP_tcxx . . $ SEXP_t# *objents, *ent, *ent_name, *mask; |
| 1768 | |
| 1769 | SEXP_VALIDATEcxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:576:10`!(obj); |
| 1770 | |
| 1771 | if (obj == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1772 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1773 | |
| 1774 | ent = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1775 | mask = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1776 | objents = SEXP_list_restcxx . . $ SEXP_list_rest(2f7f980afaaae0f0).(obj); |
| 1777 | |
| 1778 | SEXP_list_foreachcxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:470:9`!(ent, objents) { |
| 1779 | ent_name = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(ent); |
| 1780 | |
| 1781 | if (SEXP_listpcxx . . $ SEXP_listp(85f078d1f48ac431).(ent_name)) { |
| 1782 | SEXP_tcxx . . $ SEXP_t# *nr; |
| 1783 | |
| 1784 | nr = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(ent_name); |
| 1785 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent_name); |
| 1786 | ent_name = nr; |
| 1787 | |
| 1788 | if (probe_ent_attrexistscxx . . $ probe_ent_attrexists(7326d2b72b90fa4d).(ent, "mask")) |
| 1789 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(mask, ent_name); |
| 1790 | } |
| 1791 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent_name); |
| 1792 | } |
| 1793 | |
| 1794 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(objents); |
| 1795 | return (mask); |
| 1796 | } |
| 1797 | |
| 1798 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! probe_path_is_blockedcxx . . $ probe_path_is_blocked(6f786adec44f4a13).(const char *path, struct oscap_listcxx . . $ oscap_list# *blocked_paths) |
| 1799 | { |
| 1800 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! res = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1801 | struct oscap_iteratorcxx . . $ oscap_iterator# *it = oscap_iterator_newcxx . . $ oscap_iterator_new(f89fb456dfd589d7).(blocked_paths); |
| 1802 | while (oscap_iterator_has_morecxx . . $ oscap_iterator_has_more(63b1de9a5adb9205).(it)) { |
| 1803 | const char *item = oscap_iterator_nextcxx . . $ oscap_iterator_next(4c75051c806960eb).(it); |
| 1804 | if (oscap_path_startswithcxx . . $ oscap_path_startswith(b7a7aa4a824b7595).(path, item)) { |
| 1805 | res = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1806 | break; |
| 1807 | } |
| 1808 | } |
| 1809 | oscap_iterator_freecxx . . $ oscap_iterator_free(3cba44c1b7872358).(it); |
| 1810 | return res; |
| 1811 | } |
| 1812 | |
| 1813 | /// @} |