Debian Codegraph @

src/OVAL/probes/probe/worker.c

raw symbols SCIP
1 /*
2 * Copyright 2011 Red Hat Inc., Durham, North Carolina.
3 * All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 *
19 * Authors:
20 * Daniel Kopecek <[email protected]>
21 */
22
23 #ifdef HAVE_CONFIG_Hcxx . . $ `<built-in>:409:9`!
24 #include <config.h>cxx . . $ `<file>/build/config.h`/
25 #endif
26
27 #include "_seap.h"cxx . . $ `<file>/src/OVAL/probes/SEAP/_seap.h`/
28 #include <stdio.h>
29 #include <fcntl.h>
30 #include <stdlib.h>
31 #include <string.h>
32 #include <pthread.h>
33 #include <errno.h>
34
35 #if defined(OS_FREEBSD)
36 #include <pthread_np.h>
37 #endif
38
39 #if defined(OS_OSX)
40 /* XXX: please see https://github.com/OpenSCAP/openscap/pull/1626 for the
41 * reason of explicitly defining an external here instead of simply
42 * including the unistd.h header file.
43 */
44 extern int chroot(const char *);
45 #endif
46
47 #include "probe-api.h"cxx . . $ `<file>/src/OVAL/probes/public/probe-api.h`/
48 #include "common/debug_priv.h"cxx . . $ `<file>/src/common/debug_priv.h`/
49 #include "entcmp.h"cxx . . $ `<file>/src/OVAL/probes/probe/entcmp.h`/
50
51 #include "worker.h"cxx . . $ `<file>/src/OVAL/probes/probe/worker.h`/
52 #include "probe-table.h"cxx . . $ `<file>/src/OVAL/probes/public/probe-table.h`/
53 #include "probe.h"cxx . . $ `<file>/src/OVAL/probes/probe/probe.h`/
54
55 extern boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! OSCAP_GSYMcxx . . $ `src/common/util.h:444:9`!(varref_handling);
56 extern void *OSCAP_GSYMcxx . . $ `src/common/util.h:444:9`!(probe_arg);
57
58 // Dummy pthread routine
59 static void *dummy_routinecxx . . $ dummy_routine(9f162e79bfc6c74).(void *dummy_param)
60 {
61 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
62 }
63
64 static void preload_libraries_before_chrootcxx . . $ preload_libraries_before_chroot(d878ad36e69247c7).()
65 {
66 // Force to load dynamic libraries used by pthread_cancel
67 pthread_tcxx . . $ pthread_t# t;
68 if (pthread_createcxx . . $ pthread_create(2141a84bcac899e5).(&t, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, dummy_routinecxx . . $ dummy_routine(9f162e79bfc6c74)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)) {
69 dEcxx . . $ `src/common/debug_priv.h:63:9`!("pthread_create failed: %s", strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!));
70 }
71 pthread_cancelcxx . . $ pthread_cancel(15f694ef3c96d230).(t);
72 pthread_joincxx . . $ pthread_join(269902cf949f12c5).(t, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
73 }
74
75 static void pthread_pair_cleanup_handlercxx . . $ pthread_pair_cleanup_handler(5d22bdacc48458e8).(void *arg)
76 {
77 probe_pwpair_tcxx . . $ probe_pwpair_t# *pair = (probe_pwpair_tcxx . . $ probe_pwpair_t# *)arg;
78 dWcxx . . $ `src/common/debug_priv.h:62:9`!("Probe worker thread finished unxpectedly, trying to avoid deadlock now...");
79 SEAP_replyerrcxx . . $ SEAP_replyerr(9c3156c1fad5b304).(pair->probecxx . . $ $anonymous_type_f5d5f76501d695aa_1#probe.->SEAP_ctxcxx . . $ $anonymous_type_3aeea60fe9979420_0#SEAP_ctx., pair->probecxx . . $ $anonymous_type_f5d5f76501d695aa_1#probe.->sdcxx . . $ $anonymous_type_3aeea60fe9979420_0#sd., pair->pthcxx . . $ $anonymous_type_f5d5f76501d695aa_1#pth.->msgcxx . . $ $anonymous_type_f5d5f76501d695aa_0#msg., -100);
80 }
81
82 void *probe_worker_runfncxx . . $ probe_worker_runfn(9f162e79bfc6c74).(void *arg)
83 {
84 dDcxx . . $ `src/common/debug_priv.h:64:9`!("probe_worker_runfn has started");
85 probe_pwpair_tcxx . . $ probe_pwpair_t# *pair = (probe_pwpair_tcxx . . $ probe_pwpair_t# *)arg;
86
87 SEXP_tcxx . . $ SEXP_t# *probe_res, *obj, *oid;
88 int probe_ret;
89
90 #if defined(HAVE_PTHREAD_SETNAME_NPcxx . . $ `build/config.h:53:9`!)
91 # if defined(OS_APPLE)
92 pthread_setname_np("probe_worker");
93 # else
94 pthread_setname_npcxx . . $ pthread_setname_np(bee54c13bee684da).(pthread_selfcxx . . $ pthread_self(f708dce9a8856c70).(), "probe_worker");
95 # endif
96 #endif
97 dDcxx . . $ `src/common/debug_priv.h:64:9`!("handling SEAP message ID %u", pair->pth->sid);
98 pthread_cleanup_pushcxx . . $ `<external>/14712363683955484316/pthread.h:681:10`!(pthread_pair_cleanup_handler, (void *)pair);
99
100 //
101 probe_ret = -1;
102 probe_res = pair->pthcxx . . $ $anonymous_type_f5d5f76501d695aa_1#pth.->msg_handlercxx . . $ $anonymous_type_f5d5f76501d695aa_0#msg_handler.(pair->probecxx . . $ $anonymous_type_f5d5f76501d695aa_1#probe., pair->pthcxx . . $ $anonymous_type_f5d5f76501d695aa_1#pth.->msgcxx . . $ $anonymous_type_f5d5f76501d695aa_0#msg., &probe_ret);
103 //
104 dDcxx . . $ `src/common/debug_priv.h:64:9`!("handler result = %p, return code = %d", probe_res, probe_ret);
105
106 if (probe_res == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
107 dEcxx . . $ `src/common/debug_priv.h:63:9`!("An error was returned by the input message handler: %s.", strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!));
108 exitcxx . . $ exit(3ca292c338df9bb3).(1);
109 }
110
111 /* Assuming that the red-black tree API is doing locking for us... */
112 if (rbt_i32_delcxx . . $ rbt_i32_del(fbdfcf5a3c6c46ec).(pair->probecxx . . $ $anonymous_type_f5d5f76501d695aa_1#probe.->workerscxx . . $ $anonymous_type_3aeea60fe9979420_0#workers., pair->pthcxx . . $ $anonymous_type_f5d5f76501d695aa_1#pth.->sidcxx . . $ $anonymous_type_f5d5f76501d695aa_0#sid., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) != 0) {
113 dWcxx . . $ `src/common/debug_priv.h:62:9`!("thread not found in the probe thread tree, probably canceled by an external signal");
114 /*
115 * XXX: this is a possible deadlock; we can't send anything from
116 * here because the signal handler replied to the message
117 */
118 arg = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
119
120 SEAP_msg_freecxx . . $ SEAP_msg_free(4995d55015d41e57).(pair->pthcxx . . $ $anonymous_type_f5d5f76501d695aa_1#pth.->msgcxx . . $ $anonymous_type_f5d5f76501d695aa_0#msg.);
121 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(probe_res);
122 freecxx . . $ free(5d22bdacc48458e8).(pair);
123
124 dDcxx . . $ `src/common/debug_priv.h:64:9`!("probe_worker_runfn has finished");
125 return (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
126 } else {
127 SEXP_tcxx . . $ SEXP_t# *items;
128
129 dDcxx . . $ `src/common/debug_priv.h:64:9`!("probe thread deleted");
130
131 obj = SEAP_msg_getcxx . . $ SEAP_msg_get(265ef69b98da50a9).(pair->pthcxx . . $ $anonymous_type_f5d5f76501d695aa_1#pth.->msgcxx . . $ $anonymous_type_f5d5f76501d695aa_0#msg.);
132 oid = probe_obj_getattrvalcxx . . $ probe_obj_getattrval(42b37380d22a3312).(obj, "id");
133 items = probe_cobj_get_itemscxx . . $ probe_cobj_get_items(2f7f980afaaae0f0).(probe_res);
134
135 if (items != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
136 SEXP_list_sortcxx . . $ SEXP_list_sort(f1a1abf038bb4496).(items, SEXP_refcmpcxx . . $ SEXP_refcmp(40f0d25f01d6dc5f).);
137 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(items);
138 }
139
140 if (probe_rcache_sexp_addcxx . . $ probe_rcache_sexp_add(2a038249cafd8515).(pair->probecxx . . $ $anonymous_type_f5d5f76501d695aa_1#probe.->rcachecxx . . $ $anonymous_type_3aeea60fe9979420_0#rcache., oid, probe_res) != 0) {
141 /* TODO */
142 abortcxx . . $ abort(8df32a62017fbbf6).();
143 }
144 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(obj);
145 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(oid);
146 }
147
148 if (probe_ret != 0) {
149 /*
150 * Something bad happened. A hint of the cause is stored as a error code in
151 * probe_ret (should be). We'll send it to the library using a SEAP error packet.
152 */
153 if (SEAP_replyerrcxx . . $ SEAP_replyerr(9c3156c1fad5b304).(pair->probecxx . . $ $anonymous_type_f5d5f76501d695aa_1#probe.->SEAP_ctxcxx . . $ $anonymous_type_3aeea60fe9979420_0#SEAP_ctx., pair->probecxx . . $ $anonymous_type_f5d5f76501d695aa_1#probe.->sdcxx . . $ $anonymous_type_3aeea60fe9979420_0#sd., pair->pthcxx . . $ $anonymous_type_f5d5f76501d695aa_1#pth.->msgcxx . . $ $anonymous_type_f5d5f76501d695aa_0#msg., probe_ret) == -1) {
154 int ret = errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!;
155
156 dEcxx . . $ `src/common/debug_priv.h:63:9`!("An error ocured while sending error status. errno=%u, %s.", errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!, strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!));
157 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(probe_res);
158
159 /* FIXME */
160 exitcxx . . $ exit(3ca292c338df9bb3).(ret);
161 }
162 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(probe_res);
163 } else {
164 SEAP_msg_tcxx . . $ SEAP_msg_t# *seap_reply;
165 /*
166 * OK, the probe actually returned something, let's send it to the library.
167 */
168 seap_reply = SEAP_msg_newcxx . . $ SEAP_msg_new(b76a66c6f733d68f).();
169 SEAP_msg_setcxx . . $ SEAP_msg_set(780f103242f3120a).(seap_reply, probe_res);
170
171 if (SEAP_replycxx . . $ SEAP_reply(86996c4f120c23bc).(pair->probecxx . . $ $anonymous_type_f5d5f76501d695aa_1#probe.->SEAP_ctxcxx . . $ $anonymous_type_3aeea60fe9979420_0#SEAP_ctx., pair->probecxx . . $ $anonymous_type_f5d5f76501d695aa_1#probe.->sdcxx . . $ $anonymous_type_3aeea60fe9979420_0#sd., seap_reply, pair->pthcxx . . $ $anonymous_type_f5d5f76501d695aa_1#pth.->msgcxx . . $ $anonymous_type_f5d5f76501d695aa_0#msg.) == -1) {
172 int ret = errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!;
173
174 SEAP_msg_freecxx . . $ SEAP_msg_free(4995d55015d41e57).(seap_reply);
175 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(probe_res);
176
177 exitcxx . . $ exit(3ca292c338df9bb3).(ret);
178 }
179
180 SEAP_msg_freecxx . . $ SEAP_msg_free(4995d55015d41e57).(seap_reply);
181 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(probe_res);
182 }
183
184 SEAP_msg_freecxx . . $ SEAP_msg_free(4995d55015d41e57).(pair->pthcxx . . $ $anonymous_type_f5d5f76501d695aa_1#pth.->msgcxx . . $ $anonymous_type_f5d5f76501d695aa_0#msg.);
185 freecxx . . $ free(5d22bdacc48458e8).(pair->pthcxx . . $ $anonymous_type_f5d5f76501d695aa_1#pth.);
186 freecxx . . $ free(5d22bdacc48458e8).(pair);
187 pthread_detachcxx . . $ pthread_detach(15f694ef3c96d230).(pthread_selfcxx . . $ pthread_self(f708dce9a8856c70).());
188
189 pthread_cleanup_popcxx . . $ `<external>/14712363683955484316/pthread.h:702:10`!(0);
190
191 dDcxx . . $ `src/common/debug_priv.h:64:9`!("probe_worker_runfn has finished");
192 return (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
193 }
194
195 probe_worker_tcxx . . $ probe_worker_t# *probe_worker_newcxx . . $ probe_worker_new(9faedb07d76d304d).(void)
196 {
197 probe_worker_tcxx . . $ probe_worker_t# *pth = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(probe_worker_tcxx . . $ probe_worker_t#));
198
199 pth->sidcxx . . $ $anonymous_type_f5d5f76501d695aa_0#sid. = 0;
200 #ifndef OS_WINDOWS
201 pth->tidcxx . . $ $anonymous_type_f5d5f76501d695aa_0#tid. = 0;
202 #endif
203 pth->msg_handlercxx . . $ $anonymous_type_f5d5f76501d695aa_0#msg_handler. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
204 pth->msgcxx . . $ $anonymous_type_f5d5f76501d695aa_0#msg. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
205
206 return (pth);
207 }
208
209 struct probe_varref_ctxcxx . . $ probe_varref_ctx# {
210 SEXP_tcxx . . $ SEXP_t# *pi2cxx . . $ probe_varref_ctx#pi2.;
211 unsigned int ent_cntcxx . . $ probe_varref_ctx#ent_cnt.;
212 struct probe_varref_ctx_entcxx . . $ probe_varref_ctx_ent# *ent_lstcxx . . $ probe_varref_ctx#ent_lst.;
213 };
214
215 struct probe_varref_ctx_entcxx . . $ probe_varref_ctx_ent# {
216 SEXP_tcxx . . $ SEXP_t# *ent_name_srefcxx . . $ probe_varref_ctx_ent#ent_name_sref.;
217 unsigned int val_cntcxx . . $ probe_varref_ctx_ent#val_cnt.;
218 unsigned int next_val_idxcxx . . $ probe_varref_ctx_ent#next_val_idx.;
219 };
220
221 static void probe_varref_destroy_ctxcxx . . $ probe_varref_destroy_ctx(313deea73972a4e0).(struct probe_varref_ctxcxx . . $ probe_varref_ctx# *ctx);
222
223 static int probe_varref_create_ctxcxx . . $ probe_varref_create_ctx(61023b8d00b843ee).(const SEXP_tcxx . . $ SEXP_t# *probe_in, SEXP_tcxx . . $ SEXP_t# *varrefs, struct probe_varref_ctxcxx . . $ probe_varref_ctx# **octx)
224 {
225 unsigned int i, ent_cnt, val_cnt;
226 SEXP_tcxx . . $ SEXP_t# *ent_name, *ent, *varref, *val_lst;
227 SEXP_tcxx . . $ SEXP_t# *r0, *r1, *r2, *r3;
228 SEXP_tcxx . . $ SEXP_t# *vid, *vidx_name, *vidx_val;
229
230 /* varref_cnt = SEXP_number_getu_32(r0 = SEXP_list_nth(varrefs, 2)); */
231 ent_cnt = SEXP_number_getu_32cxx . . $ SEXP_number_getu_32(60e3bd3ad0f89996).(r1 = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(varrefs, 3));
232 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r1);
233
234 if (ent_cnt == UINT32_MAXcxx . . $ `<external>/3415975807581488833/stdint.h:118:10`!)
235 return -1;
236
237 struct probe_varref_ctxcxx . . $ probe_varref_ctx# *ctx = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(struct probe_varref_ctxcxx . . $ probe_varref_ctx#));
238 ctx->pi2cxx . . $ probe_varref_ctx#pi2. = SEXP_softrefcxx . . $ SEXP_softref(478b347fcbbad3c5).((SEXP_tcxx . . $ SEXP_t# *)probe_in);
239 ctx->ent_cntcxx . . $ probe_varref_ctx#ent_cnt. = ent_cnt;
240 ctx->ent_lstcxx . . $ probe_varref_ctx#ent_lst. = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(ent_cnt * sizeof (ctx->ent_lstcxx . . $ probe_varref_ctx#ent_lst.[0]));
241
242 vidx_name = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2).(":val_idx", 8);
243 vidx_val = SEXP_number_newucxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:133:9`!(0);
244
245 /* entities that use var_refs are stored at the begining of an object */
246 for (i = 0; i < ent_cnt; ++i) {
247 /*
248 * add variable values to entities and insert
249 * them into the new probe_in object
250 */
251 r0 = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(ctx->pi2cxx . . $ probe_varref_ctx#pi2., i + 2);
252 vid = probe_ent_getattrvalcxx . . $ probe_ent_getattrval(42b37380d22a3312).(r0, "var_ref");
253 r1 = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(r0);
254 r2 = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(r1);
255
256 r3 = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(r2, vidx_name, vidx_val, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
257 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0);
258 r0 = SEXP_list_restcxx . . $ SEXP_list_rest(2f7f980afaaae0f0).(r1);
259 ent_name = SEXP_list_joincxx . . $ SEXP_list_join(fcf1a664115faa7).(r3, r0);
260 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0);
261 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r1);
262 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r2);
263 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r3);
264
265 SEXP_sublist_foreachcxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:480:9`!(varref, varrefs, 4, SEXP_LIST_ENDcxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:483:9`!) {
266 r0 = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(varref);
267 if (!SEXP_string_cmpcxx . . $ SEXP_string_cmp(40f0d25f01d6dc5f).(vid, r0)) {
268 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0);
269 break;
270 }
271 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0);
272 }
273
274 if (varref == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
275 char *var_id = SEXP_string_cstrcxx . . $ SEXP_string_cstr(c831a2fa12818dfe).(vid);
276 dEcxx . . $ `src/common/debug_priv.h:63:9`!("Unexpected error: variable id \"%s\" not found in varrefs.", var_id);
277 freecxx . . $ free(5d22bdacc48458e8).(var_id);
278 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(vid);
279 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent_name);
280 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(vidx_name);
281 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(vidx_val);
282 probe_varref_destroy_ctxcxx . . $ probe_varref_destroy_ctx(313deea73972a4e0).(ctx);
283 return -1;
284 }
285
286 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(vid);
287
288 r0 = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(varref, 2);
289 val_cnt = SEXP_number_getu_32cxx . . $ SEXP_number_getu_32(60e3bd3ad0f89996).(r0);
290 val_lst = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(varref, 3);
291 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(varref);
292 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0);
293
294 ent = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(ent_name, val_lst, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
295 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent_name);
296 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(val_lst);
297
298 r0 = SEXP_list_replacecxx . . $ SEXP_list_replace(e5ee5adb82430ce5).(ctx->pi2cxx . . $ probe_varref_ctx#pi2., i + 2, ent);
299 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0);
300 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent);
301
302 r0 = SEXP_listref_nthcxx . . $ SEXP_listref_nth(3d152c928d5432a1).(ctx->pi2cxx . . $ probe_varref_ctx#pi2., i + 2);
303 ctx->ent_lstcxx . . $ probe_varref_ctx#ent_lst.[i].ent_name_srefcxx . . $ probe_varref_ctx_ent#ent_name_sref. = SEXP_listref_firstcxx . . $ SEXP_listref_first(478b347fcbbad3c5).(r0);
304 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0);
305 ctx->ent_lstcxx . . $ probe_varref_ctx#ent_lst.[i].val_cntcxx . . $ probe_varref_ctx_ent#val_cnt. = val_cnt;
306 ctx->ent_lstcxx . . $ probe_varref_ctx#ent_lst.[i].next_val_idxcxx . . $ probe_varref_ctx_ent#next_val_idx. = 0;
307 }
308
309 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(vidx_name);
310 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(vidx_val);
311
312 *octx = ctx;
313
314 return 0;
315 }
316
317 static void probe_varref_destroy_ctxcxx . . $ probe_varref_destroy_ctx(313deea73972a4e0).(struct probe_varref_ctxcxx . . $ probe_varref_ctx# *ctx)
318 {
319 struct probe_varref_ctx_entcxx . . $ probe_varref_ctx_ent# *ent, *ent_end;
320
321 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ctx->pi2cxx . . $ probe_varref_ctx#pi2.);
322
323 ent = ctx->ent_lstcxx . . $ probe_varref_ctx#ent_lst.;
324 ent_end = ent + ctx->ent_cntcxx . . $ probe_varref_ctx#ent_cnt.;
325
326 while (ent != ent_end) {
327 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ent->ent_name_srefcxx . . $ probe_varref_ctx_ent#ent_name_sref.);
328 ++ent;
329 }
330
331 freecxx . . $ free(5d22bdacc48458e8).(ctx->ent_lstcxx . . $ probe_varref_ctx#ent_lst.);
332 freecxx . . $ free(5d22bdacc48458e8).(ctx);
333 }
334
335 static int probe_varref_iterate_ctxcxx . . $ probe_varref_iterate_ctx(edcc92cba1a37f42).(struct probe_varref_ctxcxx . . $ probe_varref_ctx# *ctx)
336 {
337 unsigned int val_cnt, *next_val_idx;
338 SEXP_tcxx . . $ SEXP_t# *ent_name_sref;
339 SEXP_tcxx . . $ SEXP_t# *r0, *r1, *r2;
340 struct probe_varref_ctx_entcxx . . $ probe_varref_ctx_ent# *ent, *ent_end;
341
342 ent = ctx->ent_lstcxx . . $ probe_varref_ctx#ent_lst.;
343 ent_end = ent + ctx->ent_cntcxx . . $ probe_varref_ctx#ent_cnt.;
344 val_cnt = ent->val_cntcxx . . $ probe_varref_ctx_ent#val_cnt.;
345 next_val_idx = &ent->next_val_idxcxx . . $ probe_varref_ctx_ent#next_val_idx.;
346 ent_name_sref = ent->ent_name_srefcxx . . $ probe_varref_ctx_ent#ent_name_sref.;
347
348 r0 = SEXP_number_newucxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:133:9`!(0);
349
350 while (++(*next_val_idx) >= val_cnt) {
351 if (++ent == ent_end) {
352 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0);
353 return 0;
354 }
355
356 *next_val_idx = 0;
357 r1 = SEXP_list_replacecxx . . $ SEXP_list_replace(e5ee5adb82430ce5).(ent_name_sref, 3, r0);
358 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r1);
359
360 val_cnt = ent->val_cntcxx . . $ probe_varref_ctx_ent#val_cnt.;
361 next_val_idx = &ent->next_val_idxcxx . . $ probe_varref_ctx_ent#next_val_idx.;
362 ent_name_sref = ent->ent_name_srefcxx . . $ probe_varref_ctx_ent#ent_name_sref.;
363 }
364 r1 = SEXP_list_replacecxx . . $ SEXP_list_replace(e5ee5adb82430ce5).(ent_name_sref, 3, r2 = SEXP_number_newucxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:133:9`!(*next_val_idx));
365
366 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0);
367 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r1);
368 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r2);
369
370 return 1;
371 }
372
373 #define MAX_EVAL_DEPTHcxx . . $ `src/OVAL/probes/probe/worker.c:373:9`! 8 /**< maximum recursion depth for set evaluation */
374
375 /**
376 * Fetch states from the library. This function performs the state fetch operation
377 * that is used by the set evaluation function to fetch states that aren't available
378 * in the probe cache. The operation is implemented using a remote synchronous SEAP
379 * command. The fetched states are added to the probe cache by this function.
380 *
381 * @param id_list list of requested state ids
382 * @retval list list of fetched states, the possition in the list corresponds to the
383 * possition in the id_list
384 * @retval NULL on failure or when some of the ids do not refer to existing states in
385 * the associated OVAL document
386 */
387 static SEXP_tcxx . . $ SEXP_t# *probe_ste_fetchcxx . . $ probe_ste_fetch(ff60eea1d04db58f).(probe_tcxx . . $ probe_t# *probe, SEXP_tcxx . . $ SEXP_t# *id_list)
388 {
389 SEXP_tcxx . . $ SEXP_t# *res, *ste, *id;
390 uint32_tcxx . . $ uint32_t# i_len, r_len;
391
392 i_len = SEXP_list_lengthcxx . . $ SEXP_list_length(7b7039adf1662ab5).(id_list);
393
394 if (i_len == 0)
395 return SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
396
397 res = SEAP_cmd_execcxx . . $ SEAP_cmd_exec(68703026cc6e447d).(probe->SEAP_ctxcxx . . $ $anonymous_type_3aeea60fe9979420_0#SEAP_ctx., probe->sdcxx . . $ $anonymous_type_3aeea60fe9979420_0#sd., 0, PROBECMD_STE_FETCHcxx . . $ `src/OVAL/probes/public/probe-api.h:440:9`!, id_list, SEAP_CMDTYPE_SYNCcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:44:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
398
399 r_len = SEXP_list_lengthcxx . . $ SEXP_list_length(7b7039adf1662ab5).(res);
400
401 if (i_len != r_len) {
402 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(res);
403 return (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
404 }
405
406 for (; i_len > 0; --i_len) {
407 ste = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(res, i_len);
408 id = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(id_list, i_len);
409
410 _Acxx . . $ `src/common/debug_priv.h:43:9`!(id != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
411 _Acxx . . $ `src/common/debug_priv.h:43:9`!(ste != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
412
413 if (probe_rcache_sexp_addcxx . . $ probe_rcache_sexp_add(2a038249cafd8515).(probe->rcachecxx . . $ $anonymous_type_3aeea60fe9979420_0#rcache., id, ste) != 0) {
414
415 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(res);
416 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ste);
417 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(id);
418
419 return (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
420 }
421
422 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ste);
423 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(id);
424 }
425
426 return (res);
427 }
428
429 /**
430 * Evaluate an OVAL object identified by its id. Using a remote
431 * synchronous SEAP command, this function executes evaluation of an
432 * OVAL object which results weren't found in the probe cache. This
433 * indirectly spawns a new thread in the probe process which evaluates
434 * the object and stores the result in the probe cache. That result is
435 * not send to the library because it doesn't know how to handle
436 * it. Instead, the result is fetched by this function from the cache
437 * and returned to the caller.
438 * @param id the id of the OVAL object to be evaluated
439 * @return the result of the evaluation of the object or NULL on failure
440 */
441 static SEXP_tcxx . . $ SEXP_t# *probe_obj_evalcxx . . $ probe_obj_eval(ff60eea1d04db58f).(probe_tcxx . . $ probe_t# *probe, SEXP_tcxx . . $ SEXP_t# *id)
442 {
443 SEXP_tcxx . . $ SEXP_t# *res, *rid;
444
445 res = SEAP_cmd_execcxx . . $ SEAP_cmd_exec(68703026cc6e447d).(probe->SEAP_ctxcxx . . $ $anonymous_type_3aeea60fe9979420_0#SEAP_ctx., probe->sdcxx . . $ $anonymous_type_3aeea60fe9979420_0#sd., 0, PROBECMD_OBJ_EVALcxx . . $ `src/OVAL/probes/public/probe-api.h:441:9`!, id, SEAP_CMDTYPE_SYNCcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:44:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
446
447 rid = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(res);
448 if (SEXP_string_cmpcxx . . $ SEXP_string_cmp(40f0d25f01d6dc5f).(id, rid) != 0) {
449 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(res);
450 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(rid);
451 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
452 }
453 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(res);
454 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(rid);
455
456 return probe_rcache_sexp_getcxx . . $ probe_rcache_sexp_get(ce64d4c7f6269eda).(probe->rcachecxx . . $ $anonymous_type_3aeea60fe9979420_0#rcache., id);
457 }
458
459 static SEXP_tcxx . . $ SEXP_t# *probe_prepare_filterscxx . . $ probe_prepare_filters(ff60eea1d04db58f).(probe_tcxx . . $ probe_t# *probe, SEXP_tcxx . . $ SEXP_t# *obj)
460 {
461 SEXP_tcxx . . $ SEXP_t# *filters;
462 int i;
463
464 filters = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
465
466 for (i = 1; ; ++i) {
467 SEXP_tcxx . . $ SEXP_t# *of, *f, *ste, *ste_id, *act;
468
469 of = probe_obj_getentcxx . . $ probe_obj_getent(7907a01f2ff841f3).(obj, "filter", i);
470
471 if (of == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
472 break;
473
474 act = probe_ent_getattrvalcxx . . $ probe_ent_getattrval(42b37380d22a3312).(of, "action");
475 ste_id = probe_ent_getvalcxx . . $ probe_ent_getval(2f7f980afaaae0f0).(of);
476 ste = probe_rcache_sexp_getcxx . . $ probe_rcache_sexp_get(ce64d4c7f6269eda).(probe->rcachecxx . . $ $anonymous_type_3aeea60fe9979420_0#rcache., ste_id);
477
478 if (ste == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
479 SEXP_tcxx . . $ SEXP_t# *r0, *r1;
480
481 r0 = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(ste_id, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
482 r1 = probe_ste_fetchcxx . . $ probe_ste_fetch(ff60eea1d04db58f).(probe, r0);
483 ste = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(r1);
484
485 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0);
486 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r1);
487 }
488 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(of);
489 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ste_id);
490
491 f = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(act, ste, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
492 SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(filters, f);
493
494 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(act);
495 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ste);
496 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(f);
497 }
498
499 return filters;
500 }
501
502 /**
503 * Combine two collections of items using an operation.
504 * @param cobj1 item collection
505 * @param cobj2 item collection
506 * @param op operation
507 * @return the result of the operation
508 */
509 static SEXP_tcxx . . $ SEXP_t# *probe_set_combinecxx . . $ probe_set_combine(86113b9d504a2e84).(SEXP_tcxx . . $ SEXP_t# *cobj0, SEXP_tcxx . . $ SEXP_t# *cobj1, oval_setobject_operation_tcxx . . $ oval_setobject_operation_t# op)
510 {
511 SEXP_tcxx . . $ SEXP_t# *set0, *set1, *res_cobj, *cobj0_mask, *cobj1_mask, *res_mask;
512 register int cmp;
513 register SEXP_tcxx . . $ SEXP_t# *item0, *item1, *res;
514 register SEXP_list_itcxx . . $ SEXP_list_it# *sit0, *sit1;
515 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# res_flag;
516
517 if (cobj0 == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
518 return SEXP_refcxx . . $ SEXP_ref(2f7f980afaaae0f0).(cobj1);
519 if (cobj1 == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
520 return SEXP_refcxx . . $ SEXP_ref(2f7f980afaaae0f0).(cobj0);
521
522 set0 = probe_cobj_get_itemscxx . . $ probe_cobj_get_items(2f7f980afaaae0f0).(cobj0);
523 set1 = probe_cobj_get_itemscxx . . $ probe_cobj_get_items(2f7f980afaaae0f0).(cobj1);
524 cobj0_mask = probe_cobj_get_maskcxx . . $ probe_cobj_get_mask(2f7f980afaaae0f0).(cobj0);
525 cobj1_mask = probe_cobj_get_maskcxx . . $ probe_cobj_get_mask(2f7f980afaaae0f0).(cobj1);
526
527 /* prepare storage for results */
528 res = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
529 res_flag = probe_cobj_combine_flagscxx . . $ probe_cobj_combine_flags(1090683b7fc8f1f4).(probe_cobj_get_flagcxx . . $ probe_cobj_get_flag(e91d00b32587b9e6).(cobj0),
530 probe_cobj_get_flagcxx . . $ probe_cobj_get_flag(e91d00b32587b9e6).(cobj1), op);
531 res_mask = SEXP_list_joincxx . . $ SEXP_list_join(fcf1a664115faa7).(cobj0_mask, cobj1_mask);
532
533 /* prepare iterators & first items */
534 sit0 = SEXP_list_it_newcxx . . $ SEXP_list_it_new(2de72d43957235bf).(set0);
535 sit1 = SEXP_list_it_newcxx . . $ SEXP_list_it_new(2de72d43957235bf).(set1);
536 item0 = SEXP_list_it_nextcxx . . $ SEXP_list_it_next(f72e6ecf0b5bba25).(sit0);
537 item1 = SEXP_list_it_nextcxx . . $ SEXP_list_it_next(f72e6ecf0b5bba25).(sit1);
538
539 /* perform the set operation */
540 switch(op) {
541 case OVAL_SET_OPERATION_UNIONcxx . . $ OVAL_SET_OPERATION_UNION.:
542 while (item0 != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && item1 != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
543 cmp = SEXP_refcmpcxx . . $ SEXP_refcmp(40f0d25f01d6dc5f).(item0, item1);
544
545 if (cmp < 0) {
546 SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(res, item0);
547 item0 = SEXP_list_it_nextcxx . . $ SEXP_list_it_next(f72e6ecf0b5bba25).(sit0);
548 } else if (cmp > 0) {
549 SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(res, item1);
550 item1 = SEXP_list_it_nextcxx . . $ SEXP_list_it_next(f72e6ecf0b5bba25).(sit1);
551 } else {
552 SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(res, item0);
553 item0 = SEXP_list_it_nextcxx . . $ SEXP_list_it_next(f72e6ecf0b5bba25).(sit0);
554 item1 = SEXP_list_it_nextcxx . . $ SEXP_list_it_next(f72e6ecf0b5bba25).(sit1);
555 }
556 }
557
558 if (item0 != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
559 do {
560 SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(res, item0);
561 } while((item0 = SEXP_list_it_nextcxx . . $ SEXP_list_it_next(f72e6ecf0b5bba25).(sit0)) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
562 } else if (item1 != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
563 do {
564 SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(res, item1);
565 } while((item1 = SEXP_list_it_nextcxx . . $ SEXP_list_it_next(f72e6ecf0b5bba25).(sit1)) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
566 }
567
568 break;
569 case OVAL_SET_OPERATION_INTERSECTIONcxx . . $ OVAL_SET_OPERATION_INTERSECTION.:
570 while (item0 != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && item1 != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
571 cmp = SEXP_refcmpcxx . . $ SEXP_refcmp(40f0d25f01d6dc5f).(item0, item1);
572
573 if (cmp < 0)
574 item0 = SEXP_list_it_nextcxx . . $ SEXP_list_it_next(f72e6ecf0b5bba25).(sit0);
575 else if (cmp > 0)
576 item1 = SEXP_list_it_nextcxx . . $ SEXP_list_it_next(f72e6ecf0b5bba25).(sit1);
577 else {
578 SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(res, item0);
579 item0 = SEXP_list_it_nextcxx . . $ SEXP_list_it_next(f72e6ecf0b5bba25).(sit0);
580 item1 = SEXP_list_it_nextcxx . . $ SEXP_list_it_next(f72e6ecf0b5bba25).(sit1);
581 }
582 }
583
584 break;
585 case OVAL_SET_OPERATION_COMPLEMENTcxx . . $ OVAL_SET_OPERATION_COMPLEMENT.:
586 while (item0 != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && item1 != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
587 cmp = SEXP_refcmpcxx . . $ SEXP_refcmp(40f0d25f01d6dc5f).(item0, item1);
588
589 if (cmp < 0) {
590 SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(res, item0);
591 item0 = SEXP_list_it_nextcxx . . $ SEXP_list_it_next(f72e6ecf0b5bba25).(sit0);
592 } else if (cmp > 0) {
593 item1 = SEXP_list_it_nextcxx . . $ SEXP_list_it_next(f72e6ecf0b5bba25).(sit1);
594 } else {
595 item0 = SEXP_list_it_nextcxx . . $ SEXP_list_it_next(f72e6ecf0b5bba25).(sit0);
596 item1 = SEXP_list_it_nextcxx . . $ SEXP_list_it_next(f72e6ecf0b5bba25).(sit1);
597 }
598 }
599
600 if (item0 != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
601 do {
602 SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(res, item0);
603 } while((item0 = SEXP_list_it_nextcxx . . $ SEXP_list_it_next(f72e6ecf0b5bba25).(sit0)) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
604 }
605
606 break;
607 default:
608 dEcxx . . $ `src/common/debug_priv.h:63:9`!("Unknown set operation: %d", op);
609 abortcxx . . $ abort(8df32a62017fbbf6).();
610 }
611
612 SEXP_list_it_freecxx . . $ SEXP_list_it_free(d620acf0ef959856).(sit0);
613 SEXP_list_it_freecxx . . $ SEXP_list_it_free(d620acf0ef959856).(sit1);
614
615 /*
616 * If the collected information is complete but all the items are
617 * removed, the flag is set to SYSCHAR_FLAG_DOES_NOT_EXIST
618 */
619 if (res_flag == SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE. && SEXP_list_lengthcxx . . $ SEXP_list_length(7b7039adf1662ab5).(res) == 0)
620 res_flag = SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.;
621
622 res_cobj = probe_cobj_newcxx . . $ probe_cobj_new(4e082355872fd045).(res_flag, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, res, res_mask);
623
624 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(set0);
625 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(set1);
626 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(res);
627 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(res_mask);
628 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(cobj0_mask);
629 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(cobj1_mask);
630
631 // todo: variables
632
633 return (res_cobj);
634 }
635
636 /**
637 * Apply a set of filters to a collected object.
638 * @param cobj item collection
639 * @param filter set (list) of filters
640 * @return collection of items without items that match any of the filters in the input set
641 */
642 static SEXP_tcxx . . $ SEXP_t# *probe_set_apply_filterscxx . . $ probe_set_apply_filters(aede1b20b47248cf).(SEXP_tcxx . . $ SEXP_t# *cobj, SEXP_tcxx . . $ SEXP_t# *filters)
643 {
644 SEXP_tcxx . . $ SEXP_t# *result_items, *items, *item, *mask;
645 oval_syschar_status_tcxx . . $ oval_syschar_status_t# item_status;
646 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag;
647
648 result_items = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
649 flag = probe_cobj_get_flagcxx . . $ probe_cobj_get_flag(e91d00b32587b9e6).(cobj);
650 items = probe_cobj_get_itemscxx . . $ probe_cobj_get_items(2f7f980afaaae0f0).(cobj);
651 mask = probe_cobj_get_maskcxx . . $ probe_cobj_get_mask(2f7f980afaaae0f0).(cobj);
652
653 SEXP_list_foreachcxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:470:9`!(item, items) {
654 item_status = probe_ent_getstatuscxx . . $ probe_ent_getstatus(b361a2e29ea6a769).(item);
655
656 switch (item_status) {
657 case SYSCHAR_STATUS_DOES_NOT_EXISTcxx . . $ SYSCHAR_STATUS_DOES_NOT_EXIST.:
658 continue;
659 case SYSCHAR_STATUS_ERRORcxx . . $ SYSCHAR_STATUS_ERROR.:
660 break;
661 case SYSCHAR_STATUS_NOT_COLLECTEDcxx . . $ SYSCHAR_STATUS_NOT_COLLECTED.:
662 {
663 SEXP_tcxx . . $ SEXP_t# *r0, *r1;
664
665 r0 = probe_msg_creatfcxx . . $ probe_msg_creatf(2da488f08a70551b).(OVAL_MESSAGE_LEVEL_ERRORcxx . . $ OVAL_MESSAGE_LEVEL_ERROR.,
666 "Supplied item has an invalid status: %d.", item_status);
667 r1 = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(r0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
668 cobj = probe_cobj_newcxx . . $ probe_cobj_new(4e082355872fd045).(SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR., r1, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
669 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(items);
670 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(item);
671 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(result_items);
672 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0);
673 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r1);
674 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(mask);
675 return cobj;
676 }
677 default:
678 break;
679 }
680
681 if (!probe_item_filteredcxx . . $ probe_item_filtered(24018bafaaa94db3).(item, filters)) {
682 SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(result_items, item);
683 }
684 }
685
686 /*
687 * If the collected information is complete but all the items are
688 * filtered out, the flag is set to SYSCHAR_FLAG_DOES_NOT_EXIST
689 */
690 if (flag == SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.
691 && SEXP_list_lengthcxx . . $ SEXP_list_length(7b7039adf1662ab5).(result_items) == 0)
692 flag = SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.;
693
694 cobj = probe_cobj_newcxx . . $ probe_cobj_new(4e082355872fd045).(flag, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, result_items, mask);
695 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(items);
696 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(result_items);
697 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(mask);
698
699 return cobj;
700 }
701
702 /**
703 * Evaluate a set. This function takes care of evaluating a set of either two other sets
704 * or an object and 0..n filters. Objects are evaluated using the probe_obj_eval function
705 * and filters are fetched using the probe_ste_fetch function.
706 * @param set the set to be evaluated
707 * @param depth maximum recursion depth
708 * @return the result of the evaluation or NULL on failure
709 */
710 static SEXP_tcxx . . $ SEXP_t# *probe_set_evalcxx . . $ probe_set_eval(ae0684b04c6802cd).(probe_tcxx . . $ probe_t# *probe, SEXP_tcxx . . $ SEXP_t# *set, size_t depth)
711 {
712 SEXP_tcxx . . $ SEXP_t# *filters_u, *filters_a, *filters_req;
713
714 SEXP_tcxx . . $ SEXP_t# *s_subset[2];
715 size_t s_subset_i;
716 SEXP_tcxx . . $ SEXP_t# *o_subset[2];
717 size_t o_subset_i;
718
719 SEXP_tcxx . . $ SEXP_t# *member;
720 char member_name[24];
721
722 SEXP_tcxx . . $ SEXP_t# *op_val;
723 int op_num;
724
725 SEXP_tcxx . . $ SEXP_t# *r0, *r1, *result, *Omsg = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
726
727 if (depth > MAX_EVAL_DEPTHcxx . . $ `src/OVAL/probes/probe/worker.c:373:9`!) {
728 char *fmt = "probe_set_eval: Too many levels: max=%zu.";
729 #ifndef NDEBUGcxx . . $ `<built-in>:425:9`!
730 dD(fmt, (size_t) MAX_EVAL_DEPTH);
731 abort();
732 #endif
733 r0 = probe_msg_creatfcxx . . $ probe_msg_creatf(2da488f08a70551b).(OVAL_MESSAGE_LEVEL_ERRORcxx . . $ OVAL_MESSAGE_LEVEL_ERROR., fmt, (size_t) MAX_EVAL_DEPTHcxx . . $ `src/OVAL/probes/probe/worker.c:373:9`!);
734 r1 = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(r0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
735 result = probe_cobj_newcxx . . $ probe_cobj_new(4e082355872fd045).(SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR., r1, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
736 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0);
737 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r1);
738 return result;
739 }
740
741 filters_u = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); /* unavailable filters */
742 filters_a = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); /* available filters (cached) */
743 filters_req = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); /* request list for probe_ste_fetch() */
744
745 s_subset[0] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
746 s_subset[1] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
747 s_subset_i = 0;
748
749 o_subset[0] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
750 o_subset[1] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
751 o_subset_i = 0;
752
753 result = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
754
755 op_val = probe_ent_getattrvalcxx . . $ probe_ent_getattrval(42b37380d22a3312).(set, "operation");
756
757 if (op_val != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
758 op_num = SEXP_number_geti_32cxx . . $ SEXP_number_geti_32(e77439d026b7e3ce).(op_val);
759 else
760 op_num = OVAL_SET_OPERATION_UNIONcxx . . $ OVAL_SET_OPERATION_UNION.;
761
762 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(op_val);
763
764 _Acxx . . $ `src/common/debug_priv.h:43:9`!(op_num == OVAL_SET_OPERATION_UNION ||
765 op_num == OVAL_SET_OPERATION_COMPLEMENT || op_num == OVAL_SET_OPERATION_INTERSECTION);
766
767 #define probe_set_foreachcxx . . $ `src/OVAL/probes/probe/worker.c:767:9`!(elm_var, set_list) SEXP_sublist_foreachcxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:480:9`! (elm_var, set_list, 2, 1000)
768 #define CASEcxx . . $ `src/OVAL/probes/probe/worker.c:768:9`!(__c1, __rest) case (__c1): if (strcmp (__rest, member_name + 1) == 0)
769
770 probe_set_foreachcxx . . $ `src/OVAL/probes/probe/worker.c:767:9`!(member, set) {
771 if (probe_ent_getname_rcxx . . $ probe_ent_getname_r(ca07af91a4fa826f).(member, member_name, sizeof member_name) == 0) {
772 Omsg = probe_msg_creatfcxx . . $ probe_msg_creatf(2da488f08a70551b).(OVAL_MESSAGE_LEVEL_ERRORcxx . . $ OVAL_MESSAGE_LEVEL_ERROR.,
773 "probe_set_eval: Invalid set element: ptr=%p, type=%s.", member, SEXP_strtypecxx . . $ SEXP_strtype(d49ba2cc1d178e85).(member));
774 goto eval_fail;
775 }
776
777 if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).("set", member_name) == 0) {
778 /*
779 * Handle a (sub)set entity
780 */
781 if (s_subset_i < 2) {
782 s_subset[s_subset_i] = probe_set_evalcxx . . $ probe_set_eval(ae0684b04c6802cd).(probe, member, depth + 1);
783
784 if (s_subset[s_subset_i] == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
785 Omsg = probe_msg_creatfcxx . . $ probe_msg_creatf(2da488f08a70551b).(OVAL_MESSAGE_LEVEL_ERRORcxx . . $ OVAL_MESSAGE_LEVEL_ERROR.,
786 "probe_set_eval: Recursive set evaluation failed: m=%p, d=%zu.",
787 member, depth + 1);
788 goto eval_fail;
789 }
790
791 ++s_subset_i;
792 } else {
793 Omsg = probe_msg_creatfcxx . . $ probe_msg_creatf(2da488f08a70551b).(OVAL_MESSAGE_LEVEL_ERRORcxx . . $ OVAL_MESSAGE_LEVEL_ERROR.,
794 "probe_set_eval: More than 2 \"set\".");
795 goto eval_fail;
796 }
797 } else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).("obj_ref", member_name) == 0) {
798 /*
799 * Handle an object reference
800 */
801 SEXP_tcxx . . $ SEXP_t# *OID; /**< OVAL object ID */
802 SEXP_tcxx . . $ SEXP_t# *objres; /**< Result of the evaluation */
803 char OID_cstr[128];
804
805 dDcxx . . $ `src/common/debug_priv.h:64:9`!("Handling object_reference");
806
807 if ((OID = probe_ent_getvalcxx . . $ probe_ent_getval(2f7f980afaaae0f0).(member)) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
808 Omsg = probe_msg_creatfcxx . . $ probe_msg_creatf(2da488f08a70551b).(OVAL_MESSAGE_LEVEL_ERRORcxx . . $ OVAL_MESSAGE_LEVEL_ERROR.,
809 "%s: missing object_reference entity value!", __FUNCTION__);
810 goto eval_fail;
811 }
812 #ifndef NDEBUGcxx . . $ `<built-in>:425:9`!
813 SEXP_string_cstr_r(OID, OID_cstr, sizeof OID_cstr);
814 dD("Looking for the result in cache: OID=%s", OID_cstr);
815 #endif
816 if ((objres = probe_rcache_sexp_getcxx . . $ probe_rcache_sexp_get(ce64d4c7f6269eda).(probe->rcachecxx . . $ $anonymous_type_3aeea60fe9979420_0#rcache., OID)) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
817 dDcxx . . $ `src/common/debug_priv.h:64:9`!("MISS => requesting object evaluation from the library");
818
819 objres = probe_obj_evalcxx . . $ probe_obj_eval(ff60eea1d04db58f).(probe, OID);
820
821 dDcxx . . $ `src/common/debug_priv.h:64:9`!("EVAL: result=%p", objres);
822 if (objres != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
823 dOcxx . . $ `src/common/debug_priv.h:58:10`!(OSCAP_DEBUGOBJ_SEXPcxx . . $ `src/common/debug_priv.h:40:9`!, objres);
824 } else {
825 SEXP_string_cstr_rcxx . . $ SEXP_string_cstr_r(ca07af91a4fa826f).(OID, OID_cstr, sizeof OID_cstr);
826 Omsg = probe_msg_creatfcxx . . $ probe_msg_creatf(2da488f08a70551b).(OVAL_MESSAGE_LEVEL_ERRORcxx . . $ OVAL_MESSAGE_LEVEL_ERROR.,
827 "%s: evaluation failed: OID=%s", __FUNCTION__, OID_cstr);
828 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(OID);
829 goto eval_fail;
830 }
831 }
832
833 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(OID);
834
835 if (o_subset_i < 2) {
836 o_subset[o_subset_i] = objres;
837 ++o_subset_i;
838 } else {
839 Omsg = probe_msg_creatfcxx . . $ probe_msg_creatf(2da488f08a70551b).(OVAL_MESSAGE_LEVEL_ERRORcxx . . $ OVAL_MESSAGE_LEVEL_ERROR.,
840 "%s: more than 2 obj_refs.", __FUNCTION__);
841 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(objres);
842 goto eval_fail;
843 }
844 } else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).("filter", member_name) == 0) {
845 /*
846 * Retrieve cached filters (states), remember unavailable ones so that
847 * we can fetch them all in one request.
848 */
849 SEXP_tcxx . . $ SEXP_t# *SID, *action, *state;
850
851 if ((SID = probe_ent_getvalcxx . . $ probe_ent_getval(2f7f980afaaae0f0).(member)) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
852 Omsg = probe_msg_creatfcxx . . $ probe_msg_creatf(2da488f08a70551b).(OVAL_MESSAGE_LEVEL_ERRORcxx . . $ OVAL_MESSAGE_LEVEL_ERROR.,
853 "%s: missing filter entity value.", __FUNCTION__);
854 goto eval_fail;
855 }
856
857 if ((action = probe_ent_getattrvalcxx . . $ probe_ent_getattrval(42b37380d22a3312).(member, "action")) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
858 Omsg = probe_msg_creatfcxx . . $ probe_msg_creatf(2da488f08a70551b).(OVAL_MESSAGE_LEVEL_ERRORcxx . . $ OVAL_MESSAGE_LEVEL_ERROR.,
859 "%s: missing filter action.", __FUNCTION__);
860 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(SID);
861 goto eval_fail;
862 }
863
864 if ((state = probe_rcache_sexp_getcxx . . $ probe_rcache_sexp_get(ce64d4c7f6269eda).(probe->rcachecxx . . $ $anonymous_type_3aeea60fe9979420_0#rcache., SID)) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
865 /* MISS - remember the ID */
866 SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(filters_req, SID);
867 r0 = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(action, SID, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
868 SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(filters_u, r0);
869 } else {
870 /* HIT */
871 r0 = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(action, state, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
872 SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(filters_a, r0);
873 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(state);
874 }
875
876 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(SID);
877 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(action);
878 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0);
879 } else {
880 /*
881 * Unexpected entity
882 */
883 abortcxx . . $ abort(8df32a62017fbbf6).();
884 }
885 }
886
887 member = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
888
889 /* request filters */
890 result = probe_ste_fetchcxx . . $ probe_ste_fetch(ff60eea1d04db58f).(probe, filters_req);
891
892 if (result == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
893 Omsg = probe_msg_creatfcxx . . $ probe_msg_creatf(2da488f08a70551b).(OVAL_MESSAGE_LEVEL_ERRORcxx . . $ OVAL_MESSAGE_LEVEL_ERROR.,
894 "%s: Can't get unavailable filters.", __FUNCTION__);
895 goto eval_fail;
896 }
897 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(filters_req);
898 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(result);
899
900 SEXP_list_foreachcxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:470:9`!(member, filters_u) {
901 SEXP_tcxx . . $ SEXP_t# *id, *act, *ste;
902
903 act = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0).(member);
904 id = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669).(member, 2);
905 ste = probe_rcache_sexp_getcxx . . $ probe_rcache_sexp_get(ce64d4c7f6269eda).(probe->rcachecxx . . $ $anonymous_type_3aeea60fe9979420_0#rcache., id);
906 r0 = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(act, ste, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
907 SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6).(filters_a, r0);
908
909 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(act);
910 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(id);
911 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(ste);
912 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0);
913 }
914
915 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(filters_u);
916
917 _Acxx . . $ `src/common/debug_priv.h:43:9`!((s_subset_i > 0 && o_subset_i == 0) || (s_subset_i == 0 && o_subset_i > 0));
918
919 if (o_subset_i > 0) {
920 for (s_subset_i = 0; s_subset_i < o_subset_i; ++s_subset_i) {
921 s_subset[s_subset_i] = probe_set_apply_filterscxx . . $ probe_set_apply_filters(aede1b20b47248cf).(o_subset[s_subset_i], filters_a);
922
923 #ifndef NDEBUGcxx . . $ `<built-in>:425:9`!
924 if (s_subset[s_subset_i] == NULL) {
925 Omsg = probe_msg_creatf(OVAL_MESSAGE_LEVEL_ERROR,
926 "%s: apply_filters returned NULL: set=%p, filters=%p.",
927 __FUNCTION__, o_subset[s_subset_i], filters_a);
928 goto eval_fail;
929 }
930 #endif
931 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(o_subset[s_subset_i]);
932 o_subset[s_subset_i] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
933 }
934 }
935
936 #ifndef NDEBUGcxx . . $ `<built-in>:425:9`!
937 {
938 unsigned int i;
939
940 for (i = 0; i < s_subset_i; ++i) {
941 if (s_subset[i] != NULL) {
942 dD("=== s_subset[%d] ===", i);
943 dO(OSCAP_DEBUGOBJ_SEXP, s_subset[i]);
944 }
945 }
946
947 for (i = 0; i < o_subset_i; ++i) {
948 if (o_subset[i] != NULL) {
949 dD("=== o_subset[%d] ===", i);
950 dO(OSCAP_DEBUGOBJ_SEXP, o_subset[i]);
951 }
952 }
953 }
954
955 dD("OP= %d", op_num);
956 #endif
957
958 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(filters_a);
959 result = probe_set_combinecxx . . $ probe_set_combine(86113b9d504a2e84).(s_subset[0], s_subset[1], op_num);
960
961 _Acxx . . $ `src/common/debug_priv.h:43:9`!(result != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
962
963 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(s_subset[0]);
964 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(s_subset[1]);
965
966 dDcxx . . $ `src/common/debug_priv.h:64:9`!("=== RESULT ===");
967 dOcxx . . $ `src/common/debug_priv.h:58:10`!(OSCAP_DEBUGOBJ_SEXPcxx . . $ `src/common/debug_priv.h:40:9`!, result);
968
969 return (result);
970 eval_fail:
971 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(member);
972
973 for (; s_subset_i > 0; --s_subset_i)
974 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(s_subset[s_subset_i - 1]);
975
976 for (; o_subset_i > 0; --o_subset_i)
977 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(o_subset[o_subset_i - 1]);
978
979 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(filters_u);
980 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(filters_a);
981 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(filters_req);
982 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(result);
983
984 r1 = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810).(Omsg, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
985 result = probe_cobj_newcxx . . $ probe_cobj_new(4e082355872fd045).(SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR., r1, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
986 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(Omsg);
987 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r1);
988 return result;
989 }
990
991 static void _add_blocked_pathscxx . . $ _add_blocked_paths(27ed2064e5aec1b1).(struct oscap_listcxx . . $ oscap_list# *bpaths)
992 {
993 char *envar = oscap_strdupcxx . . $ oscap_strdup(a8b8e32347182212).(getenvcxx . . $ getenv(a8b8e32347182212).("OSCAP_PROBE_IGNORE_PATHS"));
994 if (envar == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
995 return;
996 }
997 #ifdef OS_WINDOWS
998 dW("OSCAP_PROBE_IGNORE_PATHS isn't effective on Windows.");
999 #else
1000 char **paths = oscap_splitcxx . . $ oscap_split(25e857aacd75b4b6).(envar, ":");
1001 for (int i = 0; paths[i]; ++i) {
1002 oscap_list_addcxx . . $ oscap_list_add(97f28760a5cf7823).(bpaths, strdupcxx . . $ strdup(a8b8e32347182212).(paths[i]));
1003 }
1004 freecxx . . $ free(5d22bdacc48458e8).(envar);
1005 freecxx . . $ free(5d22bdacc48458e8).(paths);
1006 #endif
1007 }
1008
1009 /**
1010 * Worker thread function. This functions handles the evalution of objects and sets.
1011 * @param msg_in SEAP message with the request which contains the object to be evaluated
1012 * @param ret pointer to the return code storage
1013 */
1014 SEXP_tcxx . . $ SEXP_t# *probe_workercxx . . $ probe_worker(9568d6155da1d3b6).(probe_tcxx . . $ probe_t# *probe, SEAP_msg_tcxx . . $ SEAP_msg_t# *msg_in, int *ret)
1015 {
1016 #ifndef OS_WINDOWS
1017 char *rootdir = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1018 probe_offline_mode_function_tcxx . . $ probe_offline_mode_function_t# offline_mode_function = probe_table_get_offline_mode_functioncxx . . $ probe_table_get_offline_mode_function(9aeed2b37f3596a5).(probe->subtypecxx . . $ $anonymous_type_3aeea60fe9979420_0#subtype.);
1019 if (offline_mode_function != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
1020 probe->supported_offline_modecxx . . $ $anonymous_type_3aeea60fe9979420_0#supported_offline_mode. = offline_mode_function();
1021 } else {
1022 probe->supported_offline_modecxx . . $ $anonymous_type_3aeea60fe9979420_0#supported_offline_mode. = PROBE_OFFLINE_NONEcxx . . $ PROBE_OFFLINE_NONE.;
1023 }
1024
1025 /*
1026 * Setup offline mode(s)
1027 */
1028 rootdir = getenvcxx . . $ getenv(a8b8e32347182212).("OSCAP_PROBE_ROOT");
1029 if ((rootdir != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) && (strlencxx . . $ strlen(751346f8406fd082).(rootdir) > 0)) {
1030 preload_libraries_before_chrootcxx . . $ preload_libraries_before_chroot(d878ad36e69247c7).(); // todo - maybe useless for own mode
1031
1032 if (probe->supported_offline_modecxx . . $ $anonymous_type_3aeea60fe9979420_0#supported_offline_mode. == PROBE_OFFLINE_NONEcxx . . $ PROBE_OFFLINE_NONE.) {
1033 dWcxx . . $ `src/common/debug_priv.h:62:9`!("Requested offline mode is not supported by %s probe.", oval_subtype_get_text(probe->subtype));
1034 *ret = 0;
1035 return probe_cobj_newcxx . . $ probe_cobj_new(4e082355872fd045).(SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1036
1037 } else if (probe->supported_offline_modecxx . . $ $anonymous_type_3aeea60fe9979420_0#supported_offline_mode. & PROBE_OFFLINE_OWNcxx . . $ PROBE_OFFLINE_OWN.) {
1038 dIcxx . . $ `src/common/debug_priv.h:61:9`!("Switching probe to PROBE_OFFLINE_OWN mode.");
1039 probe->offline_modecxx . . $ $anonymous_type_3aeea60fe9979420_0#offline_mode. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1040 probe->selected_offline_modecxx . . $ $anonymous_type_3aeea60fe9979420_0#selected_offline_mode. = PROBE_OFFLINE_OWNcxx . . $ PROBE_OFFLINE_OWN.;
1041
1042 } else if (probe->supported_offline_modecxx . . $ $anonymous_type_3aeea60fe9979420_0#supported_offline_mode. & PROBE_OFFLINE_CHROOTcxx . . $ PROBE_OFFLINE_CHROOT.) {
1043 probe->real_root_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_root_fd. = opencxx . . $ open(e156e3aa1e5c4ad1).("/", O_RDONLYcxx . . $ `<external>/14578502075116107718/fcntl-linux.h:43:9`!);
1044 if (probe->real_root_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_root_fd. == -1) {
1045 dEcxx . . $ `src/common/debug_priv.h:63:9`!("open(\"/\") failed: %s", strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!));
1046 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1047 }
1048 probe->real_cwd_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_cwd_fd. = opencxx . . $ open(e156e3aa1e5c4ad1).(".", O_RDONLYcxx . . $ `<external>/14578502075116107718/fcntl-linux.h:43:9`!);
1049 if (probe->real_cwd_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_cwd_fd. == -1) {
1050 closecxx . . $ close(7864480464b09eea).(probe->real_root_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_root_fd.);
1051 dEcxx . . $ `src/common/debug_priv.h:63:9`!("open(\".\") failed: %s", strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!));
1052 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1053 }
1054
1055 if (chrootcxx . . $ chroot(5c4306d8553b3696).(rootdir) != 0) {
1056 dEcxx . . $ `src/common/debug_priv.h:63:9`!("chroot failed: %s", strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!));
1057 }
1058 if (chdircxx . . $ chdir(5c4306d8553b3696).("/") != 0) {
1059 dEcxx . . $ `src/common/debug_priv.h:63:9`!("chdir failed: %s", strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!));
1060 }
1061 /* NOTE: We're running in a different root directory.
1062 * Unless /proc, /sys are somehow emulated for the new
1063 * environment, they are not relevant and so are other
1064 * runtime only things (e.g. getenv, uname, ...).
1065 * Switch to offline mode. We may add a separate
1066 * mechanism to control this behaviour in the future.
1067 */
1068 dIcxx . . $ `src/common/debug_priv.h:61:9`!("Switching probe to PROBE_OFFLINE_CHROOT mode.");
1069 probe->offline_modecxx . . $ $anonymous_type_3aeea60fe9979420_0#offline_mode. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1070 probe->selected_offline_modecxx . . $ $anonymous_type_3aeea60fe9979420_0#selected_offline_mode. = PROBE_OFFLINE_CHROOTcxx . . $ PROBE_OFFLINE_CHROOT.;
1071 }
1072 }
1073 #endif
1074
1075 SEXP_tcxx . . $ SEXP_t# *probe_in, *probe_out, *set;
1076
1077 if (msg_in == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
1078 *ret = PROBE_EINVALcxx . . $ `src/OVAL/probes/public/probe-common.h:8:9`!;
1079 return (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1080 }
1081
1082 probe_in = SEAP_msg_getcxx . . $ SEAP_msg_get(265ef69b98da50a9).(msg_in);
1083 probe_out = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1084
1085 if (probe_in == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
1086 *ret = PROBE_ENOOBJcxx . . $ `src/OVAL/probes/public/probe-common.h:21:9`!;
1087 return (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1088 }
1089
1090 set = probe_obj_getentcxx . . $ probe_obj_getent(7907a01f2ff841f3).(probe_in, "set", 1);
1091
1092 if (set != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
1093 /* set object */
1094 probe_out = probe_set_evalcxx . . $ probe_set_eval(ae0684b04c6802cd).(probe, set, 0);
1095 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(set);
1096 // todo: in case of an internal error set probe_ret accordingly
1097 *ret = 0;
1098 } else {
1099 struct probe_ctxcxx . . $ probe_ctx# pctx;
1100 SEXP_tcxx . . $ SEXP_t# *varrefs, *mask;
1101
1102 pctx.offline_modecxx . . $ probe_ctx#offline_mode. = probe->selected_offline_modecxx . . $ $anonymous_type_3aeea60fe9979420_0#selected_offline_mode.;
1103
1104 pctx.max_mem_ratiocxx . . $ probe_ctx#max_mem_ratio. = OSCAP_PROBE_MEMORY_USAGE_RATIO_DEFAULTcxx . . $ `src/OVAL/probes/probe/probe.h:48:9`!;
1105 char *max_ratio_str = getenvcxx . . $ getenv(a8b8e32347182212).("OSCAP_PROBE_MEMORY_USAGE_RATIO");
1106 if (max_ratio_str != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
1107 double max_ratio = strtodcxx . . $ strtod(3dfe5620a0d3160e).(max_ratio_str, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1108 if (max_ratio > 0)
1109 pctx.max_mem_ratiocxx . . $ probe_ctx#max_mem_ratio. = max_ratio;
1110 }
1111 pctx.collected_itemscxx . . $ probe_ctx#collected_items. = 0;
1112 pctx.max_collected_itemscxx . . $ probe_ctx#max_collected_items. = OSCAP_PROBE_COLLECT_UNLIMITEDcxx . . $ `src/OVAL/probes/probe/probe.h:53:9`!;
1113 char *max_collected_items_str = getenvcxx . . $ getenv(a8b8e32347182212).("OSCAP_PROBE_MAX_COLLECTED_ITEMS");
1114 if (max_collected_items_str != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
1115 int max_collected_items = strtolcxx . . $ strtol(44bbb87609b212fc).(max_collected_items_str, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, 0);
1116 if (max_collected_items > 0) {
1117 pctx.max_collected_itemscxx . . $ probe_ctx#max_collected_items. = max_collected_items;
1118 }
1119 }
1120
1121 pctx.blocked_pathscxx . . $ probe_ctx#blocked_paths. = oscap_list_newcxx . . $ oscap_list_new(ea215f73c8361bff).();
1122 _add_blocked_pathscxx . . $ _add_blocked_paths(27ed2064e5aec1b1).(pctx.blocked_pathscxx . . $ probe_ctx#blocked_paths.);
1123
1124 /* simple object */
1125 pctx.icachecxx . . $ probe_ctx#icache. = probe->icachecxx . . $ $anonymous_type_3aeea60fe9979420_0#icache.;
1126 pctx.filterscxx . . $ probe_ctx#filters. = probe_prepare_filterscxx . . $ probe_prepare_filters(ff60eea1d04db58f).(probe, probe_in);
1127 mask = probe_obj_getmaskcxx . . $ probe_obj_getmask(478b347fcbbad3c5).(probe_in);
1128
1129 if (OSCAP_GSYMcxx . . $ `src/common/util.h:444:9`!(varref_handling))
1130 varrefs = probe_obj_getentcxx . . $ probe_obj_getent(7907a01f2ff841f3).(probe_in, "varrefs", 1);
1131 else
1132 varrefs = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1133
1134 oval_subtype_tcxx . . $ oval_subtype_t# subtype = probe->subtypecxx . . $ $anonymous_type_3aeea60fe9979420_0#subtype.;
1135 probe_main_function_tcxx . . $ probe_main_function_t# probe_main_function = probe_table_get_main_functioncxx . . $ probe_table_get_main_function(4ab90c66680516dc).(subtype);
1136 const char *subtype_str = oval_subtype_get_textcxx . . $ oval_subtype_get_text(ee6b3dcae047e21f).(subtype);
1137
1138 if (varrefs == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || !OSCAP_GSYMcxx . . $ `src/common/util.h:444:9`!(varref_handling)) {
1139 /*
1140 * Prepare the collected object
1141 */
1142 probe_out = probe_cobj_newcxx . . $ probe_cobj_new(4e082355872fd045).(SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, mask);
1143 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(mask);
1144
1145 pctx.probe_incxx . . $ probe_ctx#probe_in. = probe_in;
1146 pctx.probe_outcxx . . $ probe_ctx#probe_out. = probe_out;
1147
1148 /*
1149 * Run the main function of the probe implementation. Set thread
1150 * cancelation type to ASYNC to prevent the code in probe_main to
1151 * defer the cancelation for too long.
1152 */
1153 int __unused_oldstate;
1154 pthread_setcanceltypecxx . . $ pthread_setcanceltype(ac48f4a6ffa9e770).(PTHREAD_CANCEL_ASYNCHRONOUScxx . . $ `<external>/14712363683955484316/pthread.h:180:9`!, &__unused_oldstate);
1155
1156
1157
1158 dIcxx . . $ `src/common/debug_priv.h:61:9`!("I will run %s_probe_main:", subtype_str);
1159 *ret = probe_main_function(&pctx, probe->probe_argcxx . . $ $anonymous_type_3aeea60fe9979420_0#probe_arg.);
1160
1161 pthread_setcanceltypecxx . . $ pthread_setcanceltype(ac48f4a6ffa9e770).(PTHREAD_CANCEL_DEFERREDcxx . . $ `<external>/14712363683955484316/pthread.h:178:9`!, &__unused_oldstate);
1162
1163 /*
1164 * Synchronize
1165 */
1166 probe_icache_nopcxx . . $ probe_icache_nop(dc98f03c45e0d51f).(probe->icachecxx . . $ $anonymous_type_3aeea60fe9979420_0#icache.);
1167
1168 probe_cobj_compute_flagcxx . . $ probe_cobj_compute_flag(19bcac5beadb52f6).(probe_out);
1169 } else {
1170 /*
1171 * there are variable references in the object.
1172 * create ctx, iterate through all variable combinations
1173 */
1174 struct probe_varref_ctxcxx . . $ probe_varref_ctx# *ctx;
1175
1176 dDcxx . . $ `src/common/debug_priv.h:64:9`!("handling varrefs in object");
1177
1178 if (probe_varref_create_ctxcxx . . $ probe_varref_create_ctx(61023b8d00b843ee).(probe_in, varrefs, &ctx) != 0) {
1179 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(varrefs);
1180 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(pctx.filterscxx . . $ probe_ctx#filters.);
1181 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(probe_in);
1182 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(mask);
1183 oscap_list_freecxx . . $ oscap_list_free(e68e105c3900fcc1).(pctx.blocked_pathscxx . . $ probe_ctx#blocked_paths., freecxx . . $ free(5d22bdacc48458e8).);
1184 *ret = PROBE_EUNKNOWNcxx . . $ `src/OVAL/probes/public/probe-common.h:24:9`!;
1185 return (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1186 }
1187
1188 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(varrefs);
1189
1190 do {
1191 SEXP_tcxx . . $ SEXP_t# *cobj, *r0;
1192 /*
1193 * Prepare the collected object
1194 */
1195 cobj = probe_cobj_newcxx . . $ probe_cobj_new(4e082355872fd045).(SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, mask);
1196
1197 pctx.probe_incxx . . $ probe_ctx#probe_in. = ctx->pi2cxx . . $ probe_varref_ctx#pi2.;
1198 pctx.probe_outcxx . . $ probe_ctx#probe_out. = cobj;
1199 /*
1200 * Run the main function of the probe implementation
1201 */
1202 dIcxx . . $ `src/common/debug_priv.h:61:9`!("I will run %s_probe_main:", subtype_str);
1203 *ret = probe_main_function(&pctx, probe->probe_argcxx . . $ $anonymous_type_3aeea60fe9979420_0#probe_arg.);
1204
1205 /*
1206 * Synchronize
1207 */
1208 probe_icache_nopcxx . . $ probe_icache_nop(dc98f03c45e0d51f).(probe->icachecxx . . $ $anonymous_type_3aeea60fe9979420_0#icache.);
1209
1210 probe_cobj_compute_flagcxx . . $ probe_cobj_compute_flag(19bcac5beadb52f6).(cobj);
1211 r0 = probe_out;
1212 probe_out = probe_set_combinecxx . . $ probe_set_combine(86113b9d504a2e84).(r0, cobj, OVAL_SET_OPERATION_UNIONcxx . . $ OVAL_SET_OPERATION_UNION.);
1213 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(cobj);
1214 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0);
1215 } while (*ret == 0
1216 && probe_varref_iterate_ctxcxx . . $ probe_varref_iterate_ctx(edcc92cba1a37f42).(ctx));
1217
1218 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(mask);
1219 probe_varref_destroy_ctxcxx . . $ probe_varref_destroy_ctx(313deea73972a4e0).(ctx);
1220 }
1221
1222 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(pctx.filterscxx . . $ probe_ctx#filters.);
1223 oscap_list_freecxx . . $ oscap_list_free(e68e105c3900fcc1).(pctx.blocked_pathscxx . . $ probe_ctx#blocked_paths., freecxx . . $ free(5d22bdacc48458e8).);
1224 }
1225
1226 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(probe_in);
1227
1228 #ifndef OS_WINDOWS
1229 /* Revert chroot */
1230 if (probe->real_root_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_root_fd. != -1) {
1231 if (fchdircxx . . $ fchdir(7864480464b09eea).(probe->real_root_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_root_fd.) != 0) {
1232 dEcxx . . $ `src/common/debug_priv.h:63:9`!("fchdir failed: %s", strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!));
1233 closecxx . . $ close(7864480464b09eea).(probe->real_root_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_root_fd.);
1234 closecxx . . $ close(7864480464b09eea).(probe->real_cwd_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_cwd_fd.);
1235 probe->real_root_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_root_fd. = -1;
1236 probe->real_cwd_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_cwd_fd. = -1;
1237 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(probe_out);
1238 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1239 }
1240 closecxx . . $ close(7864480464b09eea).(probe->real_root_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_root_fd.);
1241 probe->real_root_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_root_fd. = -1;
1242 dIcxx . . $ `src/common/debug_priv.h:61:9`!("Leaving chroot mode");
1243 if (chrootcxx . . $ chroot(5c4306d8553b3696).(".") == -1) {
1244 dEcxx . . $ `src/common/debug_priv.h:63:9`!("chroot(\".\") failed: %s", strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!));
1245 closecxx . . $ close(7864480464b09eea).(probe->real_cwd_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_cwd_fd.);
1246 probe->real_cwd_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_cwd_fd. = -1;
1247 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(probe_out);
1248 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1249 }
1250 if (fchdircxx . . $ fchdir(7864480464b09eea).(probe->real_cwd_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_cwd_fd.) != 0) {
1251 dEcxx . . $ `src/common/debug_priv.h:63:9`!("fchdir failed: %s", strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!));
1252 closecxx . . $ close(7864480464b09eea).(probe->real_cwd_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_cwd_fd.);
1253 probe->real_cwd_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_cwd_fd. = -1;
1254 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(probe_out);
1255 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1256 }
1257 closecxx . . $ close(7864480464b09eea).(probe->real_cwd_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_cwd_fd.);
1258 probe->real_cwd_fdcxx . . $ $anonymous_type_3aeea60fe9979420_0#real_cwd_fd. = -1;
1259 }
1260 #endif
1261
1262 SEXP_VALIDATEcxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:576:10`!(probe_out);
1263
1264 return (probe_out);
1265 }