input stringlengths 16 454k | output stringlengths 13 350k | function_name stringlengths 1 100 | repo_name stringlengths 6 43 | category stringclasses 76
values | sample_id stringlengths 22 88 | decompiler stringclasses 1
value | opt_level stringclasses 1
value |
|---|---|---|---|---|---|---|---|
protobuf_c_boolean protobuf_c_message_check(const ProtobufCMessage *message) {
unsigned int i;
unsigned int j;
unsigned int j_0;
unsigned int j_1;
ProtobufCType type;
ProtobufCLabel label;
const ProtobufCFieldDescriptor *f;
ProtobufCMessage ***field;
ProtobufCMessage *submessage_0;
size_t *quantity;... | protobuf_c_boolean protobuf_c_message_check(const ProtobufCMessage *message) {
unsigned i;
if (!message || !message->descriptor ||
message->descriptor->magic != PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC) {
return FALSE;
}
for (i = 0; i < message->descriptor->n_fields; i++) {
const ProtobufCFieldDescr... | protobuf_c_message_check | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
const ProtobufCFieldDescriptor *
protobuf_c_message_descriptor_get_field(const ProtobufCMessageDescriptor *desc,
unsigned int value) {
int rv;
rv = int_range_lookup(desc->n_field_ranges, desc->field_ranges, value);
if (rv >= 0)
return &desc->fields[rv];
else
retu... | const ProtobufCFieldDescriptor *
protobuf_c_message_descriptor_get_field(const ProtobufCMessageDescriptor *desc,
unsigned value) {
int rv = int_range_lookup(desc->n_field_ranges, desc->field_ranges, value);
if (rv < 0)
return NULL;
return desc->fields + rv;
} | protobuf_c_message_descriptor_get_field | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
const ProtobufCFieldDescriptor *protobuf_c_message_descriptor_get_field_by_name(
const ProtobufCMessageDescriptor *desc, const char *name) {
unsigned int start;
unsigned int count;
unsigned int mid;
int rv;
const ProtobufCFieldDescriptor *field;
const ProtobufCFieldDescriptor *fielda;
start = 0;
if... | const ProtobufCFieldDescriptor *protobuf_c_message_descriptor_get_field_by_name(
const ProtobufCMessageDescriptor *desc, const char *name) {
unsigned start = 0;
unsigned count;
const ProtobufCFieldDescriptor *field;
if (desc == NULL || desc->fields_sorted_by_name == NULL)
return NULL;
count = desc->... | protobuf_c_message_descriptor_get_field_by_name | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
void protobuf_c_message_free_unpacked(ProtobufCMessage *message,
ProtobufCAllocator *allocator) {
ProtobufCAllocator *allocatora;
unsigned int f;
unsigned int fa;
unsigned int i;
unsigned int i_0;
unsigned int i_1;
const ProtobufCMessageDescriptor *desc;
ProtobufCMe... | void protobuf_c_message_free_unpacked(ProtobufCMessage *message,
ProtobufCAllocator *allocator) {
const ProtobufCMessageDescriptor *desc;
unsigned f;
if (message == NULL)
return;
desc = message->descriptor;
ASSERT_IS_MESSAGE(message);
if (allocator == NULL)
... | protobuf_c_message_free_unpacked | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t protobuf_c_message_get_packed_size(const ProtobufCMessage *message) {
unsigned int i;
unsigned int ia;
size_t rv;
const ProtobufCFieldDescriptor *field;
char *member;
uint32_t *qmember;
rv = 0;
if (message->descriptor->magic != 682290937)
__assert_fail("((message)->descriptor)->magic == "
... | size_t protobuf_c_message_get_packed_size(const ProtobufCMessage *message) {
unsigned i;
size_t rv = 0;
ASSERT_IS_MESSAGE(message);
for (i = 0; i < message->descriptor->n_fields; i++) {
const ProtobufCFieldDescriptor *field = message->descriptor->fields + i;
const void *member = ((const char *)message)... | protobuf_c_message_get_packed_size | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
void protobuf_c_message_init(const ProtobufCMessageDescriptor *descriptor,
void *message) {
descriptor->message_init((ProtobufCMessage *)message);
} | void protobuf_c_message_init(const ProtobufCMessageDescriptor *descriptor,
void *message) {
descriptor->message_init((ProtobufCMessage *)(message));
} | protobuf_c_message_init | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t protobuf_c_message_pack(const ProtobufCMessage *message, uint8_t *out) {
unsigned int i;
unsigned int ia;
size_t rv;
const ProtobufCFieldDescriptor *field;
char *member;
uint32_t *qmember;
rv = 0;
if (message->descriptor->magic != 682290937)
__assert_fail("((message)->descriptor)->magic == "... | size_t protobuf_c_message_pack(const ProtobufCMessage *message, uint8_t *out) {
unsigned i;
size_t rv = 0;
ASSERT_IS_MESSAGE(message);
for (i = 0; i < message->descriptor->n_fields; i++) {
const ProtobufCFieldDescriptor *field = message->descriptor->fields + i;
const void *member = ((const char *)messa... | protobuf_c_message_pack | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t protobuf_c_message_pack_to_buffer(const ProtobufCMessage *message,
ProtobufCBuffer *buffer) {
unsigned int i;
unsigned int ia;
size_t rv;
const ProtobufCFieldDescriptor *field;
char *member;
uint32_t *qmember;
rv = 0;
if (message->descriptor->magic != 682... | size_t protobuf_c_message_pack_to_buffer(const ProtobufCMessage *message,
ProtobufCBuffer *buffer) {
unsigned i;
size_t rv = 0;
ASSERT_IS_MESSAGE(message);
for (i = 0; i < message->descriptor->n_fields; i++) {
const ProtobufCFieldDescriptor *field = message->descrip... | protobuf_c_message_pack_to_buffer | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
ProtobufCMessage *
protobuf_c_message_unpack(const ProtobufCMessageDescriptor *desc,
ProtobufCAllocator *allocator, size_t len,
const uint8_t *data) {
unsigned int v5;
ScannedMember *v6;
ScannedMember *v7;
unsigned int v8;
ScannedMember *v9;
const Protobuf... | ProtobufCMessage *
protobuf_c_message_unpack(const ProtobufCMessageDescriptor *desc,
ProtobufCAllocator *allocator, size_t len,
const uint8_t *data) {
ProtobufCMessage *rv;
size_t rem = len;
const uint8_t *at = data;
const ProtobufCFieldDescriptor *last_field ... | protobuf_c_message_unpack | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
const ProtobufCMethodDescriptor *
protobuf_c_service_descriptor_get_method_by_name(
const ProtobufCServiceDescriptor *desc, const char *name) {
unsigned int start;
unsigned int count;
unsigned int mid;
int rv;
start = 0;
if (!desc || !desc->method_indices_by_name)
return 0;
count = desc->n_method... | const ProtobufCMethodDescriptor *
protobuf_c_service_descriptor_get_method_by_name(
const ProtobufCServiceDescriptor *desc, const char *name) {
unsigned start = 0;
unsigned count;
if (desc == NULL || desc->method_indices_by_name == NULL)
return NULL;
count = desc->n_methods;
while (count > 1) {
... | protobuf_c_service_descriptor_get_method_by_name | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
void protobuf_c_service_destroy(ProtobufCService *service) {
service->destroy(service);
} | void protobuf_c_service_destroy(ProtobufCService *service) {
service->destroy(service);
} | protobuf_c_service_destroy | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
void protobuf_c_service_generated_init(
ProtobufCService *service, const ProtobufCServiceDescriptor *descriptor,
ProtobufCServiceDestroy destroy) {
if (descriptor->magic != 336960451)
__assert_fail("(descriptor)->magic == PROTOBUF_C__SERVICE_DESCRIPTOR_MAGIC",
"./protobuf-c.c", 0xDCCu,
... | void protobuf_c_service_generated_init(
ProtobufCService *service, const ProtobufCServiceDescriptor *descriptor,
ProtobufCServiceDestroy destroy) {
ASSERT_IS_SERVICE_DESCRIPTOR(descriptor);
service->descriptor = descriptor;
service->destroy = destroy;
service->invoke = protobuf_c_service_invoke_internal... | protobuf_c_service_generated_init | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
void protobuf_c_service_invoke_internal(ProtobufCService *service,
unsigned int method_index,
const ProtobufCMessage *input,
ProtobufCClosure closure,
void *clo... | void protobuf_c_service_invoke_internal(ProtobufCService *service,
unsigned method_index,
const ProtobufCMessage *input,
ProtobufCClosure closure,
void *closure... | protobuf_c_service_invoke_internal | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
const char *protobuf_c_version() { return "1.3.3"; } | const char *protobuf_c_version(void) { return PROTOBUF_C_VERSION; } | protobuf_c_version | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
uint32_t protobuf_c_version_number() { return 1003003; } | uint32_t protobuf_c_version_number(void) { return PROTOBUF_C_VERSION_NUMBER; } | protobuf_c_version_number | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
InterceptResponse *recv_intercept_response(int fd) {
long v1;
long v2;
long v3;
uint32_t res_len;
uint32_t rem;
int sudo_debug_subsys;
InterceptResponse *res;
uint8_t *cp;
uint8_t *buf;
ssize_t nread;
void *sudo_debug_ret;
unsigned long v13;
v13 = __readfsqword(0x28u);
res = 0;
buf = 0;
... | InterceptResponse *recv_intercept_response(int fd) {
InterceptResponse *res = NULL;
ssize_t nread;
uint32_t rem, res_len;
uint8_t *cp, *buf = NULL;
debug_decl(recv_intercept_response, SUDO_DEBUG_EXEC);
nread = recv(fd, &res_len, sizeof(res_len), 0);
if ((size_t)nread != sizeof(res_len)) {
if (nread =... | recv_intercept_response | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t repeated_field_get_packed_size(const ProtobufCFieldDescriptor *field,
size_t count, const void *member) {
unsigned int i;
unsigned int ia;
unsigned int ib;
unsigned int ic;
unsigned int id;
unsigned int ie;
unsigned int ig;
unsigned int ih;
size_t header_si... | static size_t
repeated_field_get_packed_size(const ProtobufCFieldDescriptor *field,
size_t count, const void *member) {
size_t header_size;
size_t rv = 0;
unsigned i;
void *array = *(void *const *)member;
if (count == 0)
return 0;
header_size = get_tag_size(field->id);
... | repeated_field_get_packed_size | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t repeated_field_pack(const ProtobufCFieldDescriptor *field, size_t count,
const void *member, uint8_t *out) {
unsigned int i;
unsigned int ia;
unsigned int ib;
unsigned int ic;
unsigned int id;
unsigned int ie;
unsigned int ig;
unsigned int header_lena;
unsigned int he... | static size_t repeated_field_pack(const ProtobufCFieldDescriptor *field,
size_t count, const void *member,
uint8_t *out) {
void *array = *(void *const *)member;
unsigned i;
if (0 != (field->flags & PROTOBUF_C_FIELD_FLAG_PACKED)) {
unsigned h... | repeated_field_pack | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t repeated_field_pack_to_buffer(const ProtobufCFieldDescriptor *field,
unsigned int count, const void *member,
ProtobufCBuffer *buffer) {
unsigned int i;
unsigned int rv_0;
char *array;
size_t siz;
size_t rva;
size_t rv;
size_t... | static size_t
repeated_field_pack_to_buffer(const ProtobufCFieldDescriptor *field,
unsigned count, const void *member,
ProtobufCBuffer *buffer) {
char *array = *(char *const *)member;
if (count == 0)
return 0;
if (0 != (field->flags & PROTOBUF_C_FIE... | repeated_field_pack_to_buffer | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t required_field_get_packed_size(const ProtobufCFieldDescriptor *field,
const void *member) {
size_t packed_size;
size_t rv;
size_t len_0;
rv = get_tag_size(field->id);
switch (field->type) {
case PROTOBUF_C_TYPE_INT32:
case PROTOBUF_C_TYPE_ENUM:
return rv +... | static size_t
required_field_get_packed_size(const ProtobufCFieldDescriptor *field,
const void *member) {
size_t rv = get_tag_size(field->id);
switch (field->type) {
case PROTOBUF_C_TYPE_SINT32:
return rv + sint32_size(*(const int32_t *)member);
case PROTOBUF_C_TYPE_ENUM:
c... | required_field_get_packed_size | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t required_field_pack(const ProtobufCFieldDescriptor *field,
const void *member, uint8_t *out) {
size_t result;
size_t rv;
rv = tag_pack(field->id, out);
switch (field->type) {
case PROTOBUF_C_TYPE_INT32:
case PROTOBUF_C_TYPE_ENUM:
*out = *out;
result = rv + int32_pa... | static size_t required_field_pack(const ProtobufCFieldDescriptor *field,
const void *member, uint8_t *out) {
size_t rv = tag_pack(field->id, out);
switch (field->type) {
case PROTOBUF_C_TYPE_SINT32:
out[0] |= PROTOBUF_C_WIRE_TYPE_VARINT;
return rv + sint32_pack(*(const i... | required_field_pack | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t required_field_pack_to_buffer(const ProtobufCFieldDescriptor *field,
const void *member,
ProtobufCBuffer *buffer) {
size_t v3;
size_t rv;
size_t rva;
size_t rvb;
size_t rvc;
size_t rvd;
size_t sublen_1;
const ProtobufCMessa... | static size_t
required_field_pack_to_buffer(const ProtobufCFieldDescriptor *field,
const void *member, ProtobufCBuffer *buffer) {
size_t rv;
uint8_t scratch[MAX_UINT64_ENCODED_SIZE * 2];
rv = tag_pack(field->id, scratch);
switch (field->type) {
case PROTOBUF_C_TYPE_SINT32:
s... | required_field_pack_to_buffer | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
bool resolve_path(const char *cmnd, char *out_cmnd, size_t out_size) {
int v4;
char *v5;
int v6;
int errval;
int len;
char **p;
char *cp;
char *endp;
char *colon;
stat sb;
char path[4104];
unsigned long v16;
v16 = __readfsqword(0x28u);
errval = 2;
for (p = environ;; ++p) {
cp = *p;
... | static bool resolve_path(const char *cmnd, char *out_cmnd, size_t out_size) {
struct stat sb;
int errval = ENOENT;
char path[PATH_MAX];
char **p, *cp, *endp;
int dirlen, len;
for (p = environ; (cp = *p) != NULL; p++) {
if (strncmp(cp, "PATH=", sizeof("PATH=") - 1) == 0) {
cp += sizeof("PATH=") - ... | resolve_path | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t scan_length_prefixed_data(size_t len, const uint8_t *data,
size_t *prefix_len_out) {
unsigned int v3;
unsigned int i;
unsigned int shift;
unsigned int hdr_len;
size_t val;
v3 = 5;
if (len <= 5)
v3 = len;
val = 0;
shift = 0;
for (i = 0; i < v3; ++i) {
... | static inline size_t scan_length_prefixed_data(size_t len, const uint8_t *data,
size_t *prefix_len_out) {
unsigned hdr_max = len < 5 ? len : 5;
unsigned hdr_len;
size_t val = 0;
unsigned i;
unsigned shift = 0;
for (i = 0; i < hdr_max; i++) {
val |= ((size_... | scan_length_prefixed_data | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
unsigned int scan_varint(unsigned int len, const uint8_t *data) {
unsigned int lena;
unsigned int i;
lena = len;
if (len > 0xA)
lena = 10;
for (i = 0; i < lena && (data[i] & 0x80u) != 0; ++i)
;
if (i == lena)
return 0;
else
return i + 1;
} | static unsigned scan_varint(unsigned len, const uint8_t *data) {
unsigned i;
if (len > 10)
len = 10;
for (i = 0; i < len; i++)
if ((data[i] & 0x80) == 0)
break;
if (i == len)
return 0;
return i + 1;
} | scan_varint | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
bool send_client_hello(int sock) {
const char *v1;
const char *v2;
long v3;
long v4;
const char *v5;
const char *v6;
const char *v7;
bool ret;
uint32_t msg_len;
uint8_t *buf;
size_t len;
size_t lena;
InterceptHello hello;
InterceptRequest msg;
unsigned long v16;
v16 = __readfsqword(0x28... | static bool send_client_hello(int sock) {
InterceptRequest msg = INTERCEPT_REQUEST__INIT;
InterceptHello hello = INTERCEPT_HELLO__INIT;
uint8_t *buf = NULL;
uint32_t msg_len;
size_t len;
bool ret = false;
debug_decl(send_client_hello, SUDO_DEBUG_EXEC);
hello.pid = getpid();
msg.type_case = INTERCEPT_... | send_client_hello | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
bool send_policy_check_req(int sock, const char *cmnd, char *const *argv,
char *const *envp) {
long v4;
const char *v5;
const char *v6;
long v7;
long v8;
const char *v9;
const char *v10;
const char *v11;
bool ret;
uint32_t msg_len;
uint8_t *buf;
size_t len;
size_t le... | static bool send_policy_check_req(int sock, const char *cmnd,
char *const argv[], char *const envp[]) {
InterceptRequest msg = INTERCEPT_REQUEST__INIT;
PolicyCheckRequest req = POLICY_CHECK_REQUEST__INIT;
char cwdbuf[PATH_MAX];
uint8_t *buf = NULL;
bool ret = false;
uint32_... | send_policy_check_req | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
bool send_req(int sock, const void *buf, size_t len) {
ssize_t nwritten;
sudo_debug_enter_v1("send_req", "./sudo_intercept_common.c", 70, 320);
do {
nwritten = send(sock, buf, len, 0);
if (nwritten == -1) {
if (*__errno_location() != 4) {
sudo_debug_exit_bool_v1("send_req", "./sudo_intercep... | static bool send_req(int sock, const void *buf, size_t len) {
const uint8_t *cp = buf;
ssize_t nwritten;
debug_decl(send_req, SUDO_DEBUG_EXEC);
do {
nwritten = send(sock, cp, len, 0);
if (nwritten == -1) {
if (errno == EINTR)
continue;
debug_return_bool(false);
}
len -= nwri... | send_req | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t sint32_pack(int32_t value, uint8_t *out) {
uint32_t v2;
v2 = zigzag32(value);
return uint32_pack(v2, out);
} | static inline size_t sint32_pack(int32_t value, uint8_t *out) {
return uint32_pack(zigzag32(value), out);
} | sint32_pack | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t sint32_size(int32_t v) {
uint32_t v1;
v1 = zigzag32(v);
return uint32_size(v1);
} | static inline size_t sint32_size(int32_t v) { return uint32_size(zigzag32(v)); } | sint32_size | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t sint64_pack(int64_t value, uint8_t *out) {
uint64_t v2;
v2 = zigzag64(value);
return uint64_pack(v2, out);
} | static inline size_t sint64_pack(int64_t value, uint8_t *out) {
return uint64_pack(zigzag64(value), out);
} | sint64_pack | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t sint64_size(int64_t v) {
uint64_t v1;
v1 = zigzag64(v);
return uint64_size(v1);
} | static inline size_t sint64_size(int64_t v) { return uint64_size(zigzag64(v)); } | sint64_size | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t sizeof_elt_in_repeated_array(ProtobufCType type) {
size_t result;
switch (type) {
case PROTOBUF_C_TYPE_INT32:
case PROTOBUF_C_TYPE_SINT32:
case PROTOBUF_C_TYPE_SFIXED32:
case PROTOBUF_C_TYPE_UINT32:
case PROTOBUF_C_TYPE_FIXED32:
case PROTOBUF_C_TYPE_FLOAT:
case PROTOBUF_C_TYPE_ENUM:
result... | static inline size_t sizeof_elt_in_repeated_array(ProtobufCType type) {
switch (type) {
case PROTOBUF_C_TYPE_SINT32:
case PROTOBUF_C_TYPE_INT32:
case PROTOBUF_C_TYPE_UINT32:
case PROTOBUF_C_TYPE_SFIXED32:
case PROTOBUF_C_TYPE_FIXED32:
case PROTOBUF_C_TYPE_FLOAT:
case PROTOBUF_C_TYPE_ENUM:
return 4;
... | sizeof_elt_in_repeated_array | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t string_pack(const char *str, uint8_t *out) {
size_t len;
size_t rv;
if (str) {
len = strlen(str);
rv = uint32_pack(len, out);
memcpy(&out[rv], str, len);
return rv + len;
} else {
*out = 0;
return 1;
}
} | static inline size_t string_pack(const char *str, uint8_t *out) {
if (str == NULL) {
out[0] = 0;
return 1;
} else {
size_t len = strlen(str);
size_t rv = uint32_pack(len, out);
memcpy(out + rv, str, len);
return rv + len;
}
} | string_pack | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
void sudo_interposer_init() {
long v0;
long v1;
int fd;
const char *errstr;
char **p;
InterceptResponse *res;
const char *fdstr;
unsigned long v7;
v7 = __readfsqword(0x28u);
res = 0;
fd = -1;
sudo_debug_enter_v1("sudo_interposer_init", "./sudo_intercept_common.c", 204,
320... | __attribute__((constructor)) static void sudo_interposer_init(void) {
InterceptResponse *res = NULL;
static bool initialized;
int fd = -1;
char **p;
debug_decl(sudo_interposer_init, SUDO_DEBUG_EXEC);
if (initialized)
debug_return;
initialized = true;
if (sudo_conf_read(NULL, SUDO_CONF_DEBUG) != -1... | sudo_interposer_init | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
char **sudo_preload_dso(char **envp, const char *dso_file, int intercept_fd) {
const char *v3;
const char *v4;
long v5;
long v6;
const char *v7;
const char *v8;
const char *v9;
int v11;
const char *v12;
const char *v13;
long v14;
long v15;
const char *v16;
const char *v17;
const char *v18;... | char **sudo_preload_dso(char *envp[], const char *dso_file, int intercept_fd) {
char *preload = NULL;
char **nenvp = NULL;
int env_len, len;
int preload_idx = -1;
int intercept_idx = -1;
bool fd_present = false;
bool dso_present = false;
#ifdef RTLD_PRELOAD_ENABLE_VAR
bool dso_enabled = false;
#else
c... | sudo_preload_dso | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
void *system_alloc(void *allocator_data, size_t size) { return malloc(size); } | static void *system_alloc(void *allocator_data, size_t size) {
return malloc(size);
} | system_alloc | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
void system_free(void *allocator_data, void *data) { free(data); } | static void system_free(void *allocator_data, void *data) { free(data); } | system_free | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t tag_pack(uint32_t id, uint8_t *out) {
if (id > 0x1FFFFFFF)
return uint64_pack(8LL * id, out);
else
return uint32_pack(8 * id, out);
} | static size_t tag_pack(uint32_t id, uint8_t *out) {
if (id < (1UL << (32 - 3)))
return uint32_pack(id << 3, out);
else
return uint64_pack(((uint64_t)id) << 3, out);
} | tag_pack | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t uint32_pack(uint32_t value, uint8_t *out) {
uint32_t valuea;
unsigned int rv;
LOBYTE(valuea) = value;
rv = 0;
if (value > 0x7F) {
rv = 1;
*out = value | 0x80;
valuea = value >> 7;
if (value >> 7 > 0x7F) {
rv = 2;
out[1] = valuea | 0x80;
valuea = value >> 14;
if ... | static inline size_t uint32_pack(uint32_t value, uint8_t *out) {
unsigned rv = 0;
if (value >= 0x80) {
out[rv++] = value | 0x80;
value >>= 7;
if (value >= 0x80) {
out[rv++] = value | 0x80;
value >>= 7;
if (value >= 0x80) {
out[rv++] = value | 0x80;
value >>= 7;
... | uint32_pack | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t uint32_size(uint32_t v) {
if (v <= 0x7F)
return 1;
if (v <= 0x3FFF)
return 2;
if (v <= 0x1FFFFF)
return 3;
if (v > 0xFFFFFFF)
return 5;
return 4;
} | static inline size_t uint32_size(uint32_t v) {
if (v < (1UL << 7)) {
return 1;
} else if (v < (1UL << 14)) {
return 2;
} else if (v < (1UL << 21)) {
return 3;
} else if (v < (1UL << 28)) {
return 4;
} else {
return 5;
}
} | uint32_size | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t uint64_pack(uint64_t value, uint8_t *out) {
unsigned int v3;
uint32_t hi;
unsigned int rv;
if (!HIDWORD(value))
return uint32_pack(value, out);
*out = value | 0x80;
out[1] = ((unsigned int)value >> 7) | 0x80;
out[2] = ((unsigned int)value >> 14) | 0x80;
out[3] = ((unsigned int)value >> 21) |... | static size_t uint64_pack(uint64_t value, uint8_t *out) {
uint32_t hi = (uint32_t)(value >> 32);
uint32_t lo = (uint32_t)value;
unsigned rv;
if (hi == 0)
return uint32_pack((uint32_t)lo, out);
out[0] = (lo) | 0x80;
out[1] = (lo >> 7) | 0x80;
out[2] = (lo >> 14) | 0x80;
out[3] = (lo >> 21) | 0x80;
... | uint64_pack | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t uint64_size(uint64_t v) {
if (!HIDWORD(v))
return uint32_size(v);
if (HIDWORD(v) <= 7)
return 5;
if (HIDWORD(v) <= 0x3FF)
return 6;
if (HIDWORD(v) <= 0x1FFFF)
return 7;
if (HIDWORD(v) <= 0xFFFFFF)
return 8;
if ((v & 0x8000000000000000LL) != 0LL)
return 10;
return 9;
} | static inline size_t uint64_size(uint64_t v) {
uint32_t upper_v = (uint32_t)(v >> 32);
if (upper_v == 0) {
return uint32_size((uint32_t)v);
} else if (upper_v < (1UL << 3)) {
return 5;
} else if (upper_v < (1UL << 10)) {
return 6;
} else if (upper_v < (1UL << 17)) {
return 7;
} else if (upp... | uint64_size | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t
unknown_field_get_packed_size(const ProtobufCMessageUnknownField *field) {
return get_tag_size(field->tag) + field->len;
} | static inline size_t
unknown_field_get_packed_size(const ProtobufCMessageUnknownField *field) {
return get_tag_size(field->tag) + field->len;
} | unknown_field_get_packed_size | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t unknown_field_pack(const ProtobufCMessageUnknownField *field,
uint8_t *out) {
size_t rv;
rv = tag_pack(field->tag, out);
*out |= field->wire_type;
memcpy(&out[rv], field->data, field->len);
return field->len + rv;
} | static size_t unknown_field_pack(const ProtobufCMessageUnknownField *field,
uint8_t *out) {
size_t rv = tag_pack(field->tag, out);
out[0] |= field->wire_type;
memcpy(out + rv, field->data, field->len);
return rv + field->len;
} | unknown_field_pack | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t unknown_field_pack_to_buffer(const ProtobufCMessageUnknownField *field,
ProtobufCBuffer *buffer) {
size_t rv;
uint8_t header[10];
unsigned long v6;
v6 = __readfsqword(0x28u);
rv = tag_pack(field->tag, header);
header[0] |= LOBYTE(field->wire_type);
buffer->appen... | static size_t
unknown_field_pack_to_buffer(const ProtobufCMessageUnknownField *field,
ProtobufCBuffer *buffer) {
uint8_t header[MAX_UINT64_ENCODED_SIZE];
size_t rv = tag_pack(field->tag, header);
header[0] |= field->wire_type;
buffer->append(buffer, rv, header);
buffer->append(bu... | unknown_field_pack_to_buffer | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t unlabeled_field_get_packed_size(const ProtobufCFieldDescriptor *field,
const void *member) {
if (field_is_zeroish(field, member))
return 0;
else
return required_field_get_packed_size(field, member);
} | static size_t
unlabeled_field_get_packed_size(const ProtobufCFieldDescriptor *field,
const void *member) {
if (field_is_zeroish(field, member))
return 0;
return required_field_get_packed_size(field, member);
} | unlabeled_field_get_packed_size | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t unlabeled_field_pack(const ProtobufCFieldDescriptor *field,
const void *member, uint8_t *out) {
if (field_is_zeroish(field, member))
return 0;
else
return required_field_pack(field, member, out);
} | static size_t unlabeled_field_pack(const ProtobufCFieldDescriptor *field,
const void *member, uint8_t *out) {
if (field_is_zeroish(field, member))
return 0;
return required_field_pack(field, member, out);
} | unlabeled_field_pack | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
size_t unlabeled_field_pack_to_buffer(const ProtobufCFieldDescriptor *field,
const void *member,
ProtobufCBuffer *buffer) {
if (field_is_zeroish(field, member))
return 0;
else
return required_field_pack_to_buffer(field, member, buff... | static size_t
unlabeled_field_pack_to_buffer(const ProtobufCFieldDescriptor *field,
const void *member, ProtobufCBuffer *buffer) {
if (field_is_zeroish(field, member))
return 0;
return required_field_pack_to_buffer(field, member, buffer);
} | unlabeled_field_pack_to_buffer | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
int32_t unzigzag32(uint32_t v) { return (v >> 1) ^ -(v & 1); } | static inline int32_t unzigzag32(uint32_t v) {
return (int32_t)((v >> 1) ^ (~(v & 1) + 1));
} | unzigzag32 | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
int64_t unzigzag64(uint64_t v) { return (v >> 1) ^ -(long)(v & 1); } | static inline int64_t unzigzag64(uint64_t v) {
return (int64_t)((v >> 1) ^ (~(v & 1) + 1));
} | unzigzag64 | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
uint32_t zigzag32(int32_t v) { return (2 * v) ^ (v >> 31); } | static inline uint32_t zigzag32(int32_t v) {
return ((uint32_t)(v) << 1) ^ (uint32_t)(v >> 31);
} | zigzag32 | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
uint64_t zigzag64(int64_t v) { return (2 * v) ^ (v >> 63); } | static inline uint64_t zigzag64(int64_t v) {
return ((uint64_t)(v) << 1) ^ (uint64_t)(v >> 63);
} | zigzag64 | sudo-1.9.10-r1 | app-admin | O0/app-admin/sudo-1.9.10-r1/sudo_intercept.so | ida | O0 |
int iterateBuffer(guint64 entriesInBuffer, GString **input,
guint64 *nextLogEntry, unsigned char *mainKey,
unsigned char *keyZero, guint keyNumber, GString **output,
guint64 *numberOfLogEntries, unsigned char *cmac_tag,
GHashTable *tab) {
GString... | int iterateBuffer(guint64 entriesInBuffer, GString **input,
guint64 *nextLogEntry, unsigned char *mainKey,
unsigned char *keyZero, guint keyNumber, GString **output,
guint64 *numberOfLogEntries, unsigned char *cmac_tag,
GHashTable *tab) {
int re... | iterateBuffer | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/slogkey | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
const char *help;
long v5;
long v6;
long v7;
long v8;
long v9;
long v10;
long v11;
long v12;
long v13;
long v14;
long v15;
long v16;
char **argva;
int argca;
gboolean ok;
int ret;
int success;
int index;
int __local_copy_... | int main(int argc, char **argv) {
GError *error = NULL;
GOptionContext *context =
g_option_context_new("- secure logging key management\n\n "
"Master key generation:\tslogkey -m MASTERKEY\n "
"Host key derivation:\t\tslogkey -d MASTERKEY "
... | main | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/slogkey | ida | O0 |
void init() { ulogd_register_plugin(&pwsniff_plugin); } | void __attribute__((constructor)) init(void) {
ulogd_register_plugin(&pwsniff_plugin);
} | init | ulogd-2.0.7-r3 | app-admin | O0/app-admin/ulogd-2.0.7-r3/ulogd_filter_PWSNIFF.so | ida | O0 |
int interp_pwsniff(ulogd_pluginstance *pi) {
int len;
int pw_len;
int cont;
unsigned int i;
unsigned int tcplen;
unsigned char *ptr;
unsigned char *begp;
unsigned char *pw_begp;
ulogd_key *ret;
iphdr *iph;
tcphdr *tcph;
char *ptr_0;
char *ptr_1;
unsigned char *endp;
unsigned char *pw_endp;... | static int interp_pwsniff(struct ulogd_pluginstance *pi) {
struct ulogd_key *ret = pi->output.keys;
struct iphdr *iph;
void *protoh;
struct tcphdr *tcph;
unsigned int tcplen;
unsigned char *ptr, *begp, *pw_begp, *endp, *pw_endp;
int len, pw_len, cont = 0;
unsigned int i;
if (!IS_VALID(pi->input.keys[... | interp_pwsniff | ulogd-2.0.7-r3 | app-admin | O0/app-admin/ulogd-2.0.7-r3/ulogd_filter_PWSNIFF.so | ida | O0 |
char *absolute_path(const char *path, int allow_nonexistent) {
int *v2;
char *v3;
const char *src;
char buf[4104];
unsigned long v7;
v7 = __readfsqword(0x28u);
src = realpath(path, buf);
if (!src) {
if (allow_nonexistent) {
src = path;
} else {
v2 = __errno_location();
v3 = st... | static char *absolute_path(const char *path, int allow_nonexistent) {
char buf[PATH_MAX + 1];
const char *src;
src = realpath(path, buf);
if (src == NULL) {
if (allow_nonexistent != 0)
src = path;
else
message(LOG_FATAL, "cannot resolve %s: %s\n", path, strerror(errno));
}
return xstrdu... | absolute_path | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
void bind_mount_init() {
char *__value;
init_mount_entries();
_obstack_begin(&bind_mount_paths_obstack, 0, 0,
(void *(*)(long))obstack_chunk_alloc, (void (*)(void *))&free);
bind_mount_paths_obstack.alignment_mask = 0;
if (bind_mount_paths_obstack.chunk_limit -
bind_mount_paths_obs... | void bind_mount_init(void) {
init_mount_entries();
obstack_init(&bind_mount_paths_obstack);
obstack_alignment_mask(&bind_mount_paths_obstack) = 0;
bind_mount_paths_mark = obstack_alloc(&bind_mount_paths_obstack, 0);
mountinfo_fd = open(MOUNTINFO_PATH, O_RDONLY);
if (mountinfo_fd == -1)
return;
rebuild... | bind_mount_init | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
int check_fuser(const char *filename) {
int ret;
int pid;
char dir[4104];
unsigned long v5;
v5 = __readfsqword(0x28u);
if (fuser_exists_4 == -1)
fuser_exists_4 = access("/bin/fuser", 5) == 0;
if (!fuser_exists_4)
return 0;
snprintf(dir, 0x1002u, "./%s", filename);
pid = fork();
if (!pid) {
... | static int check_fuser(const char *filename) {
static int fuser_exists = -1;
static char *const empty_environ[] = {NULL};
int ret;
char dir[2 + PATH_MAX];
int pid;
if (fuser_exists == -1)
fuser_exists = access(FUSER, R_OK | X_OK) == 0;
if (!fuser_exists)
return 0;
snprintf(dir, sizeof(dir), "... | check_fuser | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
int cleanupDirectory(const char *fulldirname, const char *reldirname,
dev_t st_dev, ino_t st_ino) {
int *v5;
char *v6;
int *v7;
char *v8;
int *v9;
char *v10;
int *v11;
char *v12;
size_t v13;
size_t v14;
char *v15;
char *v16;
size_t v17;
size_t v18;
int *v19;
char *v2... | static int cleanupDirectory(const char *fulldirname, const char *reldirname,
dev_t st_dev, ino_t st_ino) {
DIR *dir;
struct dirent *ent;
struct stat sb, here;
time_t *significant_time;
struct utimbuf utb;
int res;
message(LOG_DEBUG, "cleaning up directory %s\n", fulldirname);
... | cleanupDirectory | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
int cmp_id_mount_entry(const void *xa, const void *xb) {
return cmp_ints(*(_DWORD *)xa, **(_DWORD **)xb);
} | static int cmp_id_mount_entry(const void *xa, const void *xb) {
const int *a;
void *const *b;
a = xa;
b = xb;
return cmp_ints(*a, ((struct mount *)*b)->id);
} | cmp_id_mount_entry | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
int cmp_ints(int a, int b) {
if (a > b)
return 1;
if (a >= b)
return 0;
return -1;
} | static int cmp_ints(int a, int b) {
if (a > b)
return 1;
if (a < b)
return -1;
return 0;
} | cmp_ints | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
int cmp_mount_entry_pointers(const void *xa, const void *xb) {
return cmp_ints(**(_DWORD **)xa, **(_DWORD **)xb);
} | static int cmp_mount_entry_pointers(const void *xa, const void *xb) {
void *const *a, *const *b;
a = xa;
b = xb;
return cmp_ints(((struct mount *)*a)->id, ((struct mount *)*b)->id);
} | cmp_mount_entry_pointers | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
int cmp_string_pointer(const void *xa, const void *xb) {
return strcmp((const char *)xa, *(const char **)xb);
} | static int cmp_string_pointer(const void *xa, const void *xb) {
const char *a;
char *const *b;
a = xa;
b = xb;
return strcmp(a, *b);
} | cmp_string_pointer | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
int cmp_string_pointers(const void *xa, const void *xb) {
return strcmp(*(const char **)xa, *(const char **)xb);
} | static int cmp_string_pointers(const void *xa, const void *xb) {
char *const *a, *const *b;
a = xa;
b = xb;
return strcmp(*a, *b);
} | cmp_string_pointers | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
void compute_kill_times(int grace_minutes) {
int *v1;
char *v2;
time_t boot_time;
timespec real_clock;
timespec boot_clock;
unsigned long v6;
v6 = __readfsqword(0x28u);
message(2, "grace period is %d seconds\n", 60 * grace_minutes);
kill_time = time(0) - 60 * grace_minutes;
if ((config_flags & 2) !... | static void compute_kill_times(int grace_minutes) {
int grace_seconds;
grace_seconds = grace_minutes * 60;
message(LOG_DEBUG, "grace period is %d seconds\n", grace_seconds);
kill_time = time(NULL) - grace_seconds;
if ((config_flags & FLAG_ALLFILES) != 0)
socket_kill_time = kill_time;
else {
#if defin... | compute_kill_times | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
void init_mount_entries() {
char *__value;
char *__value_0;
char *__value_1;
_obstack_begin(&mount_data_obstack, 0, 0,
(void *(*)(long))obstack_chunk_alloc, (void (*)(void *))&free);
if (mount_data_obstack.chunk_limit - mount_data_obstack.next_free < 0)
_obstack_newchunk(&mount_data_obst... | static void init_mount_entries(void) {
obstack_init(&mount_data_obstack);
mount_data_mark = obstack_alloc(&mount_data_obstack, 0);
obstack_init(&mount_string_obstack);
obstack_alignment_mask(&mount_string_obstack) = 0;
mount_string_mark = obstack_alloc(&mount_string_obstack, 0);
obstack_init(&mount_list_obs... | init_mount_entries | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
bool is_bind_mount(const char *path) {
pollfd pfd;
unsigned long v3;
v3 = __readfsqword(0x28u);
pfd.fd = mountinfo_fd;
pfd.events = 2;
if (poll(&pfd, 1u, 0) < 0)
return 0;
if ((pfd.revents & 2) != 0)
rebuild_bind_mount_paths();
return bsearch(path, bind_mount_paths.entries, bind_mount_paths.len... | bool is_bind_mount(const char *path) {
struct pollfd pfd;
pfd.fd = mountinfo_fd;
pfd.events = POLLPRI;
if (poll(&pfd, 1, 0) < 0)
return false;
if ((pfd.revents & POLLPRI) != 0) {
rebuild_bind_mount_paths();
}
return bsearch(path, bind_mount_paths.entries, bind_mount_paths.len,
si... | is_bind_mount | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
int is_mount_point(const char *path) {
int ret;
FILE *fp;
struct mntent *mnt;
fp = setmntent("/etc/mtab", "r");
if (fp) {
ret = 0;
while (1) {
mnt = getmntent(fp);
if (!mnt)
break;
if (!strcmp(mnt->mnt_dir, path)) {
ret = 1;
break;
}
}
endmntent... | static int is_mount_point(const char *path) {
FILE *fp;
struct mntent *mnt;
int ret;
if ((fp = setmntent(_PATH_MOUNTED, "r")) == NULL) {
message(LOG_ERROR, "failed to open %s for reading\n", _PATH_MOUNTED);
return -1;
}
ret = 0;
while ((mnt = getmntent(fp)) != NULL) {
if (strcmp(mnt->mnt_dir... | is_mount_point | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
int v3;
int v4;
int v5;
int v6;
int *v7;
char *v8;
int *v9;
char *v10;
int *v11;
char *v12;
char units;
int long_index;
int arg;
int orig_dir;
char *p;
exclusion *e;
char *path;
char *p_0;
excluded_pattern *p_1;
excluded_... | int main(int argc, char **argv) {
static const struct option options[] = {
{"all", 0, 0, 'a'},
{"nodirs", 0, 0, 'd'},
{"nosymlinks", 0, 0, 'l'},
{"force", 0, 0, 'f'},
{"mtime", 0, 0, 'm'},
{"atime", 0, 0, 'u'},
{"ctime", 0, 0, 'c'},
{"dirmtime", 0, 0, 'M'},
{"quie... | main | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
time_t *max(time_t *x, time_t *y) {
if (!x)
return y;
if (!y)
return x;
if (*x < *y)
return y;
return x;
} | static time_t *max(time_t *x, time_t *y) {
if (x == 0)
return y;
if (y == 0)
return x;
return (*x >= *y) ? x : y;
} | max | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
void message(int level, const char *format, ...) {
long v2;
long v3;
long v4;
long v5;
FILE *where;
va_list args;
unsigned long v8;
long v9;
long v10;
long v11;
long v12;
va_start(args, format);
v2 = va_arg(args, _QWORD);
v3 = va_arg(args, _QWORD);
v4 = va_arg(args, _QWORD);
v5 = va_arg... | static void attribute__((format(printf, 2, 3)))
message(int level, const char *format, ...) {
va_list args;
FILE *where = stdout;
if (level >= logLevel) {
if (level > LOG_NORMAL) {
where = stderr;
fprintf(where, "error: ");
}
va_start(args, format);
vfprintf(where, format, args);... | message | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
_obstack_chunk *obstack_chunk_alloc(long size) {
return (_obstack_chunk *)xmalloc(size);
} | struct _obstack_chunk *obstack_chunk_alloc(long size) { return xmalloc(size); } | obstack_chunk_alloc | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
int parse_mount_string(char **dest, char **string) {
int v2;
char *next_free;
char *v4;
char *v5;
char c;
unsigned int v;
char *src;
char *__value;
char *__value_0;
for (src = *string; *src == 32 || *src == 9; ++src)
;
if (*src) {
while (1) {
c = *src;
v2 = *src;
if (v2 ... | static int parse_mount_string(char **dest, char **string) {
char *src, *ret;
src = *string;
while (*src == ' ' || *src == '\t')
src++;
if (*src == 0)
goto error;
for (;;) {
char c;
c = *src;
switch (c) {
case 0:
case ' ':
case '\t':
goto done;
case '\\':
if (... | parse_mount_string | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
void printCopyright() {
fwrite("tmpwatch 2.11 - (C) 1997-2009 Red Hat, Inc. All rights reserved.\n"
"This program may be freely redistributed under the terms of the\n"
"GNU General Public License version 2.\n",
1u, 0xA7u, stderr);
} | static void printCopyright(void) {
fprintf(stderr,
"tmpwatch " PACKAGE_VERSION " - (C) 1997-2009 Red Hat, Inc. "
"All rights reserved.\n"
"This program may be freely redistributed under the terms of the\n"
"GNU General Public License version 2.\n");
} | printCopyright | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
int read_mount_entries() {
FILE *f;
char *__value;
char *__value_0;
mount *me;
char *__value_1;
f = fopen("/proc/self/mountinfo", "r");
if (!f)
return -1;
if (mount_data_mark <= mount_data_obstack.chunk ||
mount_data_mark >= mount_data_obstack.chunk_limit) {
obstack_free(&mount_data_obsta... | static int read_mount_entries(void) {
FILE *f;
struct mount *me;
f = fopen(MOUNTINFO_PATH, "r");
if (f == NULL)
return -1;
obstack_free(&mount_data_obstack, mount_data_mark);
mount_data_mark = obstack_alloc(&mount_data_obstack, 0);
obstack_free(&mount_string_obstack, mount_string_mark);
mount_strin... | read_mount_entries | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
mount *read_mount_entry(FILE *f) {
bool separator_found;
char *line;
size_t offset;
char *option;
obstack *__h;
obstack *__o;
obstack *__o1;
void *__value;
mount *me;
obstack *__o_0;
void *__obj;
obstack *__o_1;
void *__obj_0;
obstack *__o_2;
void *__obj_1;
unsigned long v17;
v17 = __... | static struct mount *read_mount_entry(FILE *f) {
struct mount *me;
char *line;
size_t offset;
bool separator_found;
line = read_mount_line(f);
if (line == NULL)
return NULL;
me = obstack_alloc(&mount_data_obstack, sizeof(*me));
if (sscanf(line, "%d %d %u:%u%zn", &me->id, &me->parent_id, &me->dev_ma... | read_mount_entry | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
char *read_mount_line(FILE *f) {
char *next_free;
int __len;
size_t chunk_length;
char *__value_0;
void *__value;
char buf[2056];
unsigned long v8;
v8 = __readfsqword(0x28u);
while (fgets(buf, 2048, f)) {
chunk_length = strlen(buf);
if (chunk_length && buf[chunk_length - 1] == 10) {
__l... | static char *read_mount_line(FILE *f) {
char *line;
for (;;) {
char buf[LINE_MAX];
size_t chunk_length;
if (fgets(buf, sizeof(buf), f) == NULL) {
if (feof(f))
break;
goto error;
}
chunk_length = strlen(buf);
if (chunk_length > 0 && buf[chunk_length - 1] == '\n') {
... | read_mount_line | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
void rebuild_bind_mount_paths() {
int __len_0;
size_t i;
char *__value;
mount *me;
void **pp;
mount *parent;
size_t p_mount_len;
size_t p_root_len;
char *__value_0;
if (!read_mount_entries()) {
if (bind_mount_paths_mark <= bind_mount_paths_obstack.chunk ||
bind_mount_paths_mark >= bind_... | static void rebuild_bind_mount_paths(void) {
size_t i;
if (read_mount_entries() != 0)
return;
obstack_free(&bind_mount_paths_obstack, bind_mount_paths_mark);
bind_mount_paths_mark = obstack_alloc(&bind_mount_paths_obstack, 0);
bind_mount_paths.len = 0;
qsort(mount_entries, num_mount_entries, sizeof(*m... | rebuild_bind_mount_paths | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
int safe_chdir(const char *fulldirname, const char *reldirname, dev_t st_dev,
ino_t st_ino) {
int *v5;
char *v6;
int *v7;
char *v8;
int *v9;
char *v10;
int *v11;
char *v12;
int *v13;
char *v14;
stat sb1;
stat sb2;
unsigned long v19;
v19 = __readfsqword(0x28u);
if (lstat(rel... | static int safe_chdir(const char *fulldirname, const char *reldirname,
dev_t st_dev, ino_t st_ino) {
struct stat sb1, sb2;
if (lstat(reldirname, &sb1)) {
if (errno == ENOENT)
return 2;
message(LOG_ERROR, "lstat() of directory %s failed: %s\n", fulldirname,
strerror(e... | safe_chdir | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
void set_program_name(const char *argv0) {
const char *v1;
const char *argv0a;
char *slash;
const char *base;
argv0a = argv0;
slash = strrchr(argv0, 47);
if (slash)
v1 = slash + 1;
else
v1 = argv0;
base = v1;
if (v1 - argv0 > 6 && !memcmp(v1 - 7, "/.libs/", 7u))
argv0a = base;
if (!st... | void set_program_name(const char *argv0) {
const char *slash;
const char *base;
slash = strrchr(argv0, '/');
base = (slash != NULL ? slash + 1 : argv0);
if (base - argv0 >= 7 && memcmp(base - 7, "/.libs/", 7) == 0)
argv0 = base;
if (strncmp(base, "lt-", 3) == 0)
argv0 = base + 3;
program_name = ... | set_program_name | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
void string_list_append(string_list *list, char *string) {
if (list->allocated == list->len)
list->entries = (char **)x2nrealloc(list->entries, &list->allocated, 8u);
list->entries[list->len++] = string;
} | static void string_list_append(struct string_list *list, char *string) {
if (list->allocated == list->len)
list->entries =
x2nrealloc(list->entries, &list->allocated, sizeof(*list->entries));
list->entries[list->len] = string;
list->len++;
} | string_list_append | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
void usage() {
printCopyright();
fputc(10, stderr);
fprintf(stderr,
"tmpwatch [-u|-m|-c] [-MUXadfqtvx] [--verbose] [--force] [--all] "
"[--nodirs] [--nosymlinks] [--test] [--quiet] [--atim"
"e|--mtime|--ctime] [--dirmtime] [--exclude <path>] [--exclude-user "
"<user>] [--ex... | static void attribute__((noreturn)) usage(void) {
static const char msg[] =
"tmpwatch [-u|-m|-c] [-MUXadfqtvx] [--verbose] "
"[--force] [--all] [--nodirs] [--nosymlinks] [--test] [--quiet] "
"[--atime|--mtime|--ctime] [--dirmtime] [--exclude <path>] "
"[--exclude-user <user>] [--exclude-patter... | usage | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
void *x2realloc(void *p, size_t *pn) { return x2nrealloc(p, pn, 1u); } | void *x2realloc(void *p, size_t *pn) { return x2nrealloc(p, pn, 1); } | x2realloc | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
void xalloc_die() {
error(exit_failure, 0, "%s", "memory exhausted");
abort();
} | void xalloc_die(void) {
error(exit_failure, 0, "%s", _("memory exhausted"));
abort();
} | xalloc_die | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
void *xcalloc(size_t n, size_t s) {
void *p;
p = calloc(n, s);
if (!p)
xalloc_die();
return p;
} | void *xcalloc(size_t n, size_t s) {
void *p;
if ((!HAVE_GNU_CALLOC && xalloc_oversized(n, s)) ||
(!(p = calloc(n, s)) && (HAVE_GNU_CALLOC || n != 0)))
xalloc_die();
return p;
} | xcalloc | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
void *xmalloc(size_t n) {
void *p;
p = malloc(n);
if (!p && n)
xalloc_die();
return p;
} | void *xmalloc(size_t n) {
void *p = malloc(n);
if (!p && n != 0)
xalloc_die();
return p;
} | xmalloc | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
void *xmemdup(const void *p, size_t s) {
void *v2;
v2 = xmalloc(s);
return memcpy(v2, p, s);
} | void *xmemdup(void const *p, size_t s) { return memcpy(xmalloc(s), p, s); } | xmemdup | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
void *xrealloc(void *p, size_t n) {
void *pa;
pa = realloc(p, n);
if (!pa && n)
xalloc_die();
return pa;
} | void *xrealloc(void *p, size_t n) {
p = realloc(p, n);
if (!p && n != 0)
xalloc_die();
return p;
} | xrealloc | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
char *xstrdup(const char *string) {
size_t v1;
v1 = strlen(string) + 1;
return (char *)xmemdup(string, v1);
} | char *xstrdup(char const *string) {
return xmemdup(string, strlen(string) + 1);
} | xstrdup | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
void *xzalloc(size_t s) {
void *v1;
v1 = xmalloc(s);
return memset(v1, 0, s);
} | void *xzalloc(size_t s) { return memset(xmalloc(s), 0, s); } | xzalloc | tmpwatch-2.11-r3 | app-admin | O0/app-admin/tmpwatch-2.11-r3/tmpwatch | ida | O0 |
void init() { ulogd_register_plugin(&ip2str_pluging); } | void init(void) { ulogd_register_plugin(&ip2str_pluging); } | init | ulogd-2.0.7-r3 | app-admin | O0/app-admin/ulogd-2.0.7-r3/ulogd_filter_IP2STR.so | ida | O0 |
int interp_ip2str(ulogd_pluginstance *pi) {
int i;
int fret;
ulogd_key *ret;
ulogd_key *inp;
ret = pi->output.keys;
inp = pi->input.keys;
for (i = 2; i <= 9; ++i) {
if (inp[i].u.value.ui64 && (*(_WORD *)(inp[i].u.value.ui64 + 6) & 1) != 0) {
fret = ip2str(inp, i, i - 2);
if (fret)
... | static int interp_ip2str(struct ulogd_pluginstance *pi) {
struct ulogd_key *ret = pi->output.keys;
struct ulogd_key *inp = pi->input.keys;
int i;
int fret;
for (i = START_KEY; i <= MAX_KEY; i++) {
if (pp_is_valid(inp, i)) {
fret = ip2str(inp, i, i - START_KEY);
if (fret != ULOGD_IRET_OK)
... | interp_ip2str | ulogd-2.0.7-r3 | app-admin | O0/app-admin/ulogd-2.0.7-r3/ulogd_filter_IP2STR.so | ida | O0 |
int ip2str(ulogd_key *inp, int index, int oindex) {
uint16_t u16;
void *u128;
uint8_t convfamily;
uint32_t ip_0;
unsigned long v9;
v9 = __readfsqword(0x28u);
convfamily = ikey_get_u8(inp);
if (convfamily == 7) {
if (!inp[1].u.value.ui64 ||
(*(_WORD *)(inp[1].u.value.ui64 + 6) & 1) == 0) {
... | static int ip2str(struct ulogd_key *inp, int index, int oindex) {
char family = ikey_get_u8(&inp[KEY_OOB_FAMILY]);
char convfamily = family;
if (family == AF_BRIDGE) {
if (!pp_is_valid(inp, KEY_OOB_PROTOCOL)) {
ulogd_log(ULOGD_NOTICE, "No protocol inside AF_BRIDGE packet\n");
return ULOGD_IRET_ER... | ip2str | ulogd-2.0.7-r3 | app-admin | O0/app-admin/ulogd-2.0.7-r3/ulogd_filter_IP2STR.so | ida | O0 |
void init() { ulogd_register_plugin(&printflow_plugin); } | void init(void) { ulogd_register_plugin(&printflow_plugin); } | init | ulogd-2.0.7-r3 | app-admin | O0/app-admin/ulogd-2.0.7-r3/ulogd_filter_PRINTFLOW.so | ida | O0 |
int printflow_interp(ulogd_pluginstance *upi) {
ulogd_key *ret;
ret = upi->output.keys;
printflow_print(upi->input.keys, buf_0);
okey_set_ptr(ret, buf_0);
return 0;
} | static int printflow_interp(struct ulogd_pluginstance *upi) {
struct ulogd_key *inp = upi->input.keys;
struct ulogd_key *ret = upi->output.keys;
static char buf[4096];
printflow_print(inp, buf);
okey_set_ptr(&ret[0], buf);
return ULOGD_IRET_OK;
} | printflow_interp | ulogd-2.0.7-r3 | app-admin | O0/app-admin/ulogd-2.0.7-r3/ulogd_filter_PRINTFLOW.so | ida | O0 |
int printflow_print(ulogd_key *res, char *buf) {
uint32_t u32;
int v3;
const char *ptr;
const char *v5;
uint8_t u8;
uint16_t v7;
uint16_t v8;
uint16_t u16;
uint8_t v10;
uint8_t v11;
uint8_t v12;
uint64_t u64;
uint64_t v14;
const char *v15;
const char *v16;
uint8_t v17;
uint16_t v18;
... | int printflow_print(struct ulogd_key *res, char *buf) {
char *buf_cur = buf;
if (pp_is_valid(res, PRINTFLOW_EVENT_TYPE)) {
switch (ikey_get_u32(&res[PRINTFLOW_EVENT_TYPE])) {
case 1:
buf_cur += sprintf(buf_cur, "[NEW] ");
break;
case 2:
buf_cur += sprintf(buf_cur, "[UPDATE] ");
... | printflow_print | ulogd-2.0.7-r3 | app-admin | O0/app-admin/ulogd-2.0.7-r3/ulogd_filter_PRINTFLOW.so | ida | O0 |
int iterateBuffer(guint64 entriesInBuffer, GString **input,
guint64 *nextLogEntry, unsigned char *mainKey,
unsigned char *keyZero, guint keyNumber, GString **output,
guint64 *numberOfLogEntries, unsigned char *cmac_tag,
GHashTable *tab) {
GString... | int iterateBuffer(guint64 entriesInBuffer, GString **input,
guint64 *nextLogEntry, unsigned char *mainKey,
unsigned char *keyZero, guint keyNumber, GString **output,
guint64 *numberOfLogEntries, unsigned char *cmac_tag,
GHashTable *tab) {
int re... | iterateBuffer | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/slogverify | ida | O0 |
int iterativeMode(char *prevKey, char *prevMAC, char *curMAC, char *inputlog,
char *outputlog, int bufsize) {
long v6;
long v7;
long v8;
long v9;
long v11;
long v12;
long v13;
long v14;
long v15;
long v16;
long v17;
long v18;
long v19;
long v20;
long v21;
long v22;
lo... | int iterativeMode(char *prevKey, char *prevMAC, char *curMAC, char *inputlog,
char *outputlog, int bufsize) {
char previousKey[KEY_LENGTH];
guint64 previousKeyCounter = 0;
msg_info("[SLOG] INFO: Reading previous key file",
evt_tag_str("name", prevKey));
int ret = readKey(previousKe... | iterativeMode | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/slogverify | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.