Debian Codegraph @

src/OVAL/probes/independent/variable_probe.c

raw symbols SCIP
1 /**
2 * @file variable_probe.c
3 * @brief variable probe
4 * @author "Tomas Heinrich" <[email protected]>
5 *
6 * This probe is able to process a variable_object as defined in OVAL 5.8.
7 *
8 */
9
10 /*
11 * Copyright 2011 Red Hat Inc., Durham, North Carolina.
12 * All Rights Reserved.
13 *
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2.1 of the License, or (at your option) any later version.
18 *
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with this library; if not, write to the Free Software
26 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27 *
28 * Authors:
29 * "Tomas Heinrich" <[email protected]>
30 */
31
32 /*
33 * variable probe
34 *
35 * reference:
36 * http://oval.mitre.org/language/version5.8/ovaldefinition/documentation/independent-definitions-schema.html#variable_object
37 */
38
39 #ifdef HAVE_CONFIG_Hcxx . . $ `<built-in>:409:9`!
40 #include <config.h>cxx . . $ `<file>/build/config.h`/
41 #endif
42
43 #include <stdlib.h>
44 #include <string.h>
45 #include <stdio.h>
46 #include <errno.h>
47
48 #include <probe/probe.h>cxx . . $ `<file>/src/OVAL/probes/probe/probe.h`/
49 #include <probe/option.h>cxx . . $ `<file>/src/OVAL/probes/probe/option.h`/
50 #include "_seap.h"cxx . . $ `<file>/src/OVAL/probes/SEAP/_seap.h`/
51 #include "probe-api.h"cxx . . $ `<file>/src/OVAL/probes/public/probe-api.h`/
52 #include "probe/entcmp.h"cxx . . $ `<file>/src/OVAL/probes/probe/entcmp.h`/
53 #include "variable_probe.h"cxx . . $ `<file>/src/OVAL/probes/independent/variable_probe.h`/
54
55 int variable_probe_offline_mode_supportedcxx . . $ variable_probe_offline_mode_supported(b126dc7c1de90089).()
56 {
57 return PROBE_OFFLINE_ALLcxx . . $ PROBE_OFFLINE_ALL.;
58 }
59
60 int variable_probe_maincxx . . $ variable_probe_main(470536d3ffacaf10).(probe_ctxcxx . . $ probe_ctx# *ctx, void *arg)
61 {
62 SEXP_tcxx . . $ SEXP_t# *probe_in, *vr_ent, *sid, *sval, *svallst, *item;
63
64 probe_in = probe_ctx_getobjectcxx . . $ probe_ctx_getobject(4299b6b53fa804a5).(ctx);
65 vr_ent = probe_obj_getentcxx . . $ probe_obj_getent(7907a01f2ff841f3).(probe_in, "var_ref", 1);
66 sid = probe_ent_getattrvalcxx . . $ probe_ent_getattrval(42b37380d22a3312).(vr_ent, "var_ref");
67 probe_ent_getvalscxx . . $ probe_ent_getvals(87c285983fc46746).(vr_ent, &svallst);
68
69 item = probe_item_createcxx . . $ probe_item_create(36b16a6622050a9c).(OVAL_INDEPENDENT_VARIABLEcxx . . $ OVAL_INDEPENDENT_VARIABLE., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
70 "var_ref", OVAL_DATATYPE_SEXPcxx . . $ OVAL_DATATYPE_SEXP., sid,
71 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
72
73 SEXP_list_foreachcxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:470:9`!(sval, svallst)
74 probe_item_ent_addcxx . . $ probe_item_ent_add(9f488d3b029fc9d1).(item, "value", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, sval);
75
76 probe_item_collectcxx . . $ probe_item_collect(11bb80e0c30650d7).(ctx, item);
77 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(vr_ent);
78 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(sid);
79 SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(svallst);
80
81 return 0;
82 }