| 1 | /* |
| 2 | * Copyright 2009 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 <stdlib.h> |
| 28 | #include <string.h> |
| 29 | #include <errno.h> |
| 30 | |
| 31 | #include "generic/common.h"cxx . . $ `<file>/src/OVAL/probes/SEAP/generic/common.h`/ |
| 32 | #include "public/sexp-manip.h"cxx . . $ `<file>/src/OVAL/probes/SEAP/public/sexp-manip.h`/ |
| 33 | #include "_seap-packetq.h"cxx . . $ `<file>/src/OVAL/probes/SEAP/_seap-packetq.h`/ |
| 34 | #include "_seap-packet.h"cxx . . $ `<file>/src/OVAL/probes/SEAP/_seap-packet.h`/ |
| 35 | #include "_seap-types.h"cxx . . $ `<file>/src/OVAL/probes/SEAP/_seap-types.h`/ |
| 36 | #include "seap-descriptor.h"cxx . . $ `<file>/src/OVAL/probes/SEAP/seap-descriptor.h`/ |
| 37 | #include "sch_queue.h"cxx . . $ `<file>/src/OVAL/probes/SEAP/sch_queue.h`/ |
| 38 | #include "debug_priv.h"cxx . . $ `<file>/src/common/debug_priv.h`/ |
| 39 | |
| 40 | SEAP_packet_tcxx . . $ SEAP_packet_t# *SEAP_packet_newcxx . . $ SEAP_packet_new(384bfbf0d7214bc9). (void) |
| 41 | { |
| 42 | SEAP_packet_tcxx . . $ SEAP_packet_t# *p = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(SEAP_packet_tcxx . . $ SEAP_packet_t#)); |
| 43 | memsetcxx . . $ memset(d1de1e4fb215f1c6). (p, 0, sizeof (SEAP_packet_tcxx . . $ SEAP_packet_t#)); |
| 44 | p->typecxx . . $ SEAP_packet#type. = SEAP_PACKET_INVcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:39:9`!; |
| 45 | |
| 46 | return (p); |
| 47 | } |
| 48 | |
| 49 | void SEAP_packet_freecxx . . $ SEAP_packet_free(2cb4ed29150e9a0f). (SEAP_packet_tcxx . . $ SEAP_packet_t# *packet) |
| 50 | { |
| 51 | freecxx . . $ free(5d22bdacc48458e8).(packet); |
| 52 | } |
| 53 | |
| 54 | void *SEAP_packet_settypecxx . . $ SEAP_packet_settype(332ceac18a0c9d9b). (SEAP_packet_tcxx . . $ SEAP_packet_t# *packet, uint8_tcxx . . $ uint8_t# type) |
| 55 | { |
| 56 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(packet != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 57 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(type == SEAP_PACKET_MSGcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:40:9`! || |
| 58 | type == SEAP_PACKET_CMDcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:42:9`! || |
| 59 | type == SEAP_PACKET_ERRcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:41:9`!); |
| 60 | |
| 61 | packet->typecxx . . $ SEAP_packet#type. = type; |
| 62 | |
| 63 | switch (type) { |
| 64 | case SEAP_PACKET_MSGcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:40:9`!: |
| 65 | return ((void *)&(packet->datacxx . . $ SEAP_packet#data..msgcxx . . $ SEAP_packet#$anonymous_type_0#msg.)); |
| 66 | case SEAP_PACKET_ERRcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:41:9`!: |
| 67 | return ((void *)&(packet->datacxx . . $ SEAP_packet#data..msgcxx . . $ SEAP_packet#$anonymous_type_0#msg.)); |
| 68 | case SEAP_PACKET_CMDcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:42:9`!: |
| 69 | return ((void *)&(packet->datacxx . . $ SEAP_packet#data..msgcxx . . $ SEAP_packet#$anonymous_type_0#msg.)); |
| 70 | default: |
| 71 | abortcxx . . $ abort(8df32a62017fbbf6). (); |
| 72 | } |
| 73 | |
| 74 | /* not reached */ |
| 75 | return (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 76 | } |
| 77 | |
| 78 | uint8_tcxx . . $ uint8_t# SEAP_packet_gettypecxx . . $ SEAP_packet_gettype(22e705be93eb9565). (SEAP_packet_tcxx . . $ SEAP_packet_t# *packet) |
| 79 | { |
| 80 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(packet != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 81 | return (packet->typecxx . . $ SEAP_packet#type.); |
| 82 | } |
| 83 | |
| 84 | SEAP_msg_tcxx . . $ SEAP_msg_t# *SEAP_packet_msgcxx . . $ SEAP_packet_msg(3b2c095c5026749b). (SEAP_packet_tcxx . . $ SEAP_packet_t# *packet) |
| 85 | { |
| 86 | return (&(packet->datacxx . . $ SEAP_packet#data..msgcxx . . $ SEAP_packet#$anonymous_type_0#msg.)); |
| 87 | } |
| 88 | |
| 89 | SEAP_cmd_tcxx . . $ SEAP_cmd_t# *SEAP_packet_cmdcxx . . $ SEAP_packet_cmd(9f46e6fb5acf697d). (SEAP_packet_tcxx . . $ SEAP_packet_t# *packet) |
| 90 | { |
| 91 | return (&(packet->datacxx . . $ SEAP_packet#data..cmdcxx . . $ SEAP_packet#$anonymous_type_0#cmd.)); |
| 92 | } |
| 93 | |
| 94 | SEAP_err_tcxx . . $ SEAP_err_t# *SEAP_packet_errcxx . . $ SEAP_packet_err(3bc7b797eb278dfe). (SEAP_packet_tcxx . . $ SEAP_packet_t# *packet) |
| 95 | { |
| 96 | return (&(packet->datacxx . . $ SEAP_packet#data..errcxx . . $ SEAP_packet#$anonymous_type_0#err.)); |
| 97 | } |
| 98 | |
| 99 | static int SEAP_packet_sexp2msgcxx . . $ SEAP_packet_sexp2msg(25061e6c2f525510). (SEXP_tcxx . . $ SEXP_t# *sexp_msg, SEAP_msg_tcxx . . $ SEAP_msg_t# *seap_msg) |
| 100 | { |
| 101 | size_t msg_icnt, msg_n, attr_i; |
| 102 | SEXP_tcxx . . $ SEXP_t# *attr_name, *attr_val; |
| 103 | |
| 104 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(sexp_msg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 105 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(seap_msg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 106 | |
| 107 | msg_icnt = SEXP_list_lengthcxx . . $ SEXP_list_length(7b7039adf1662ab5). (sexp_msg); |
| 108 | |
| 109 | seap_msg->attrs_cntcxx . . $ SEAP_msg#attrs_cnt. = msg_icnt - 4; |
| 110 | seap_msg->attrscxx . . $ SEAP_msg#attrs. = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof (SEAP_attr_tcxx . . $ SEAP_attr_t#) * seap_msg->attrs_cntcxx . . $ SEAP_msg#attrs_cnt.); |
| 111 | |
| 112 | for (msg_n = 2, attr_i = 0; msg_n < msg_icnt; ++msg_n) { |
| 113 | |
| 114 | attr_name = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669). (sexp_msg, msg_n); |
| 115 | if (attr_name == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 116 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Unexpected error: No S-exp (attr_name) at position %lu in the message (%p).", |
| 117 | msg_n, sexp_msg); |
| 118 | |
| 119 | freecxx . . $ free(5d22bdacc48458e8).(seap_msg->attrscxx . . $ SEAP_msg#attrs.); |
| 120 | |
| 121 | return (SEAP_EUNEXPcxx . . $ `src/OVAL/probes/SEAP/_seap-types.h:83:9`!); |
| 122 | } |
| 123 | |
| 124 | if (SEXP_string_nthcxx . . $ SEXP_string_nth(229c2c0bb207cd4a). (attr_name, 1) == ':') { |
| 125 | if (SEXP_strcmpcxx . . $ SEXP_strcmp(3ef1a37bcb3c2a). (attr_name, ":id") == 0) { |
| 126 | |
| 127 | attr_val = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669). (sexp_msg, msg_n + 1); |
| 128 | if (attr_val == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 129 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Unexpected error: \"%s\": No attribute value at position %lu in the message (%p).", |
| 130 | "id", msg_n + 1, sexp_msg); |
| 131 | |
| 132 | freecxx . . $ free(5d22bdacc48458e8).(seap_msg->attrscxx . . $ SEAP_msg#attrs.); |
| 133 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(attr_name); |
| 134 | |
| 135 | return (SEAP_EUNEXPcxx . . $ `src/OVAL/probes/SEAP/_seap-types.h:83:9`!); |
| 136 | } |
| 137 | |
| 138 | #if SEAP_MSGID_BITScxx . . $ `build/config.h:61:9`! == 64 |
| 139 | seap_msg->id = SEXP_number_getu_64 (attr_val); |
| 140 | if (seap_msg->id == UINT64_MAX) |
| 141 | #else |
| 142 | seap_msg->idcxx . . $ SEAP_msg#id. = SEXP_number_getu_32cxx . . $ SEXP_number_getu_32(60e3bd3ad0f89996). (attr_val); |
| 143 | if (seap_msg->idcxx . . $ SEAP_msg#id. == UINT32_MAXcxx . . $ `<external>/3415975807581488833/stdint.h:118:10`!) |
| 144 | #endif |
| 145 | { |
| 146 | switch (errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!) { |
| 147 | case EDOMcxx . . $ `<external>/8987895939074593727/errno-base.h:37:9`!: |
| 148 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("id: invalid value or type: s_exp=%p, type=%s", |
| 149 | (void *)attr_val, SEXP_strtype (attr_val)); |
| 150 | |
| 151 | freecxx . . $ free(5d22bdacc48458e8).(seap_msg->attrscxx . . $ SEAP_msg#attrs.); |
| 152 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(attr_val); |
| 153 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(attr_name); |
| 154 | |
| 155 | return (SEAP_EINVALcxx . . $ `src/OVAL/probes/SEAP/_seap-types.h:79:9`!); |
| 156 | case EFAULTcxx . . $ `<external>/8987895939074593727/errno-base.h:18:9`!: |
| 157 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("id: not found"); |
| 158 | |
| 159 | freecxx . . $ free(5d22bdacc48458e8).(seap_msg->attrscxx . . $ SEAP_msg#attrs.); |
| 160 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(attr_val); |
| 161 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(attr_name); |
| 162 | |
| 163 | return (SEAP_EINVALcxx . . $ `src/OVAL/probes/SEAP/_seap-types.h:79:9`!); |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (attr_val); |
| 168 | } else { |
| 169 | seap_msg->attrscxx . . $ SEAP_msg#attrs.[attr_i].namecxx . . $ SEAP_attr#name. = SEXP_string_subcstrcxx . . $ SEXP_string_subcstr(362276acbc9e7b81). (attr_name, 1, 0); |
| 170 | seap_msg->attrscxx . . $ SEAP_msg#attrs.[attr_i].valuecxx . . $ SEAP_attr#value. = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669). (sexp_msg, msg_n + 1); |
| 171 | |
| 172 | if (seap_msg->attrscxx . . $ SEAP_msg#attrs.[attr_i].valuecxx . . $ SEAP_attr#value. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 173 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Unexpected error: \"%s\": No attribute value at position %lu in the message (%p).", |
| 174 | seap_msg->attrs[attr_i].name, msg_n + 1, sexp_msg); |
| 175 | |
| 176 | freecxx . . $ free(5d22bdacc48458e8).(seap_msg->attrscxx . . $ SEAP_msg#attrs.[attr_i].namecxx . . $ SEAP_attr#name.); |
| 177 | |
| 178 | for (; attr_i > 0; --attr_i) { |
| 179 | freecxx . . $ free(5d22bdacc48458e8).(seap_msg->attrscxx . . $ SEAP_msg#attrs.[attr_i - 1].namecxx . . $ SEAP_attr#name.); |
| 180 | |
| 181 | if (seap_msg->attrscxx . . $ SEAP_msg#attrs.[attr_i - 1].valuecxx . . $ SEAP_attr#value. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 182 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (seap_msg->attrscxx . . $ SEAP_msg#attrs.[attr_i - 1].valuecxx . . $ SEAP_attr#value.); |
| 183 | } |
| 184 | |
| 185 | freecxx . . $ free(5d22bdacc48458e8).(seap_msg->attrscxx . . $ SEAP_msg#attrs.); |
| 186 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(attr_name); |
| 187 | |
| 188 | return (SEAP_EINVALcxx . . $ `src/OVAL/probes/SEAP/_seap-types.h:79:9`!); |
| 189 | } |
| 190 | |
| 191 | ++attr_i; |
| 192 | } |
| 193 | |
| 194 | ++msg_n; |
| 195 | } else { |
| 196 | seap_msg->attrscxx . . $ SEAP_msg#attrs.[attr_i].namecxx . . $ SEAP_attr#name. = SEXP_string_cstrcxx . . $ SEXP_string_cstr(c831a2fa12818dfe). (attr_name); |
| 197 | seap_msg->attrscxx . . $ SEAP_msg#attrs.[attr_i].valuecxx . . $ SEAP_attr#value. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 198 | |
| 199 | ++attr_i; |
| 200 | } |
| 201 | |
| 202 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (attr_name); |
| 203 | } |
| 204 | |
| 205 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(attr_i <= (SEXP_list_length (sexp_msg) - 4)); |
| 206 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(attr_i >= (SEXP_list_length (sexp_msg) - 4)/2); |
| 207 | |
| 208 | seap_msg->attrs_cntcxx . . $ SEAP_msg#attrs_cnt. = attr_i; |
| 209 | if (seap_msg->attrs_cntcxx . . $ SEAP_msg#attrs_cnt. == 0) { |
| 210 | freecxx . . $ free(5d22bdacc48458e8).(seap_msg->attrscxx . . $ SEAP_msg#attrs.); |
| 211 | seap_msg->attrscxx . . $ SEAP_msg#attrs. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 212 | } else { |
| 213 | void *new_attrs = realloccxx . . $ realloc(417ab160f6baadc6).(seap_msg->attrscxx . . $ SEAP_msg#attrs., sizeof(SEAP_attr_tcxx . . $ SEAP_attr_t#) * seap_msg->attrs_cntcxx . . $ SEAP_msg#attrs_cnt.); |
| 214 | seap_msg->attrscxx . . $ SEAP_msg#attrs. = new_attrs; |
| 215 | } |
| 216 | |
| 217 | seap_msg->sexpcxx . . $ SEAP_msg#sexp. = SEXP_list_lastcxx . . $ SEXP_list_last(2f7f980afaaae0f0). (sexp_msg); |
| 218 | |
| 219 | return (0); |
| 220 | } |
| 221 | |
| 222 | static SEXP_tcxx . . $ SEXP_t# *SEAP_packet_msg2sexpcxx . . $ SEAP_packet_msg2sexp(265ef69b98da50a9). (SEAP_msg_tcxx . . $ SEAP_msg_t# *msg) |
| 223 | { |
| 224 | SEXP_tcxx . . $ SEXP_t# *sexp; |
| 225 | uint16_tcxx . . $ uint16_t# i; |
| 226 | |
| 227 | SEXP_tcxx . . $ SEXP_t# *r0, *r1, *r2; |
| 228 | |
| 229 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(msg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 230 | |
| 231 | sexp = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810). (r0 = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2). (SEAP_SYM_MSGcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:35:9`!, strlencxx . . $ strlen(751346f8406fd082). (SEAP_SYM_MSGcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:35:9`!)), |
| 232 | r1 = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2). (":id", 3), |
| 233 | #if SEAP_MSGID_BITScxx . . $ `build/config.h:61:9`! == 64 |
| 234 | r2 = SEXP_number_newu_64 (msg->id), |
| 235 | #else |
| 236 | r2 = SEXP_number_newu_32cxx . . $ SEXP_number_newu_32(8a1232211d6fd92a). (msg->idcxx . . $ SEAP_msg#id.), |
| 237 | #endif |
| 238 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 239 | |
| 240 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 241 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r1); |
| 242 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r2); |
| 243 | |
| 244 | /* Add message attributes */ |
| 245 | for (i = 0; i < msg->attrs_cntcxx . . $ SEAP_msg#attrs_cnt.; ++i) { |
| 246 | if (msg->attrscxx . . $ SEAP_msg#attrs.[i].valuecxx . . $ SEAP_attr#value. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 247 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6). (sexp, r0 = SEXP_string_newfcxx . . $ SEXP_string_newf(b2137ed863725962). (":%s", msg->attrscxx . . $ SEAP_msg#attrs.[i].namecxx . . $ SEAP_attr#name.)); |
| 248 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6). (sexp, msg->attrscxx . . $ SEAP_msg#attrs.[i].valuecxx . . $ SEAP_attr#value.); |
| 249 | } else { |
| 250 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6). (sexp, r0 = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2). (msg->attrscxx . . $ SEAP_msg#attrs.[i].namecxx . . $ SEAP_attr#name., |
| 251 | strlencxx . . $ strlen(751346f8406fd082). (msg->attrscxx . . $ SEAP_msg#attrs.[i].namecxx . . $ SEAP_attr#name.))); |
| 252 | } |
| 253 | |
| 254 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (r0); |
| 255 | } |
| 256 | |
| 257 | /* Add data */ |
| 258 | if (msg->sexpcxx . . $ SEAP_msg#sexp. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 259 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6). (sexp, msg->sexpcxx . . $ SEAP_msg#sexp.); |
| 260 | else { |
| 261 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6). (sexp, r0 = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810). (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)); /* FIXME */ |
| 262 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 263 | } |
| 264 | |
| 265 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("MSG -> SEXP"); |
| 266 | dOcxx . . $ `src/common/debug_priv.h:58:10`!(OSCAP_DEBUGOBJ_SEXPcxx . . $ `src/common/debug_priv.h:40:9`!, sexp); |
| 267 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("packet size: %zu", SEXP_sizeof(sexp)); |
| 268 | |
| 269 | return (sexp); |
| 270 | } |
| 271 | |
| 272 | static int SEAP_packet_sexp2cmdcxx . . $ SEAP_packet_sexp2cmd(e5113bab617e5487). (SEXP_tcxx . . $ SEXP_t# *sexp_cmd, SEAP_cmd_tcxx . . $ SEAP_cmd_t# *seap_cmd) |
| 273 | { |
| 274 | SEXP_tcxx . . $ SEXP_t# *item, *val; |
| 275 | size_t i; |
| 276 | int mattrs; |
| 277 | |
| 278 | memsetcxx . . $ memset(d1de1e4fb215f1c6). (seap_cmd, 0, sizeof (SEAP_cmd_tcxx . . $ SEAP_cmd_t#)); |
| 279 | seap_cmd->classcxx . . $ SEAP_cmd#class. = SEAP_CMDCLASS_INTcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:36:9`!; |
| 280 | seap_cmd->argscxx . . $ SEAP_cmd#args. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 281 | |
| 282 | mattrs = 0; |
| 283 | i = 2; |
| 284 | |
| 285 | while ((item = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669). (sexp_cmd, i)) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 286 | if (SEXP_strncmpcxx . . $ SEXP_strncmp(209fd5a59eedb5e1). (item, ":", 1) == 0) { |
| 287 | char *attr_name; |
| 288 | |
| 289 | attr_name = SEXP_string_cstrcxx . . $ SEXP_string_cstr(c831a2fa12818dfe). (item); |
| 290 | |
| 291 | switch (*(attr_name + 1)) { |
| 292 | case 'i': |
| 293 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (attr_name + 1, "id") == 0) { |
| 294 | val = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669). (sexp_cmd, i + 1); |
| 295 | |
| 296 | if (val == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 297 | break; |
| 298 | |
| 299 | if (SEXP_numberpcxx . . $ SEXP_numberp(85f078d1f48ac431). (val)) { |
| 300 | seap_cmd->idcxx . . $ SEAP_cmd#id. = SEXP_number_getu_16cxx . . $ SEXP_number_getu_16(65d2c8d3088f8738). (val); |
| 301 | ++mattrs; |
| 302 | } |
| 303 | |
| 304 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (val); |
| 305 | } |
| 306 | break; |
| 307 | case 'r': |
| 308 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (attr_name + 1, "reply_id") == 0) { |
| 309 | val = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669). (sexp_cmd, i + 1); |
| 310 | |
| 311 | if (val == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 312 | break; |
| 313 | |
| 314 | if (SEXP_numberpcxx . . $ SEXP_numberp(85f078d1f48ac431). (val)) { |
| 315 | seap_cmd->ridcxx . . $ SEAP_cmd#rid. = SEXP_number_getu_16cxx . . $ SEXP_number_getu_16(65d2c8d3088f8738). (val); |
| 316 | seap_cmd->flagscxx . . $ SEAP_cmd#flags. |= SEAP_CMDFLAG_REPLYcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:41:9`!; |
| 317 | } |
| 318 | |
| 319 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (val); |
| 320 | } |
| 321 | break; |
| 322 | case 'c': |
| 323 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (attr_name + 1, "class") == 0) { |
| 324 | val = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669). (sexp_cmd, i + 1); |
| 325 | |
| 326 | if (val == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 327 | break; |
| 328 | |
| 329 | if (SEXP_stringpcxx . . $ SEXP_stringp(85f078d1f48ac431). (val)) { |
| 330 | if (SEXP_strcmpcxx . . $ SEXP_strcmp(3ef1a37bcb3c2a). (val, "usr") == 0) { |
| 331 | seap_cmd->classcxx . . $ SEAP_cmd#class. = SEAP_CMDCLASS_USRcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:37:9`!; |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (val); |
| 336 | } |
| 337 | break; |
| 338 | case 't': |
| 339 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (attr_name + 1, "type") == 0) { |
| 340 | val = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669). (sexp_cmd, i + 1); |
| 341 | |
| 342 | if (val == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 343 | break; |
| 344 | |
| 345 | if (SEXP_stringpcxx . . $ SEXP_stringp(85f078d1f48ac431). (val)) { |
| 346 | if (SEXP_strcmpcxx . . $ SEXP_strcmp(3ef1a37bcb3c2a). (val, "sync") == 0) |
| 347 | seap_cmd->flagscxx . . $ SEAP_cmd#flags. |= SEAP_CMDFLAG_SYNCcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:39:9`!; |
| 348 | } |
| 349 | |
| 350 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (val); |
| 351 | } |
| 352 | break; |
| 353 | } |
| 354 | |
| 355 | freecxx . . $ free(5d22bdacc48458e8). (attr_name); |
| 356 | ++i; ++i; |
| 357 | } else { |
| 358 | break; |
| 359 | } |
| 360 | |
| 361 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (item); |
| 362 | } |
| 363 | |
| 364 | if (item == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || mattrs < 1) { |
| 365 | if (item != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 366 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(item); |
| 367 | |
| 368 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 369 | return (-1); |
| 370 | } |
| 371 | |
| 372 | if (SEXP_numberpcxx . . $ SEXP_numberp(85f078d1f48ac431). (item)) { |
| 373 | seap_cmd->codecxx . . $ SEAP_cmd#code. = SEXP_number_getu_16cxx . . $ SEXP_number_getu_16(65d2c8d3088f8738). (item); |
| 374 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (item); |
| 375 | } else { |
| 376 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (item); |
| 377 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 378 | return (-1); |
| 379 | } |
| 380 | |
| 381 | seap_cmd->argscxx . . $ SEAP_cmd#args. = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669). (sexp_cmd, ++i); |
| 382 | |
| 383 | return (0); |
| 384 | } |
| 385 | |
| 386 | static SEXP_tcxx . . $ SEXP_t# *SEAP_packet_cmd2sexpcxx . . $ SEAP_packet_cmd2sexp(41192abad4b730e3). (SEAP_cmd_tcxx . . $ SEAP_cmd_t# *cmd) |
| 387 | { |
| 388 | SEXP_tcxx . . $ SEXP_t# *sexp; |
| 389 | SEXP_tcxx . . $ SEXP_t# *r0, *r1, *r2; |
| 390 | |
| 391 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(cmd != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 392 | |
| 393 | sexp = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810). (r0 = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2). (SEAP_SYM_CMDcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:36:9`!, strlencxx . . $ strlen(751346f8406fd082). (SEAP_SYM_CMDcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:36:9`!)), |
| 394 | r1 = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2). (":id", 3), |
| 395 | r2 = SEXP_number_newu_16cxx . . $ SEXP_number_newu_16(d369128c9e25efab). (cmd->idcxx . . $ SEAP_cmd#id.), |
| 396 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 397 | |
| 398 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 399 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r1); |
| 400 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r2); |
| 401 | |
| 402 | if (cmd->flagscxx . . $ SEAP_cmd#flags. & SEAP_CMDFLAG_REPLYcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:41:9`!) { |
| 403 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6). (sexp, |
| 404 | r0 = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2). (":reply_id", 9)); |
| 405 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6). (sexp, |
| 406 | r1 = SEXP_number_newu_16cxx . . $ SEXP_number_newu_16(d369128c9e25efab). (cmd->ridcxx . . $ SEAP_cmd#rid.)); |
| 407 | |
| 408 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 409 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r1); |
| 410 | } |
| 411 | |
| 412 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6). (sexp, |
| 413 | r0 = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2). (":class", 6)); |
| 414 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (r0); |
| 415 | |
| 416 | switch (cmd->classcxx . . $ SEAP_cmd#class.) { |
| 417 | case SEAP_CMDCLASS_USRcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:37:9`!: |
| 418 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6). (sexp, |
| 419 | r0 = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2). ("usr", 3)); |
| 420 | break; |
| 421 | case SEAP_CMDCLASS_INTcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:36:9`!: |
| 422 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6). (sexp, |
| 423 | r0 = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2). ("int", 3)); |
| 424 | break; |
| 425 | default: |
| 426 | abortcxx . . $ abort(8df32a62017fbbf6). (); |
| 427 | } |
| 428 | |
| 429 | |
| 430 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (r0); |
| 431 | |
| 432 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6). (sexp, |
| 433 | r0 = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2). (":type", 5)); |
| 434 | |
| 435 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6). (sexp, |
| 436 | r1 = (cmd->flagscxx . . $ SEAP_cmd#flags. & SEAP_CMDFLAG_SYNCcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:39:9`! ? |
| 437 | SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2). ("sync", 4) : SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2). ("async", 5))); |
| 438 | |
| 439 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6). (sexp, |
| 440 | r2 = SEXP_number_newu_16cxx . . $ SEXP_number_newu_16(d369128c9e25efab). (cmd->codecxx . . $ SEAP_cmd#code.)); |
| 441 | |
| 442 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 443 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r1); |
| 444 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r2); |
| 445 | |
| 446 | if (cmd->argscxx . . $ SEAP_cmd#args. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 447 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6). (sexp, cmd->argscxx . . $ SEAP_cmd#args.); |
| 448 | |
| 449 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("CMD -> SEXP"); |
| 450 | dOcxx . . $ `src/common/debug_priv.h:58:10`!(OSCAP_DEBUGOBJ_SEXPcxx . . $ `src/common/debug_priv.h:40:9`!, sexp); |
| 451 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("packet size: %zu", SEXP_sizeof(sexp)); |
| 452 | |
| 453 | SEXP_VALIDATEcxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:576:10`!(sexp); |
| 454 | return (sexp); |
| 455 | } |
| 456 | |
| 457 | static int SEAP_packet_sexp2errcxx . . $ SEAP_packet_sexp2err(8374357d89e6ddf). (SEXP_tcxx . . $ SEXP_t# *sexp_err, SEAP_err_tcxx . . $ SEAP_err_t# *seap_err) |
| 458 | { |
| 459 | SEXP_tcxx . . $ SEXP_t# *member; |
| 460 | uint32_tcxx . . $ uint32_t# n; |
| 461 | |
| 462 | seap_err->idcxx . . $ SEAP_err#id. = 0; |
| 463 | seap_err->codecxx . . $ SEAP_err#code. = SEAP_EUNKNOWNcxx . . $ `src/OVAL/probes/SEAP/_seap-types.h:87:9`!; |
| 464 | seap_err->typecxx . . $ SEAP_err#type. = SEAP_ETYPE_INTcxx . . $ `src/OVAL/probes/SEAP/_seap-types.h:73:9`!; |
| 465 | seap_err->datacxx . . $ SEAP_err#data. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 466 | |
| 467 | n = 2; |
| 468 | |
| 469 | while ((member = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669). (sexp_err, n)) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 470 | switch (SEXP_typeofcxx . . $ SEXP_typeof(dfe0d2bfa8d6f3af). (member)) { |
| 471 | case SEXP_TYPE_STRINGcxx . . $ `src/OVAL/probes/SEAP/public/sexp-types.h:76:9`!: |
| 472 | if (SEXP_string_nthcxx . . $ SEXP_string_nth(229c2c0bb207cd4a). (member, 1) != ':') { |
| 473 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Invalid string/attribute in packet"); |
| 474 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (member); |
| 475 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 476 | return (-1); |
| 477 | } |
| 478 | |
| 479 | if (SEXP_strcmpcxx . . $ SEXP_strcmp(3ef1a37bcb3c2a). (member, ":orig_id") == 0) { |
| 480 | SEXP_tcxx . . $ SEXP_t# *val; |
| 481 | |
| 482 | val = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669). (sexp_err, ++n); |
| 483 | |
| 484 | if (!SEXP_numberpcxx . . $ SEXP_numberp(85f078d1f48ac431). (val)) { |
| 485 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Invalid type of :orig_id value"); |
| 486 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (val); |
| 487 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (member); |
| 488 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 489 | return (-1); |
| 490 | } |
| 491 | |
| 492 | #if SEAP_MSGID_BITScxx . . $ `build/config.h:61:9`! == 64 |
| 493 | seap_err->id = SEXP_number_getu_64 (val); |
| 494 | #else |
| 495 | seap_err->idcxx . . $ SEAP_err#id. = SEXP_number_getu_32cxx . . $ SEXP_number_getu_32(60e3bd3ad0f89996). (val); |
| 496 | #endif |
| 497 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (val); |
| 498 | } else if (SEXP_strcmpcxx . . $ SEXP_strcmp(3ef1a37bcb3c2a). (member, ":type") == 0) { |
| 499 | SEXP_tcxx . . $ SEXP_t# *val; |
| 500 | |
| 501 | val = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669). (sexp_err, ++n); |
| 502 | seap_err->typecxx . . $ SEAP_err#type. = SEXP_number_getu_32cxx . . $ SEXP_number_getu_32(60e3bd3ad0f89996).(val); |
| 503 | |
| 504 | if (!SEXP_numberpcxx . . $ SEXP_numberp(85f078d1f48ac431).(val)) { |
| 505 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Invalid type of the :type attribute"); |
| 506 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (val); |
| 507 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (member); |
| 508 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 509 | return (-1); |
| 510 | } |
| 511 | |
| 512 | if (!(seap_err->typecxx . . $ SEAP_err#type. == SEAP_ETYPE_INTcxx . . $ `src/OVAL/probes/SEAP/_seap-types.h:73:9`! || |
| 513 | seap_err->typecxx . . $ SEAP_err#type. == SEAP_ETYPE_USERcxx . . $ `src/OVAL/probes/SEAP/_seap-types.h:74:9`!)) { |
| 514 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Invalid value of the :type attribute"); |
| 515 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(val); |
| 516 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(member); |
| 517 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 518 | return -1; |
| 519 | } |
| 520 | |
| 521 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (val); |
| 522 | } else { |
| 523 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Unknown packet attribute"); |
| 524 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (member); |
| 525 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 526 | return (-1); |
| 527 | } |
| 528 | |
| 529 | break; |
| 530 | case SEXP_TYPE_NUMBERcxx . . $ `src/OVAL/probes/SEAP/public/sexp-types.h:77:9`!: |
| 531 | seap_err->codecxx . . $ SEAP_err#code. = SEXP_number_getu_32cxx . . $ SEXP_number_getu_32(60e3bd3ad0f89996). (member); |
| 532 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (member); |
| 533 | |
| 534 | goto loop_exit; |
| 535 | default: |
| 536 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Unexpected type of packet member: list"); |
| 537 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (member); |
| 538 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 539 | return (-1); |
| 540 | } |
| 541 | |
| 542 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(member); |
| 543 | ++n; |
| 544 | } |
| 545 | loop_exit: |
| 546 | seap_err->datacxx . . $ SEAP_err#data. = SEXP_list_nthcxx . . $ SEXP_list_nth(8cad6aa883a18669). (sexp_err, n + 1); |
| 547 | |
| 548 | return (0); |
| 549 | } |
| 550 | |
| 551 | static SEXP_tcxx . . $ SEXP_t# *SEAP_packet_err2sexpcxx . . $ SEAP_packet_err2sexp(8a4ee9f6a747d7c2). (SEAP_err_tcxx . . $ SEAP_err_t# *err) |
| 552 | { |
| 553 | SEXP_tcxx . . $ SEXP_t# *sexp; |
| 554 | SEXP_tcxx . . $ SEXP_t# *r0, *r1, *r2, *r3, *r4, *r5; |
| 555 | |
| 556 | sexp = SEXP_list_newcxx . . $ SEXP_list_new(902e4f76566c8810). (r0 = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2). (SEAP_SYM_ERRcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:37:9`!, strlencxx . . $ strlen(751346f8406fd082). (SEAP_SYM_ERRcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:37:9`!)), |
| 557 | r1 = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2). (":orig_id", 8), |
| 558 | #if SEAP_MSGID_BITScxx . . $ `build/config.h:61:9`! == 64 |
| 559 | r2 = SEXP_number_newu_64 (err->id), |
| 560 | #else |
| 561 | r2 = SEXP_number_newu_32cxx . . $ SEXP_number_newu_32(8a1232211d6fd92a). (err->idcxx . . $ SEAP_err#id.), |
| 562 | #endif |
| 563 | r3 = SEXP_string_newcxx . . $ SEXP_string_new(a588a58d7514eee2). (":type", 5), |
| 564 | r4 = SEXP_number_newucxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:133:9`! (err->typecxx . . $ SEAP_err#type.), |
| 565 | r5 = SEXP_number_newucxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:133:9`! (err->codecxx . . $ SEAP_err#code.), |
| 566 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 567 | |
| 568 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r0); |
| 569 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r1); |
| 570 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r2); |
| 571 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r3); |
| 572 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r4); |
| 573 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(r5); |
| 574 | |
| 575 | if (err->datacxx . . $ SEAP_err#data. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 576 | SEXP_list_addcxx . . $ SEXP_list_add(35a066576d9f6ea6). (sexp, err->datacxx . . $ SEAP_err#data.); |
| 577 | |
| 578 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("ERR -> SEXP"); |
| 579 | dOcxx . . $ `src/common/debug_priv.h:58:10`!(OSCAP_DEBUGOBJ_SEXPcxx . . $ `src/common/debug_priv.h:40:9`!, sexp); |
| 580 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("packet size: %zu", SEXP_sizeof(sexp)); |
| 581 | |
| 582 | return (sexp); |
| 583 | } |
| 584 | |
| 585 | static SEXP_tcxx . . $ SEXP_t# *SEAP_packet2sexpcxx . . $ SEAP_packet2sexp(a0e4ef62a7f56cd1). (SEAP_packet_tcxx . . $ SEAP_packet_t# *packet) |
| 586 | { |
| 587 | SEXP_tcxx . . $ SEXP_t# *sexp = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 588 | |
| 589 | switch (packet->typecxx . . $ SEAP_packet#type.) { |
| 590 | case SEAP_PACKET_MSGcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:40:9`!: |
| 591 | sexp = SEAP_packet_msg2sexpcxx . . $ SEAP_packet_msg2sexp(265ef69b98da50a9). (SEAP_packet_msgcxx . . $ SEAP_packet_msg(3b2c095c5026749b). (packet)); |
| 592 | break; |
| 593 | case SEAP_PACKET_CMDcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:42:9`!: |
| 594 | sexp = SEAP_packet_cmd2sexpcxx . . $ SEAP_packet_cmd2sexp(41192abad4b730e3). (SEAP_packet_cmdcxx . . $ SEAP_packet_cmd(9f46e6fb5acf697d). (packet)); |
| 595 | break; |
| 596 | case SEAP_PACKET_ERRcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:41:9`!: |
| 597 | sexp = SEAP_packet_err2sexpcxx . . $ SEAP_packet_err2sexp(8a4ee9f6a747d7c2). (SEAP_packet_errcxx . . $ SEAP_packet_err(3bc7b797eb278dfe). (packet)); |
| 598 | break; |
| 599 | default: |
| 600 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 601 | } |
| 602 | |
| 603 | return (sexp); |
| 604 | } |
| 605 | |
| 606 | int SEAP_packet_recvcxx . . $ SEAP_packet_recv(a0f51301b886eec1). (SEAP_CTX_tcxx . . $ SEAP_CTX_t# *ctx, int sd, SEAP_packet_tcxx . . $ SEAP_packet_t# **packet) |
| 607 | { |
| 608 | SEAP_desc_tcxx . . $ SEAP_desc_t# *dsc; |
| 609 | SEXP_tcxx . . $ SEXP_t# *sexp_buffer; |
| 610 | SEXP_tcxx . . $ SEXP_t# *sexp_packet; |
| 611 | |
| 612 | SEXP_tcxx . . $ SEXP_t# *psym_sexp; |
| 613 | char psym_cstr_b[16+1]; |
| 614 | char *psym_cstr; |
| 615 | |
| 616 | SEAP_packet_tcxx . . $ SEAP_packet_t# *_packet; |
| 617 | |
| 618 | dsc = SEAP_desc_getcxx . . $ SEAP_desc_get(b324436d5ff0f8fe). (ctx->sd_tablecxx . . $ SEAP_CTX#sd_table., sd); |
| 619 | |
| 620 | if (dsc == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 621 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EFAULTcxx . . $ `<external>/8987895939074593727/errno-base.h:18:9`!; |
| 622 | return (-1); |
| 623 | } |
| 624 | |
| 625 | if (SEAP_packetq_getcxx . . $ SEAP_packetq_get(6a2f70d2633884bd).(&dsc->pck_queuecxx . . $ $anonymous_type_5b6d52305350878e_0#pck_queue., packet) != -1) |
| 626 | return (0); |
| 627 | |
| 628 | /* |
| 629 | * Event loop |
| 630 | * The read mutex is not locked during the wait for an event. |
| 631 | * This allows other threads to hijack the input stream and |
| 632 | * to perform high priority tasks (e.g. synchronous commands). |
| 633 | * If there is a read event and nobody (except this thread) has |
| 634 | * locked the read mutex then the execution of this loop is |
| 635 | * stopped, the read mutex gets locked and the receiving and |
| 636 | * parsing of data can begin. |
| 637 | */ |
| 638 | |
| 639 | for (;;) { |
| 640 | switch (DESC_TRYRLOCKcxx . . $ `src/OVAL/probes/SEAP/seap-descriptor.h:118:9`! (dsc)) { |
| 641 | case 1: |
| 642 | goto eloop_exit; |
| 643 | case 0: |
| 644 | switch (DESC_RLOCKcxx . . $ `src/OVAL/probes/SEAP/seap-descriptor.h:119:9`! (dsc)) { |
| 645 | case 1: |
| 646 | DESC_RUNLOCKcxx . . $ `src/OVAL/probes/SEAP/seap-descriptor.h:120:9`!(dsc); |
| 647 | continue; |
| 648 | case -1: |
| 649 | goto fail_rmutex; |
| 650 | default: |
| 651 | abortcxx . . $ abort(8df32a62017fbbf6). (); |
| 652 | } |
| 653 | case -1: |
| 654 | fail_rmutex: |
| 655 | |
| 656 | protect_errnocxx . . $ `src/common/util.h:446:9`! { |
| 657 | dEcxx . . $ `src/common/debug_priv.h:63:9`!("An error ocured while locking the read mutex: dsc=%p, errno=%u, %s.", |
| 658 | dsc, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!, strerror (errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)); |
| 659 | } |
| 660 | |
| 661 | return (-1); |
| 662 | default: |
| 663 | abortcxx . . $ abort(8df32a62017fbbf6). (); |
| 664 | } |
| 665 | } |
| 666 | eloop_exit: |
| 667 | |
| 668 | sexp_buffer = sch_queue_recvsexpcxx . . $ sch_queue_recvsexp(5337bf09bc59ad21).(dsc); |
| 669 | SEXP_VALIDATEcxx . . $ `src/OVAL/probes/SEAP/public/sexp-manip.h:576:10`!(sexp_buffer); |
| 670 | |
| 671 | (*packet) = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 672 | |
| 673 | while((sexp_packet = SEXP_list_popcxx . . $ SEXP_list_pop(478b347fcbbad3c5). (sexp_buffer)) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 674 | if (!SEXP_listpcxx . . $ SEXP_listp(85f078d1f48ac431).(sexp_packet)) { |
| 675 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Invalid SEAP packet received: %s.", "not a list"); |
| 676 | |
| 677 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (sexp_packet); |
| 678 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (sexp_buffer); |
| 679 | |
| 680 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 681 | return (-1); |
| 682 | } else if (SEXP_list_lengthcxx . . $ SEXP_list_length(7b7039adf1662ab5). (sexp_packet) < 2) { |
| 683 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Invalid SEAP packet received: %s.", "list length < 2"); |
| 684 | |
| 685 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (sexp_packet); |
| 686 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (sexp_buffer); |
| 687 | |
| 688 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 689 | return (-1); |
| 690 | } |
| 691 | |
| 692 | psym_sexp = SEXP_list_firstcxx . . $ SEXP_list_first(2f7f980afaaae0f0). (sexp_packet); |
| 693 | |
| 694 | if (!SEXP_stringpcxx . . $ SEXP_stringp(85f078d1f48ac431).(psym_sexp)) { |
| 695 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Invalid SEAP packet received: %s.", "first list item is not a string"); |
| 696 | |
| 697 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (psym_sexp); |
| 698 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (sexp_packet); |
| 699 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (sexp_buffer); |
| 700 | |
| 701 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 702 | return (-1); |
| 703 | } else if (SEXP_string_lengthcxx . . $ SEXP_string_length(7b7039adf1662ab5). (psym_sexp) != (strlencxx . . $ strlen(751346f8406fd082). (SEAP_SYM_PREFIXcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:34:9`!) + 3)) { |
| 704 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Invalid SEAP packet received: %s.", "invalid packet type symbol length"); |
| 705 | |
| 706 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (psym_sexp); |
| 707 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (sexp_packet); |
| 708 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (sexp_buffer); |
| 709 | |
| 710 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 711 | return (-1); |
| 712 | } else if (SEXP_strncmpcxx . . $ SEXP_strncmp(209fd5a59eedb5e1). (psym_sexp, SEAP_SYM_PREFIXcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:34:9`!, strlencxx . . $ strlen(751346f8406fd082). (SEAP_SYM_PREFIXcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:34:9`!)) != 0) { |
| 713 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Invalid SEAP packet received: %s.", "invalid prefix"); |
| 714 | |
| 715 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (psym_sexp); |
| 716 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (sexp_packet); |
| 717 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (sexp_buffer); |
| 718 | |
| 719 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 720 | return (-1); |
| 721 | } |
| 722 | |
| 723 | SEXP_string_cstr_rcxx . . $ SEXP_string_cstr_r(ca07af91a4fa826f). (psym_sexp, psym_cstr_b, sizeof psym_cstr_b); |
| 724 | psym_cstr = psym_cstr_b + strlencxx . . $ strlen(751346f8406fd082). (SEAP_SYM_PREFIXcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:34:9`!); |
| 725 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (psym_sexp); |
| 726 | |
| 727 | switch (psym_cstr[0]) { |
| 728 | case 'm': |
| 729 | if (psym_cstr[1] == 's' && |
| 730 | psym_cstr[2] == 'g') |
| 731 | { |
| 732 | _packet = SEAP_packet_newcxx . . $ SEAP_packet_new(384bfbf0d7214bc9). (); |
| 733 | _packet->typecxx . . $ SEAP_packet#type. = SEAP_PACKET_MSGcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:40:9`!; |
| 734 | |
| 735 | if (SEAP_packet_sexp2msgcxx . . $ SEAP_packet_sexp2msg(25061e6c2f525510). (sexp_packet, &(_packet->datacxx . . $ SEAP_packet#data..msgcxx . . $ SEAP_packet#$anonymous_type_0#msg.)) != 0) { |
| 736 | /* error */ |
| 737 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Invalid SEAP packet received: %s.", "can't translate to msg struct"); |
| 738 | |
| 739 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (sexp_packet); |
| 740 | SEAP_packet_freecxx . . $ SEAP_packet_free(2cb4ed29150e9a0f).(_packet); |
| 741 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (sexp_buffer); |
| 742 | |
| 743 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 744 | return (-1); |
| 745 | } |
| 746 | break; |
| 747 | } |
| 748 | goto invalid; |
| 749 | case 'c': |
| 750 | if (psym_cstr[1] == 'm' && |
| 751 | psym_cstr[2] == 'd') |
| 752 | { |
| 753 | _packet = SEAP_packet_newcxx . . $ SEAP_packet_new(384bfbf0d7214bc9). (); |
| 754 | _packet->typecxx . . $ SEAP_packet#type. = SEAP_PACKET_CMDcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:42:9`!; |
| 755 | |
| 756 | if (SEAP_packet_sexp2cmdcxx . . $ SEAP_packet_sexp2cmd(e5113bab617e5487). (sexp_packet, &(_packet->datacxx . . $ SEAP_packet#data..cmdcxx . . $ SEAP_packet#$anonymous_type_0#cmd.)) != 0) { |
| 757 | /* error */ |
| 758 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Invalid SEAP packet received: %s.", "can't translate to cmd struct"); |
| 759 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (sexp_packet); |
| 760 | SEAP_packet_freecxx . . $ SEAP_packet_free(2cb4ed29150e9a0f).(_packet); |
| 761 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (sexp_buffer); |
| 762 | |
| 763 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 764 | return (-1); |
| 765 | } |
| 766 | break; |
| 767 | } |
| 768 | goto invalid; |
| 769 | case 'e': |
| 770 | if (psym_cstr[1] == 'r' && |
| 771 | psym_cstr[2] == 'r') |
| 772 | { |
| 773 | _packet = SEAP_packet_newcxx . . $ SEAP_packet_new(384bfbf0d7214bc9). (); |
| 774 | _packet->typecxx . . $ SEAP_packet#type. = SEAP_PACKET_ERRcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:41:9`!; |
| 775 | |
| 776 | if (SEAP_packet_sexp2errcxx . . $ SEAP_packet_sexp2err(8374357d89e6ddf). (sexp_packet, &(_packet->datacxx . . $ SEAP_packet#data..errcxx . . $ SEAP_packet#$anonymous_type_0#err.)) != 0) { |
| 777 | /* error */ |
| 778 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Invalid SEAP packet received: %s.", "can't translate to err struct"); |
| 779 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (sexp_packet); |
| 780 | SEAP_packet_freecxx . . $ SEAP_packet_free(2cb4ed29150e9a0f).(_packet); |
| 781 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (sexp_buffer); |
| 782 | |
| 783 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 784 | return (-1); |
| 785 | } |
| 786 | break; |
| 787 | } |
| 788 | /* FALLTHROUGH */ |
| 789 | default: |
| 790 | invalid: |
| 791 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Invalid SEAP packet received: %s.", "invalid packet type symbol"); |
| 792 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (sexp_packet); |
| 793 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (sexp_buffer); |
| 794 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!; |
| 795 | return (-1); |
| 796 | } |
| 797 | |
| 798 | |
| 799 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Received packet"); |
| 800 | dOcxx . . $ `src/common/debug_priv.h:58:10`!(OSCAP_DEBUGOBJ_SEXPcxx . . $ `src/common/debug_priv.h:40:9`!, sexp_packet); |
| 801 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("packet size: %zu", SEXP_sizeof(sexp_packet)); |
| 802 | |
| 803 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(sexp_packet); |
| 804 | |
| 805 | if (*packet == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 806 | (*packet) = _packet; |
| 807 | else |
| 808 | SEAP_packetq_putcxx . . $ SEAP_packetq_put(14d08a8da169d57d).(&dsc->pck_queuecxx . . $ $anonymous_type_5b6d52305350878e_0#pck_queue., _packet); |
| 809 | |
| 810 | _packet = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 811 | } |
| 812 | |
| 813 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4).(sexp_buffer); |
| 814 | |
| 815 | return (0); |
| 816 | } |
| 817 | |
| 818 | int SEAP_packet_recv_bytypecxx . . $ SEAP_packet_recv_bytype(f8c15b059e9b795d). (SEAP_CTX_tcxx . . $ SEAP_CTX_t# *ctx, int sd, SEAP_packet_tcxx . . $ SEAP_packet_t# **packet, uint8_tcxx . . $ uint8_t# type) |
| 819 | { |
| 820 | int ret; |
| 821 | SEAP_packet_tcxx . . $ SEAP_packet_t# *pck; |
| 822 | SEAP_desc_tcxx . . $ SEAP_desc_t# *dsc; |
| 823 | |
| 824 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(ctx != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 825 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(packet != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 826 | _Acxx . . $ `src/common/debug_priv.h:43:9`!(type == SEAP_PACKET_CMDcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:42:9`! || |
| 827 | type == SEAP_PACKET_MSGcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:40:9`! || |
| 828 | type == SEAP_PACKET_ERRcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:41:9`!); |
| 829 | |
| 830 | dsc = SEAP_desc_getcxx . . $ SEAP_desc_get(b324436d5ff0f8fe). (ctx->sd_tablecxx . . $ SEAP_CTX#sd_table., sd); |
| 831 | |
| 832 | if (dsc == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 833 | return (-1); |
| 834 | |
| 835 | for (;;) { |
| 836 | pck = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 837 | ret = SEAP_packet_recvcxx . . $ SEAP_packet_recv(a0f51301b886eec1). (ctx, sd, &pck); |
| 838 | |
| 839 | if (ret != 0) |
| 840 | return (ret); |
| 841 | else if (pck->typecxx . . $ SEAP_packet#type. == type) |
| 842 | break; |
| 843 | else if (SEAP_packetq_putcxx . . $ SEAP_packetq_put(14d08a8da169d57d). (&dsc->pck_queuecxx . . $ $anonymous_type_5b6d52305350878e_0#pck_queue., pck) == -1) /* XXX: infinite loop */ |
| 844 | return (-1); |
| 845 | } |
| 846 | |
| 847 | *packet = pck; |
| 848 | |
| 849 | return (ret); |
| 850 | } |
| 851 | |
| 852 | int SEAP_packet_sendcxx . . $ SEAP_packet_send(ef224cc9abb3a138). (SEAP_CTX_tcxx . . $ SEAP_CTX_t# *ctx, int sd, SEAP_packet_tcxx . . $ SEAP_packet_t# *packet) |
| 853 | { |
| 854 | SEXP_tcxx . . $ SEXP_t# *packet_sexp; |
| 855 | SEAP_desc_tcxx . . $ SEAP_desc_t# *dsc; |
| 856 | int ret; |
| 857 | |
| 858 | ret = -1; |
| 859 | dsc = SEAP_desc_getcxx . . $ SEAP_desc_get(b324436d5ff0f8fe). (ctx->sd_tablecxx . . $ SEAP_CTX#sd_table., sd); |
| 860 | |
| 861 | if (dsc == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 862 | return (-1); |
| 863 | |
| 864 | packet_sexp = SEAP_packet2sexpcxx . . $ SEAP_packet2sexp(a0e4ef62a7f56cd1). (packet); |
| 865 | |
| 866 | if (packet_sexp == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 867 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("Can't convert S-exp to packet"); |
| 868 | return (-1); |
| 869 | } |
| 870 | |
| 871 | if (DESC_WLOCKcxx . . $ `src/OVAL/probes/SEAP/seap-descriptor.h:123:9`!(dsc) == 1) { |
| 872 | ret = 0; |
| 873 | |
| 874 | if (sch_queue_sendsexpcxx . . $ sch_queue_sendsexp(bc098aea6e2d56cd).(dsc, packet_sexp, 0) < 0) { |
| 875 | ret = -1; |
| 876 | |
| 877 | protect_errnocxx . . $ `src/common/util.h:446:9`! { |
| 878 | dDcxx . . $ `src/common/debug_priv.h:64:9`!("FAIL: errno=%u, %s.", errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!, strerror (errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)); |
| 879 | } |
| 880 | } |
| 881 | |
| 882 | if (DESC_WUNLOCKcxx . . $ `src/OVAL/probes/SEAP/seap-descriptor.h:124:9`!(dsc) != 1) { |
| 883 | dEcxx . . $ `src/common/debug_priv.h:63:9`!("DESC_WUNLOCK failed to unlock a mutex: %s", strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)); |
| 884 | ret = -1; |
| 885 | } |
| 886 | } else { |
| 887 | dEcxx . . $ `src/common/debug_priv.h:63:9`!("DESC_WLOCK failed to lock a mutex: %s", strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)); |
| 888 | ret = -1; |
| 889 | } |
| 890 | |
| 891 | |
| 892 | protect_errnocxx . . $ `src/common/util.h:446:9`! { |
| 893 | SEXP_freecxx . . $ SEXP_free(c6b28547479798f4). (packet_sexp); |
| 894 | } |
| 895 | |
| 896 | return (ret); |
| 897 | } |
| 898 | |
| 899 | int SEAP_packet_enqueuecxx . . $ SEAP_packet_enqueue(ef224cc9abb3a138). (SEAP_CTX_tcxx . . $ SEAP_CTX_t# *ctx, int sd, SEAP_packet_tcxx . . $ SEAP_packet_t# *packet) |
| 900 | { |
| 901 | return (-1); |
| 902 | } |