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 |
|---|---|---|---|---|---|---|---|
long yytnamerr(char *yyres, const char *yystr) {
int v2;
long yyn;
char *yyp;
if (*yystr != 34) {
LABEL_17:
if (yyres)
return stpcpy(yyres, yystr) - yyres;
else
return strlen(yystr);
}
yyn = 0;
yyp = (char *)yystr;
while (1) {
v2 = *++yyp;
if (v2 != 92)
break;
if... | static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr) {
if (*yystr == '"') {
YYPTRDIFF_T yyn = 0;
char const *yyp = yystr;
for (;;)
switch (*++yyp) {
case '\'':
case ',':
goto do_not_strip_quotes;
case '\\':
if (*++yyp != '\\')
goto do_not_strip_qu... | yytnamerr | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libafuser.so | ida | O0 |
void MD5Final(unsigned char *digest, MD5Context *ctx) {
unsigned char *v2;
unsigned int counta;
unsigned int count;
unsigned char *p;
counta = (ctx->bits[0] >> 3) & 0x3F;
v2 = &ctx->in[(ctx->bits[0] >> 3) & 0x3F];
p = v2 + 1;
*v2 = 0x80;
count = 63 - counta;
if (count > 7) {
memset(p, 0, count ... | void MD5Final(unsigned char digest[16], struct MD5Context *ctx) {
unsigned count;
unsigned char *p;
count = (ctx->bits[0] >> 3) & 0x3F;
p = ctx->in + count;
*p++ = 0x80;
count = 64 - 1 - count;
if (count < 8) {
memset(p, 0, count);
MD5Transform(ctx->buf, ctx->in);
memset(ctx->in, 0, 56);... | MD5Final | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void MD5Init(MD5Context *ctx) {
ctx->buf[0] = 1732584193;
ctx->buf[1] = 4023233417LL;
ctx->buf[2] = 2562383102LL;
ctx->buf[3] = 271733878;
ctx->bits[0] = 0;
ctx->bits[1] = 0;
} | void MD5Init(struct MD5Context *ctx) {
ctx->buf[0] = 0x67452301;
ctx->buf[1] = 0xefcdab89;
ctx->buf[2] = 0x98badcfe;
ctx->buf[3] = 0x10325476;
ctx->bits[0] = 0;
ctx->bits[1] = 0;
} | MD5Init | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void MD5Transform(uint32 *buf, const unsigned char *inraw) {
uint32 v2;
uint32 v3;
uint32 v4;
uint32 v5;
unsigned long v6;
uint32 v7;
unsigned long v8;
uint32 v9;
unsigned long v10;
uint32 v11;
unsigned long v12;
uint32 v13;
unsigned long v14;
uint32 v15;
unsigned long v16;
uint32 v17;
... | void MD5Transform(uint32 buf[4], const unsigned char inraw[64]) {
register uint32 a, b, c, d;
uint32 in[16];
int i;
for (i = 0; i < 16; ++i)
in[i] = getu32(inraw + 4 * i);
a = buf[0];
b = buf[1];
c = buf[2];
d = buf[3];
MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7);
MD5STEP(F1, d, a, b, c, i... | MD5Transform | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void MD5Update(MD5Context *ctx, const unsigned char *buf, unsigned int len) {
unsigned int lena;
const unsigned char *bufa;
uint32 t;
uint32 ta;
uint32 tb;
unsigned char *p;
bufa = buf;
lena = len;
t = ctx->bits[0];
ctx->bits[0] = 8 * len + (unsigned int)t;
if (t > ctx->bits[0])
++ctx->bits[1... | void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len) {
uint32 t;
t = ctx->bits[0];
if ((ctx->bits[0] = (t + ((uint32)len << 3)) & 0xffffffff) < t)
ctx->bits[1]++;
ctx->bits[1] += len >> 29;
t = (t >> 3) & 0x3f;
if (t) {
unsigned char *p = ctx->in + t;
t = 64 - t;
... | MD5Update | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
int add_file_entry(char *path, stat dirent_stat, char *md5) {
u_int flags;
file_entry *p;
p = get_fe_bypath(path);
if (p->path) {
p->flags = 0;
if (p->uid != dirent_stat.st_uid) {
p->old_uid = p->uid;
p->uid = dirent_stat.st_uid;
p->flags |= 0x40u;
}
if (p->gid != dirent_stat.... | int add_file_entry(char *path, struct stat dirent_stat, char *md5) {
struct file_entry *p;
p = get_fe_bypath(path);
if (p->path == NULL) {
p->path = strdup(path);
p->uid = dirent_stat.st_uid;
p->gid = dirent_stat.st_gid;
p->mode = dirent_stat.st_mode;
p->inode = dirent_stat.st_ino;
p->ol... | add_file_entry | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void check_add_rem(FILE *mail_file) {
int v1;
int v2;
const char *v3;
char init;
file_entry *p;
char *perms;
char *space1;
char *space2;
p = global_log;
fwrite("Checking for any additions or removals:\n", 1u, 0x28u, mail_file);
while (p) {
init = 0;
if ((p->flags & 2) != 0) {
init =... | static void check_add_rem(FILE *mail_file) {
struct file_entry *p = global_log;
char init;
fprintf(mail_file, "Checking for any additions or removals:\n");
while (p != NULL) {
init = 0;
if (p->flags & FE_NEW)
init = '+';
else if (p->flags & FE_OLD)
init = '-';
if (init) {
cha... | check_add_rem | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void check_attr(FILE *mail_file) {
char v1;
char v2;
int v3;
int v4;
const char *v5;
char ino;
char md5;
file_entry *p;
char *perms;
char *space1;
char *space2;
char old_pmode[7];
unsigned long v13;
v13 = __readfsqword(0x28u);
p = global_log;
fwrite("Checking for changed attributes or s... | static void check_attr(FILE *mail_file) {
struct file_entry *p = global_log;
char ino, md5;
fprintf(mail_file, "Checking for changed attributes or sums/inodes:\n");
while (p != NULL) {
if (p->flags & FE_CHANGEDATTR) {
char old_pmode[7], *perms, *space1, *space2;
if (p->mode & S_IFREG)
... | check_attr | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void check_entry(dirent *dir_entry, char *dir) {
const char *v2;
int i;
char *p;
FILE *fp;
stat dirent_stat;
unsigned char digest[32];
char digest_hex[48];
char buf[4104];
unsigned long v10;
v10 = __readfsqword(0x28u);
if (!dir_entry ||
strcmp(dir_entry->d_name, "..") && strcmp(dir_entry->d... | static __inline__ void check_entry(struct dirent *dir_entry, char *dir) {
char buf[PATH_MAX];
struct stat dirent_stat;
if (dir_entry == NULL ||
(strcmp(dir_entry->d_name, "..") && strcmp(dir_entry->d_name, "."))) {
if (dir_entry != NULL)
snprintf(buf, sizeof(buf), "%s%s%s", dir, strlen(dir) == 1 ... | check_entry | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void check_forbidden(FILE *mail_file) {
mode_t mode;
int v2;
int v3;
const char *v4;
char init;
file_entry *p;
char *perms;
char *space1;
char *space2;
p = global_log;
fwrite("Checking for forbidden s[ug]id items:\n", 1u, 0x26u, mail_file);
while (p) {
if (check_paths(p->path, config_option... | static void check_forbidden(FILE *mail_file) {
struct file_entry *p = global_log;
char init;
fprintf(mail_file, "Checking for forbidden s[ug]id items:\n");
while (p != NULL) {
if (check_paths(p->path, config_options.forbidden_paths)) {
char *perms, *space1, *space2;
init = ' ';
perms = ... | check_forbidden | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
int check_paths(char *dir, char *paths) {
size_t v2;
_BOOL4 matched;
char *p;
char *tok;
char *e;
unsigned long v8;
v8 = __readfsqword(0x28u);
matched = 0;
e = strdup(paths);
for (tok = strtok_r(e, " ", &p); tok && !matched;
tok = strtok_r(0, " ", &p)) {
v2 = strlen(tok);
matched = s... | int check_paths(char *dir, char *paths) {
char *tok, *e, *p;
int matched = 0;
e = strdup(paths);
tok = strtok_r(e, " ", &p);
while (tok != NULL && !matched) {
if (!strncmp(tok, dir, strlen(tok) - 1))
matched = 1;
tok = strtok_r(NULL, " ", &p);
}
free(e);
return matched;
} | check_paths | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void check_u_g(FILE *mail_file) {
int v1;
int v2;
const char *v3;
file_entry *p;
struct passwd *pw;
struct group *gr;
char *perms;
char *space1;
char *space2;
p = global_log;
fwrite("Checking for no user/group matches:\n", 1u, 0x24u, mail_file);
while (p) {
pw = getpwuid(p->uid);
gr = g... | static void check_u_g(FILE *mail_file) {
struct file_entry *p = global_log;
fprintf(mail_file, "Checking for no user/group matches:\n");
while (p != NULL) {
struct passwd *pw = getpwuid(p->uid);
struct group *gr = getgrgid(p->gid);
if ((pw == NULL || gr == NULL) && !(p->flags & FE_OLD)) {
cha... | check_u_g | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void compare_output() {
size_t v0;
int v1;
const char *tmp_dir;
char *tmp_file;
tmp_dir = getenv("TMPDIR");
if (!tmp_dir)
tmp_dir = "/tmp";
v0 = strlen(tmp_dir);
tmp_file = (char *)malloc(v0 + 13);
if (!tmp_file) {
fwrite("E: could not malloc() in compare_output().\n", 1u, 0x2Bu, stderr);
... | void compare_output(void) {
char *tmp_dir, *tmp_file;
tmp_dir = getenv("TMPDIR");
if (tmp_dir == NULL)
tmp_dir = "/tmp";
tmp_file = malloc(strlen(tmp_dir) + strlen("/sxid.XXXXXX") + 1);
if (tmp_file == NULL) {
fprintf(stderr, "E: could not malloc() in compare_output().\n");
exit(1);
}
strcpy... | compare_output | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
int do_check(char *path, char *md5sum) {
char *v3;
char *v4;
int i;
int r;
int d1;
int d2;
char *pa;
FILE *fp;
unsigned char chk_digest[16];
unsigned char file_digest[24];
unsigned long v14;
v14 = __readfsqword(0x28u);
fp = fopen(path, "r");
if (!fp)
return 1;
r = mdfile(fp, file_dige... | int do_check(char *path, char *md5sum) {
unsigned char chk_digest[16], file_digest[16];
FILE *fp;
int i, d1, d2, r;
char *p = md5sum;
fp = fopen(path, "r");
if (fp == NULL)
return 1;
r = mdfile(fp, file_digest);
fclose(fp);
if (r)
return 2;
for (i = 0; i < 16; ++i) {
if ((d1 = hex_digit... | do_check | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void do_list_all(FILE *mail_file) {
int v1;
int v2;
const char *v3;
file_entry *p;
char *perms;
char *space1;
char *space2;
p = global_log;
fwrite("Complete list of entries:\n", 1u, 0x1Au, mail_file);
while (p) {
if (!p->flags) {
perms = format_ugid(p->uid, p->gid, p->mode);
v1 = st... | static void do_list_all(FILE *mail_file) {
struct file_entry *p = global_log;
fprintf(mail_file, "Complete list of entries:\n");
while (p != NULL) {
if (!p->flags & FE_OLD) {
char *perms, *space1, *space2;
perms = format_ugid(p->uid, p->gid, p->mode);
space1 = fill_space(20 - strlen(perms... | do_list_all | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
int excluded(char *dir) {
char *p;
char *tok;
char *e;
unsigned long v5;
v5 = __readfsqword(0x28u);
e = strdup(config_options.exclude_paths);
for (tok = strtok_r(e, " ", &p); tok; tok = strtok_r(0, " ", &p)) {
if (!strcmp(tok, dir)) {
free(e);
return 1;
}
}
free(e);
return 0;
} | static int excluded(char *dir) {
char *tok, *e, *p;
e = strdup(config_options.exclude_paths);
tok = strtok_r(e, " ", &p);
while (tok != NULL) {
if (!strcmp(tok, dir)) {
free(e);
return 1;
}
tok = strtok_r(NULL, " ", &p);
}
free(e);
return 0;
} | excluded | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
char *fill_space(int count) {
int counta;
int i;
char *p;
counta = count;
if (count) {
if (count < 0) {
for (i = 5; i < -count; i += 5)
;
counta = i;
}
} else {
counta = 5;
}
p = (char *)malloc(counta + 1);
if (!p) {
fwrite("E: could not malloc() in fill_space()\n"... | static char *fill_space(int count) {
char *p;
int i;
if (count == 0)
count = 5;
else if (count < 0) {
count = 0 - count;
for (i = 5; i < count; i += 5)
;
count = i;
}
p = (char *)malloc(count + 1);
if (p == NULL) {
fprintf(stderr, "E: could not malloc() in fill_space()\n");
... | fill_space | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
char *format_ugid(uid_t uid, gid_t gid, mode_t mode) {
char *v3;
char *v4;
char *v5;
short modea;
char *temp;
char *tempa;
char *tempb;
struct passwd *pw;
struct group *gr;
char *ret_val;
modea = mode;
pw = getpwuid(uid);
gr = getgrgid(gid);
temp = (char *)malloc(0x200u);
ret_val = temp;
... | static char *format_ugid(uid_t uid, gid_t gid, mode_t mode) {
struct passwd *pw = getpwuid(uid);
struct group *gr = getgrgid(gid);
char *ret_val, *temp;
ret_val = temp = (char *)malloc((NAME_MAX * 2) + 2);
if (ret_val == NULL) {
fprintf(stderr, "E: could not malloc() in format_ugid()\n");
exit(1);
... | format_ugid | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
file_entry *get_fe_bypath(char *path) {
file_entry *p;
file_entry *pa;
for (p = global_log; p; p = p->next) {
if (!strcmp(p->path, path))
return p;
}
pa = (file_entry *)malloc(0x40u);
if (!pa) {
fwrite("E: could malloc() in get_fe_bypath()\n", 1u, 0x25u, stderr);
exit(1);
}
pa->next =... | struct file_entry *get_fe_bypath(char *path) {
struct file_entry *p;
p = global_log;
while (p != NULL) {
if (!strcmp(p->path, path))
return p;
p = p->next;
}
p = (struct file_entry *)malloc(sizeof(struct file_entry));
if (p == NULL) {
fprintf(stderr, "E: could malloc() in get_fe_bypath(... | get_fe_bypath | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void get_value(char *key, char *value, int required) {
char *v3;
unsigned int count;
int line_no;
FILE *conffile;
char buffer[2056];
unsigned long v9;
v9 = __readfsqword(0x28u);
line_no = 0;
memset(buffer, 0, 0x800u);
conffile = fopen(confname, "r");
if (!conffile) {
fprintf(stderr, "E: error... | static void get_value(char *key, char *value, int required) {
FILE *conffile;
char buffer[MAXBUF];
int count = 0;
int line_no = 0;
bzero(buffer, sizeof(buffer));
if ((conffile = fopen(confname, "r")) == NULL) {
fprintf(stderr, "E: error opening config file, %s.\n", confname);
exit(1);
} else {
... | get_value | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
uint32 getu32(const unsigned char *addr) {
return ((((unsigned long)*((unsigned short *)addr + 1) << 8) | addr[1])
<< 8) |
*addr;
} | static uint32 getu32(const unsigned char *addr) {
return (((((unsigned long)addr[3] << 8) | addr[2]) << 8) | addr[1]) << 8 |
addr[0];
} | getu32 | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
int hex_digit(int c) {
if (c > 47 && c <= 57)
return c - 48;
if (c <= 96 || c > 102)
return -1;
return c - 87;
} | int hex_digit(int c) {
if (c >= '0' && c <= '9')
return c - '0';
if (c >= 'a' && c <= 'f')
return c - 'a' + 10;
return -1;
} | hex_digit | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void init_conf() {
char temp[2056];
unsigned long v1;
v1 = __readfsqword(0x28u);
config_options.exclude_paths[0] = 0;
strcpy(config_options.email, "root");
config_options.forbidden_paths[0] = 0;
config_options.ignore_dirs[0] = 0;
config_options.extra_list[0] = 0;
strcpy(config_options.mail_prog, "/us... | void init_conf(void) {
char temp[MAXBUF];
strcpy((char *)config_options.exclude_paths, "");
strcpy((char *)config_options.email, "root");
strcpy((char *)config_options.forbidden_paths, "");
strcpy((char *)config_options.ignore_dirs, "");
config_options.extra_list[0] = '\0';
strcpy((char *)config_options.... | init_conf | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void init_file_entries() {
size_t v0;
char *v1;
char *v2;
char *v3;
char *v4;
FILE *log;
const char *tok;
const char *toka;
file_entry *p;
char search_tok[2];
char buf[2056];
unsigned long v11;
v11 = __readfsqword(0x28u);
*(_WORD *)search_tok = 30;
global_log = 0;
log = fopen(config_opt... | void init_file_entries(void) {
FILE *log;
char buf[MAXBUF], *s, *tok, search_tok[2] = {0x1e, '\0'};
global_log = NULL;
log = fopen(config_options.log_file, "r");
if (log == NULL)
return;
while ((fgets(buf, sizeof(buf), log)) != NULL) {
struct file_entry *p;
buf[strlen(buf) - 1] = '\0';
s ... | init_file_entries | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void mail_header(FILE *output) {
char *v1;
char hostname_val[2056];
unsigned long v3;
v3 = __readfsqword(0x28u);
fprintf(output, "sXid Vers : %s\n", sxid_version);
fprintf(output, "Check run : %s\n", current_time);
if (gethostname(hostname_val, 0x800u))
v1 = "localhost";
else
v1 = hostname_va... | static void mail_header(FILE *output) {
char hostname_val[MAXBUF];
fprintf(output, "sXid Vers : %s\n", sxid_version);
fprintf(output, "Check run : %s\n", current_time);
fprintf(output, "This host : %s\n",
gethostname(hostname_val, sizeof(hostname_val)) ? "localhost"
... | mail_header | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
struct tm *v3;
int optindex;
int opt;
time_t time_mark;
FILE *conffile;
unsigned long v9;
v9 = __readfsqword(0x28u);
optindex = 0;
umask(0x3Fu);
config_options.flags = 0;
while (1) {
opt = getopt_long_only(argc, (char *const *)argv, "... | int main(int argc, char *argv[]) {
FILE *conffile;
int opt, optindex = 0;
time_t time_mark;
umask(077);
config_options.flags = 0x00;
while ((opt = getopt_long_only(argc, argv, "nhlkc:", cmd_options,
&optindex)) != EOF) {
switch (opt) {
case 'c':
confname = op... | main | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
int mdfile(FILE *fp, unsigned char *digest) {
signed int n;
MD5Context ctx;
unsigned char buf[1032];
unsigned long v6;
v6 = __readfsqword(0x28u);
MD5Init(&ctx);
while (1) {
n = fread(buf, 1u, 0x400u, fp);
if (n <= 0)
break;
MD5Update(&ctx, buf, n);
}
MD5Final(digest, &ctx);
if (fe... | int mdfile(FILE *fp, unsigned char *digest) {
unsigned char buf[1024];
struct MD5Context ctx;
int n;
MD5Init(&ctx);
while ((n = fread(buf, 1, sizeof(buf), fp)) > 0)
MD5Update(&ctx, buf, n);
MD5Final(digest, &ctx);
if (ferror(fp))
return -1;
return 0;
} | mdfile | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void notify_email() {
const char *v0;
char *mail_prog;
const char *v2;
FILE *mail_pipe;
char buffer[4168];
unsigned long v5;
v5 = __readfsqword(0x28u);
rewind(mail_file);
if (changed) {
v0 = "List of changed s[ug]id files and folders";
} else if (notify_diff) {
v0 = "No changes found (persi... | void notify_email(void) {
FILE *mail_pipe;
char buffer[PATH_MAX + 64];
rewind(mail_file);
#ifdef CL_SUBJ
snprintf(buffer, sizeof(buffer), "%s -s \"%s\" \"%s\"",
config_options.mail_prog,
changed ? "List of changed s[ug]id files and folders"
: notify_diff ? "No changes fo... | notify_email | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void putu32(uint32 data, unsigned char *addr) {
*addr = data;
*(_WORD *)(addr + 1) = (unsigned int)data >> 8;
addr[3] = BYTE3(data);
} | static void putu32(uint32 data, unsigned char *addr) {
addr[0] = (unsigned char)data;
addr[1] = (unsigned char)(data >> 8);
addr[2] = (unsigned char)(data >> 16);
addr[3] = (unsigned char)(data >> 24);
} | putu32 | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void save_and_rotate() {
unsigned int v0;
const char *md5;
int i;
file_entry *p;
FILE *new_log;
char o[4096];
char n[4104];
unsigned long v7;
v7 = __readfsqword(0x28u);
p = global_log;
for (i = config_options.keep_logs - 1; i >= 0; --i) {
if (i)
v0 = 46;
else
v0 = 0;
sprin... | void save_and_rotate(void) {
struct file_entry *p = global_log;
FILE *new_log;
int i;
for (i = config_options.keep_logs - 1; i >= 0; i--) {
char o[PATH_MAX], n[PATH_MAX];
sprintf(o, "%s%c%d", config_options.log_file, i == 0 ? '\0' : '.', i - 1);
sprintf(n, "%s.%d", config_options.log_file, i);
... | save_and_rotate | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void search_path(char *dir) {
dirent *dir_entry;
DIR *dir_list;
dir_list = opendir(dir);
if (dir_list) {
for (dir_entry = readdir(dir_list); dir_entry;
dir_entry = readdir(dir_list))
check_entry(dir_entry, dir);
closedir(dir_list);
}
} | void search_path(char *dir) {
DIR *dir_list;
struct dirent *dir_entry;
dir_list = opendir(dir);
if (dir_list == NULL)
return;
for (dir_entry = readdir(dir_list); dir_entry != NULL;
dir_entry = readdir(dir_list))
check_entry(dir_entry, dir);
closedir(dir_list);
return;
} | search_path | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void start_search() {
char *tok;
char *toka;
char *s;
char *sa;
FILE *list;
stat dirent_stat;
char b[2056];
unsigned long v7;
v7 = __readfsqword(0x28u);
s = strdup(config_options.search_paths);
for (tok = strtok(s, " "); tok; tok = strtok(0, " ")) {
if (!excluded(tok))
search_path(tok);... | void start_search(void) {
char *tok, *s;
s = strdup(config_options.search_paths);
for (tok = strtok(s, " "); tok != NULL; tok = strtok(NULL, " "))
if (!excluded(tok))
search_path(tok);
free(s);
s = strdup(config_options.forbidden_paths);
for (tok = strtok(s, " "); tok != NULL; tok = strtok(NULL,... | start_search | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
char *super_format_ugid(file_entry *p) {
char *v1;
char *temp;
char *tempa;
char *tempb;
char *ret_val;
struct passwd *pw;
struct passwd *pwa;
struct group *gr;
struct group *gra;
temp = (char *)malloc(0x402u);
ret_val = temp;
if (!temp) {
fwrite("E: could not malloc() in super_format_ugid(... | static char *super_format_ugid(struct file_entry *p) {
struct passwd *pw;
struct group *gr;
char *ret_val, *temp;
ret_val = temp = (char *)malloc((NAME_MAX * 4) + 6);
if (ret_val == NULL) {
fprintf(stderr, "E: could not malloc() in super_format_ugid()\n");
exit(1);
}
if (p->flags & FE_CHUSER) {
... | super_format_ugid | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void sxid_usage(char *prog_name) {
fprintf(stdout, "sXid %s: (C) 1999, 2000, 2002 by Ben Collins\n",
sxid_version);
fprintf(stdout, "Usage: %s [options]\n", prog_name);
fwrite("-h, --help This help output\n", 1u, 0x29u, stdout);
fwrite(
"-k, --spotcheck Run this using spotch... | static void sxid_usage(char *prog_name) {
fprintf(stdout, "sXid %s: (C) 1999, 2000, 2002 by Ben Collins\n",
sxid_version);
fprintf(stdout, "Usage: %s [options]\n", prog_name);
fprintf(stdout, "-h, --help This help output\n");
fprintf(stdout, "-k, --spotcheck Run this using spotche... | sxid_usage | sxid-4.2-r2 | app-admin | O0/app-admin/sxid-4.2-r2/sxid | ida | O0 |
void close_ssl_connection(SSL *ssl) {
long SSL_CTX;
gchar *base_0;
gchar *base;
if (ssl) {
SSL_shutdown(ssl);
SSL_CTX = SSL_get_SSL_CTX(ssl);
SSL_CTX_free(SSL_CTX);
SSL_free(ssl);
if (get_debug_level()) {
base_0 = (gchar *)g_path_get_basename("tests/loggen/loggen_helper.c");
fpr... | void close_ssl_connection(SSL *ssl) {
if (!ssl) {
DEBUG("SSL connection was not initialized\n");
return;
}
SSL_shutdown(ssl);
SSL_CTX_free(SSL_get_SSL_CTX(ssl));
SSL_free(ssl);
DEBUG("SSL connection closed\n");
} | close_ssl_connection | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
int connect_ip_socket(int sock_type, const char *target, const char *port,
int use_ipv6) {
int socket;
gchar *base_0;
addrinfo *addr_info;
gchar *base;
if (target && port) {
if (get_debug_level()) {
base_0 = (gchar *)g_path_get_basename("tests/loggen/loggen_helper.c");
f... | int connect_ip_socket(int sock_type, const char *target, const char *port,
int use_ipv6) {
struct sockaddr *dest_addr;
socklen_t dest_addr_len;
if (!target || !port) {
ERROR("Invalid server address/port\n");
return -1;
}
DEBUG("server IP = %s:%s\n", target, port);
#if SYSLOG_NG... | connect_ip_socket | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
int connect_to_server(sockaddr *dest_addr, int dest_addr_len, int sock_type) {
int *v3;
const char *v4;
int *v6;
const char *v7;
int sock;
gchar *base_0;
gchar *base_2;
gchar *base_1;
gchar *base;
sock = socket(dest_addr->sa_family, sock_type, 0);
if (sock >= 0) {
if (get_debug_level()) {
... | static int connect_to_server(struct sockaddr *dest_addr, int dest_addr_len,
int sock_type) {
int sock = socket(dest_addr->sa_family, sock_type, 0);
if (sock < 0) {
ERROR("error creating socket: %s\n", g_strerror(errno));
return -1;
}
if (sock_type == SOCK_STREAM) {
#ifdef T... | connect_to_server | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
int connect_unix_domain_socket(int sock_type, const char *path) {
gchar *base_0;
gchar *base_1;
gchar *base;
sockaddr_un saun;
unsigned long v7;
v7 = __readfsqword(0x28u);
if (path) {
if (get_debug_level()) {
base_0 = (gchar *)g_path_get_basename("tests/loggen/loggen_helper.c");
fprintf(s... | int connect_unix_domain_socket(int sock_type, const char *path) {
struct sockaddr_un saun;
struct sockaddr *dest_addr;
socklen_t dest_addr_len;
if (!path) {
ERROR("No target path specified\n");
return -1;
}
DEBUG("unix domain socket: %s\n", path);
saun.sun_family = AF_UNIX;
gsize max_target_p... | connect_unix_domain_socket | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
void crypto_deinit() {
char rnd_file[264];
unsigned long v1;
v1 = __readfsqword(0x28u);
if (randfile_loaded) {
RAND_file_name(rnd_file, 256);
if (rnd_file[0])
RAND_write_file(rnd_file);
}
openssl_crypto_deinit_threading();
} | void crypto_deinit(void) {
char rnd_file[256];
if (randfile_loaded) {
RAND_file_name(rnd_file, sizeof(rnd_file));
if (rnd_file[0])
RAND_write_file(rnd_file);
}
#if OPENSSL_VERSION_NUMBER < 0x10100000L
ERR_free_strings();
EVP_cleanup();
#endif
openssl_crypto_deinit_threading();
} | crypto_deinit | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
void crypto_init() {
char rnd_file[264];
unsigned long v1;
v1 = __readfsqword(0x28u);
openssl_init();
openssl_crypto_init_threading();
if (getenv("RANDFILE")) {
RAND_file_name(rnd_file, 256);
if (rnd_file[0]) {
RAND_load_file(rnd_file, -1);
randfile_loaded = 1;
if ((int)RAND_statu... | void crypto_init(void) {
openssl_init();
openssl_crypto_init_threading();
if (getenv("RANDFILE")) {
char rnd_file[256];
RAND_file_name(rnd_file, sizeof(rnd_file));
if (rnd_file[0]) {
RAND_load_file(rnd_file, -1);
randfile_loaded = TRUE;
if (RAND_status() < 0) {
fprintf(stde... | crypto_init | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
void format_timezone_offset_with_colon(char *timestamp, int timestamp_size,
tm *tm) {
size_t v3;
int len;
char offset[7];
unsigned long v6;
v6 = __readfsqword(0x28u);
len = strftime(offset, 7u, "%z", tm);
memmove(&offset[len - 1], &offset[len - 2], 3u);
offset[len... | void format_timezone_offset_with_colon(char *timestamp, int timestamp_size,
struct tm *tm) {
char offset[7];
int len = strftime(offset, sizeof(offset), "%z", tm);
memmove(&offset[len - 1], &offset[len - 2], 3);
offset[len - 2] = ':';
strncat(timestamp, offset, timestam... | format_timezone_offset_with_colon | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
int generate_proxy_header(char *buffer, int buffer_size, int thread_id,
const char *proxy_src_ip, const char *proxy_dst_ip,
const char *proxy_src_port,
const char *proxy_dst_port) {
const char *v7;
const char *v8;
const char *v9;
cons... | int generate_proxy_header(char *buffer, int buffer_size, int thread_id,
const char *proxy_src_ip, const char *proxy_dst_ip,
const char *proxy_src_port,
const char *proxy_dst_port) {
gchar header[HEADER_BUF_SIZE];
gchar ip_src_random[IP_A... | generate_proxy_header | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
int get_debug_level() { return debug; } | int get_debug_level(void) { return debug; } | get_debug_level | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
size_t get_now_timestamp(char *stamp, gsize stamp_size) {
timeval now;
tm tm;
unsigned long v5;
v5 = __readfsqword(0x28u);
gettimeofday(&now, 0);
localtime_r(&now.tv_sec, &tm);
return strftime(stamp, stamp_size, "%Y-%m-%dT%H:%M:%S", &tm);
} | size_t get_now_timestamp(char *stamp, gsize stamp_size) {
struct timeval now;
struct tm tm;
gettimeofday(&now, NULL);
localtime_r(&now.tv_sec, &tm);
return strftime(stamp, stamp_size, "%Y-%m-%dT%H:%M:%S", &tm);
} | get_now_timestamp | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
size_t get_now_timestamp_bsd(char *stamp, gsize stamp_size) {
timeval now;
tm tm;
unsigned long v5;
v5 = __readfsqword(0x28u);
gettimeofday(&now, 0);
localtime_r(&now.tv_sec, &tm);
return strftime(stamp, stamp_size, "%b %d %T", &tm);
} | size_t get_now_timestamp_bsd(char *stamp, gsize stamp_size) {
struct timeval now;
struct tm tm;
gettimeofday(&now, NULL);
localtime_r(&now.tv_sec, &tm);
return strftime(stamp, stamp_size, "%b %d %T", &tm);
} | get_now_timestamp_bsd | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
SSL *open_ssl_connection(int sock_fd) {
long v1;
SSL_CTX *ctx;
SSL *ssl;
gchar *base_2;
gchar *base_1;
gchar *base_0;
gchar *base;
v1 = TLS_client_method();
ctx = (SSL_CTX *)SSL_CTX_new(v1);
if (ctx) {
SSL_CTX_ctrl(ctx, 33, 4, 0);
ssl = (SSL *)SSL_new(ctx);
if (ssl) {
SSL_set_fd(s... | SSL *open_ssl_connection(int sock_fd) {
SSL_CTX *ctx = NULL;
if (NULL == (ctx = SSL_CTX_new(SSLv23_client_method()))) {
ERROR("error creating SSL_CTX\n");
return NULL;
}
SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY);
SSL *ssl = NULL;
if (NULL == (ssl = SSL_new(ctx))) {
ERROR("error creating SSL\n... | open_ssl_connection | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
void openssl_ctx_setup_ecdh(SSL_CTX *ctx) { ; } | void openssl_ctx_setup_ecdh(SSL_CTX *ctx) {
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
#elif OPENSSL_VERSION_NUMBER >= 0x10002000L
SSL_CTX_set_ecdh_auto(ctx, 1);
#elif OPENSSL_VERSION_NUMBER >= 0x10001000L
EC_KEY *ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
if (!ecdh)
return;
SSL_CTX_set_tmp_... | openssl_ctx_setup_ecdh | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
void openssl_ctx_setup_session_tickets(SSL_CTX *ctx) {
SSL_CTX_set_num_tickets(ctx, 0);
} | void openssl_ctx_setup_session_tickets(SSL_CTX *ctx) {
#if SYSLOG_NG_HAVE_DECL_SSL_CTX_SET_NUM_TICKETS
SSL_CTX_set_num_tickets(ctx, 0);
#endif
} | openssl_ctx_setup_session_tickets | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
void openssl_init() { ; } | void openssl_init(void) {
#if OPENSSL_VERSION_NUMBER < 0x10100000L
SSL_library_init();
SSL_load_error_strings();
OpenSSL_add_all_algorithms();
#endif
} | openssl_init | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
addrinfo *resolve_address_using_getaddrinfo(int sock_type, const char *target,
const char *port, int use_ipv6) {
int v4;
const char *v6;
const char *v7;
int addrinfo_err;
int addrinfo_erra;
addrinfo *res;
gchar *base;
gchar *base_0;
addrinfo hints;
unsigne... | struct addrinfo *resolve_address_using_getaddrinfo(int sock_type,
const char *target,
const char *port,
int use_ipv6) {
struct addrinfo hints;
memset(&hints, 0, si... | resolve_address_using_getaddrinfo | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
void set_debug_level(int new_debug) { debug = new_debug; } | void set_debug_level(int new_debug) { debug = new_debug; } | set_debug_level | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
double time_val_diff_in_sec(timeval *t1, timeval *t2) {
timeval res;
unsigned long v4;
v4 = __readfsqword(0x28u);
time_val_diff_in_timeval(&res, t1, t2);
return (double)SLODWORD(res.tv_usec) / 1000000.0 +
(double)SLODWORD(res.tv_sec);
} | double time_val_diff_in_sec(struct timeval *t1, struct timeval *t2) {
struct timeval res;
time_val_diff_in_timeval(&res, t1, t2);
return (double)res.tv_sec + (double)res.tv_usec / USEC_PER_SEC;
} | time_val_diff_in_sec | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
void time_val_diff_in_timeval(timeval *res, const timeval *t1,
const timeval *t2) {
res->tv_sec = t1->tv_sec - t2->tv_sec;
res->tv_usec = t1->tv_usec - t2->tv_usec;
if (res->tv_usec < 0) {
--res->tv_sec;
res->tv_usec += 1000000LL;
}
} | void time_val_diff_in_timeval(struct timeval *res, const struct timeval *t1,
const struct timeval *t2) {
res->tv_sec = (t1->tv_sec - t2->tv_sec);
res->tv_usec = (t1->tv_usec - t2->tv_usec);
if (res->tv_usec < 0) {
res->tv_sec--;
res->tv_usec += USEC_PER_SEC;
}
} | time_val_diff_in_timeval | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
unsigned long time_val_diff_in_usec(timeval *t1, timeval *t2) {
return 1000000 * (t1->tv_sec - t2->tv_sec) + t1->tv_usec - t2->tv_usec;
} | unsigned long time_val_diff_in_usec(struct timeval *t1, struct timeval *t2) {
return (t1->tv_sec - t2->tv_sec) * USEC_PER_SEC + (t1->tv_usec - t2->tv_usec);
} | time_val_diff_in_usec | syslog-ng-3.35.1 | app-admin | O0/app-admin/syslog-ng-3.35.1/libloggen_helper-3.35.so.0.0.0 | ida | O0 |
int arguments_parse(int argc, char **argv, ctx *ctx_p) {
void *v3;
int val;
char *v5;
char *v6;
char *v7;
char *v8;
char *v9;
int v11;
char *v12;
long v13;
ctx *ctx_pa;
char **argva;
int argca;
int option_index;
int c;
int ret;
char *optstring_ptr;
const option *lo_ptr;
char *optst... | int arguments_parse(int argc, char *argv[], struct ctx *ctx_p) {
int c;
int option_index = 0;
char *optstring = alloca((('z' - 'a' + 1) * 3 + '9' - '0' + 1) * 3 + 1);
char *optstring_ptr = optstring;
const struct option *lo_ptr = long_options;
while (lo_ptr->name != NULL) {
if (!(lo_ptr->val & (OPTION... | arguments_parse | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int becomedaemon() {
__pid_t pid;
signal(13, (__sighandler_t)((char *)&dword_0 + 1));
pid = fork();
if (pid == -1) {
error("becomedaemon", "Cannot fork().");
return *__errno_location();
} else {
if (pid) {
*__errno_location() = 0;
exit(0);
}
setsid();
return 0;
}
} | int becomedaemon() {
int pid;
signal(SIGPIPE, SIG_IGN);
switch ((pid = fork())) {
case -1:
error("Cannot fork().");
return (errno);
case 0:
setsid();
break;
default:
debug(1, "fork()-ed, pid is %i.", pid);
errno = 0;
exit(0);
}
return 0;
} | becomedaemon | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
void *calloc_align(size_t nmemb, size_t size) {
void *ret;
ret = malloc_align((size + 1) * (nmemb + 1));
memset(ret, 0, (size + 1) * (nmemb + 1));
return ret;
} | void *calloc_align(size_t nmemb, size_t size) {
size_t total_size;
void *ret;
debug(20, "(%li, %li)", nmemb, size);
#ifdef PARANOID
nmemb++;
size++;
#endif
total_size = nmemb * size;
ret = malloc_align(total_size);
memset(ret, 0, total_size);
return ret;
} | calloc_align | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int cap_drop(ctx_t *ctx_p, __u32 caps) {
int v3;
__user_cap_header_struct cap_hdr;
__user_cap_data_struct cap_dat;
unsigned long v6;
v6 = __readfsqword(0x28u);
cap_hdr = (__user_cap_header_struct)429392688LL;
*(_QWORD *)&cap_dat.effective = 0;
cap_dat.inheritable = 0;
if ((int)capget(&cap_hdr, &cap_d... | int cap_drop(ctx_t *ctx_p, __u32 caps) {
debug(1, "Dropping all Linux capabilities but 0x%x", caps);
struct __user_cap_header_struct cap_hdr = {0};
struct __user_cap_data_struct cap_dat = {0};
cap_hdr.version = _LINUX_CAPABILITY_VERSION;
if (capget(&cap_hdr, &cap_dat) < 0) {
error_or_debug((ctx_p->flags[... | cap_drop | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int cap_enable(__u32 caps) {
__user_cap_header_struct cap_hdr;
__user_cap_data_struct cap_dat;
unsigned long v4;
v4 = __readfsqword(0x28u);
cap_hdr = (__user_cap_header_struct)429392688LL;
*(_QWORD *)&cap_dat.effective = 0;
cap_dat.inheritable = 0;
if ((int)capget(&cap_hdr, &cap_dat) >= 0) {
cap_da... | int cap_enable(__u32 caps) {
debug(1, "Enabling Linux capabilities 0x%x", caps);
struct __user_cap_header_struct cap_hdr = {0};
struct __user_cap_data_struct cap_dat = {0};
cap_hdr.version = _LINUX_CAPABILITY_VERSION;
if (capget(&cap_hdr, &cap_dat) < 0) {
error("Cannot get capabilities with capget()");
... | cap_enable | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
void child_sigchld() {
if (getppid() == 1)
exit(-1);
} | void child_sigchld() {
if (getppid() != 1)
return;
debug(1, "Got SIGCHLD (parent ended). Exit.");
exit(-1);
return;
} | child_sigchld | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int clsyncapi_getapiversion() { return 2; } | int clsyncapi_getapiversion() { return CLSYNC_API_VERSION; } | clsyncapi_getapiversion | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int config_block_parse(ctx_t *ctx_p, const char *const config_block_name) {
int *v2;
int rc;
ctx_p->config_block = config_block_name;
rc = configs_parse(ctx_p, paramsource_enum_PS_CONTROL);
if (!rc)
rc = ctx_check(ctx_p);
v2 = __errno_location();
*v2 = rc;
return *v2;
} | int config_block_parse(ctx_t *ctx_p, const char *const config_block_name) {
int rc;
debug(1, "(ctx_p, \"%s\")", config_block_name);
ctx_p->config_block = config_block_name;
rc = configs_parse(ctx_p, PS_CONTROL);
if (!rc)
rc = ctx_check(ctx_p);
return errno = rc;
} | config_block_parse | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int configs_parse(ctx_t *ctx_p, paramsource_t paramsource) {
size_t v3;
GError *g_error;
char **config_path_p;
char *config_path_real;
size_t config_path_real_size;
GKeyFile *gkf;
char *homedir;
size_t homedir_len;
size_t config_path_len;
char *config_paths[6];
unsigned long v13;
v13 = __readfs... | int configs_parse(ctx_t *ctx_p, paramsource_t paramsource) {
GKeyFile *gkf;
gkf = g_key_file_new();
if (ctx_p->config_path) {
GError *g_error = NULL;
if (!strcmp(ctx_p->config_path, "/NULL/")) {
debug(2, "Empty path to config file. Don't read any of config files.");
return 0;
}
debu... | configs_parse | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int ctx_check(ctx_t *ctx_p) {
int *v1;
int *v2;
int *v3;
int *v4;
int *v5;
int *v6;
int *v7;
int *v8;
int *v9;
int *v10;
int *v11;
int *v12;
int *v13;
int *v14;
int *v15;
int *v16;
int *v17;
int *v18;
int v19;
int *v20;
int *v21;
int *v22;
int *v23;
int *v24;
int *v25;
... | int ctx_check(ctx_t *ctx_p) {
int ret = 0;
#ifdef CLUSTER_SUPPORT
struct utsname utsname;
#endif
#ifndef _DEBUG_SUPPORT
if (ctx_p->flags[DEBUG]) {
ret = errno = EINVAL;
error("Clsync was compiled without debugging support, please recompile "
"with --enable-debug in order to be able to use debug... | ctx_check | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
void ctx_cleanup(ctx_t *ctx_p) {
int i;
int n;
int i_0;
int e;
for (i = 0; i <= 1023; ++i) {
if (ctx_p->flags_values_raw[i]) {
free(ctx_p->flags_values_raw[i]);
ctx_p->flags_values_raw[i] = 0;
}
}
for (n = 0; n <= 1; ++n) {
i_0 = 0;
e = ctx_p->synchandler_args[n].c;
while ... | void ctx_cleanup(ctx_t *ctx_p) {
int i = 0;
debug(9, "");
while (i < OPTION_FLAGS) {
if (ctx_p->flags_values_raw[i] != NULL) {
free(ctx_p->flags_values_raw[i]);
ctx_p->flags_values_raw[i] = NULL;
}
i++;
}
{
int n = 0;
while (n < SHARGS_MAX) {
int i = 0, e = ctx_p->syn... | ctx_cleanup | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int ctx_set(ctx_t *ctx_p, const char *const parameter_name,
const char *const parameter_value) {
char *v3;
int ret;
const option *lo_ptr;
for (lo_ptr = long_options; lo_ptr->name; ++lo_ptr) {
if (!strcmp(lo_ptr->name, parameter_name)) {
v3 = strdup(parameter_value);
parse_parameter(... | int ctx_set(ctx_t *ctx_p, const char *const parameter_name,
const char *const parameter_value) {
int ret = ENOENT;
const struct option *lo_ptr = long_options;
while (lo_ptr->name != NULL) {
if (!strcmp(lo_ptr->name, parameter_name)) {
ret = parse_parameter(ctx_p, lo_ptr->val, strdup(paramet... | ctx_set | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
gpointer eidup(gpointer ei_gp) {
eventinfo_t *ei_dup;
ei_dup = (eventinfo_t *)xmalloc(0x28u);
memcpy(ei_dup, ei_gp, sizeof(eventinfo_t));
return ei_dup;
} | gpointer eidup(gpointer ei_gp) {
eventinfo_t *ei = (eventinfo_t *)ei_gp;
eventinfo_t *ei_dup = (eventinfo_t *)xmalloc(sizeof(*ei));
memcpy(ei_dup, ei, sizeof(*ei));
return (gpointer)ei_dup;
} | eidup | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
void error_deinit() {
if (ipc_type_0 == ipc_type_IPCT_SHARED) {
pthread_mutex_destroy_shared(error_mutex_p);
error_mutex_p = 0;
}
} | void error_deinit() {
switch (ipc_type) {
case IPCT_SHARED:
pthread_mutex_destroy_shared(error_mutex_p);
error_mutex_p = NULL;
break;
case IPCT_PRIVATE:
break;
}
return;
} | error_deinit | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
void error_init(void *_outputmethod, int *_quiet, int *_verbose, int *_debug) {
outputmethod_0 = (int *)_outputmethod;
quiet = _quiet;
verbose = _verbose;
debug = _debug;
openlog(0, 3, 24);
} | void error_init(void *_outputmethod, int *_quiet, int *_verbose, int *_debug) {
outputmethod = _outputmethod;
quiet = _quiet;
verbose = _verbose;
debug = _debug;
openlog(NULL, SYSLOG_FLAGS, SYSLOG_FACILITY);
return;
} | error_init | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
void error_init_ipc(ipc_type_t _ipc_type) {
ipc_type_0 = _ipc_type;
if (_ipc_type) {
if (_ipc_type == ipc_type_IPCT_SHARED)
pthread_mutex_init_shared(&error_mutex_p);
else
critical("error_init_ipc", "Unknown ipc_type: %i", ipc_type_0);
} else {
error_mutex_p = &error_mutex_1;
pthread_m... | void error_init_ipc(ipc_type_t _ipc_type) {
static pthread_mutex_t error_mutex = PTHREAD_MUTEX_INITIALIZER;
ipc_type = _ipc_type;
switch (ipc_type) {
case IPCT_SHARED:
pthread_mutex_init_shared(&error_mutex_p);
break;
case IPCT_PRIVATE:
error_mutex_p = &error_mutex;
pthread_mutex_init(error_... | error_init_ipc | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
void evinfo_merge(ctx_t *ctx_p, eventinfo_t *evinfo_dst,
eventinfo_t *evinfo_src) {
if (ctx_p->flags[532] == 2)
evinfo_dst->evmask |= evinfo_src->evmask;
evinfo_dst->flags |= evinfo_src->flags;
if (evinfo_dst->seqid_min - evinfo_src->seqid_min <= 0x7FFFFFFE) {
evinfo_dst->objtype_old = e... | static inline void evinfo_merge(ctx_t *ctx_p, eventinfo_t *evinfo_dst,
eventinfo_t *evinfo_src) {
debug(3,
"evinfo_dst: seqid_min == %u; seqid_max == %u; objtype_old == %i; "
"objtype_new == %i; \t"
"evinfo_src: seqid_min == %u; seqid_max == %u; objtype_old == %... | evinfo_merge | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
char *fd2fpath_malloc(int fd) {
char *fsym;
ssize_t fpathlena;
long fpathlen;
char *fpath;
stat64_t st64;
unsigned long v7;
v7 = __readfsqword(0x28u);
if (fd > 0) {
fsym = (char *)xmalloc(0x102u);
sprintf(fsym, "/proc/self/fd/%i", fd);
if (lstat64(fsym, &st64)) {
error("fd2fpath_mallo... | char *fd2fpath_malloc(int fd) {
#if __linux__
stat64_t st64;
if (fd <= 0) {
error("Invalid file descriptor supplied: fd2fpath_malloc(%i).", fd);
errno = EINVAL;
return NULL;
}
char *fsym = xmalloc((1 << 8) + 2);
sprintf(fsym, "/proc/self/fd/%i", fd);
if (lstat64(fsym, &st64)) {
error("Can... | fd2fpath_malloc | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
short fileutils_calcdirlevel(const char *path) {
const char *v2;
short dirlevel;
const char *ptr;
dirlevel = 0;
ptr = path;
if (path) {
if (*path) {
if (*path == 47) {
while (1) {
v2 = ptr++;
if (!*v2)
break;
if (*ptr == 47)
++dirlevel... | short int fileutils_calcdirlevel(const char *path) {
short int dirlevel = 0;
const char *ptr = path;
if (path == NULL) {
error("path is NULL.");
errno = EINVAL;
return -1;
}
if (*path == 0) {
error("path has zero length.");
errno = EINVAL;
return -2;
}
if (*path != '/') {
er... | fileutils_calcdirlevel | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int fileutils_copy(const char *path_from, const char *path_to) {
FILE *from;
FILE *to;
size_t r;
size_t w;
char buf[8192];
unsigned long v8;
v8 = __readfsqword(0x28u);
from = fopen(path_from, "r");
if (from) {
to = fopen(path_to, "w");
if (to) {
while (!feof(from)) {
r = fread(b... | int fileutils_copy(const char *path_from, const char *path_to) {
char buf[BUFSIZ];
FILE *from, *to;
from = fopen(path_from, "r");
if (from == NULL) {
error("fileutils_copy(\"%s\", \"%s\"): Cannot open file \"%s\" for reading",
path_from, path_to, path_from);
return errno;
}
to = fopen(pa... | fileutils_copy | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
void finish_iteration(ctx_t *ctx_p) {
if (ctx_p->iteration_num != -1)
++ctx_p->iteration_num;
if (!ctx_p->flags[112])
setenv_iteration(ctx_p->iteration_num);
} | static inline void finish_iteration(ctx_t *ctx_p) {
if (ctx_p->iteration_num < (typeof(ctx_p->iteration_num))~0)
ctx_p->iteration_num++;
#ifdef THREADING_SUPPORT
if (!ctx_p->flags[THREADING])
#endif
setenv_iteration(ctx_p->iteration_num);
debug(3, "next iteration: %u/%u", ctx_p->iteration_num,
... | finish_iteration | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
void flush_stderr(int level) {
fputc(10, stderr);
fflush(stderr);
} | static void flush_stderr(int level) {
(void)level;
fprintf(stderr, "\n");
fflush(stderr);
} | flush_stderr | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
void flush_stdout(int level) {
fputc(10, stdout);
fflush(stdout);
} | static void flush_stdout(int level) {
(void)level;
fprintf(stdout, "\n");
fflush(stdout);
} | flush_stdout | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
pid_t fork_helper() {
__pid_t pid;
pid = fork();
if (pid)
return pid;
parent_pid = getppid();
sethandler_sigchld((void (*)(...))child_sigchld);
prctl(1, 17);
return 0;
} | pid_t fork_helper() {
pid_t pid = fork();
if (!pid) {
parent_pid = getppid();
#ifdef __linux__
sethandler_sigchld(child_sigchld);
prctl(PR_SET_PDEATHSIG, SIGCHLD);
#else
pthread_create(&pthread_watchforparent, NULL, watchforparent, &parent_pid);
#endif
debug(20, "parent_pid == %u", parent_pid... | fork_helper | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
GHashTable *g_hash_table_dup(GHashTable *src, GHashFunc hash_funct,
GEqualFunc key_equal_funct,
GDestroyNotify key_destroy_funct,
GDestroyNotify value_destroy_funct,
GDupFunc key_dup_funct, GDupFunc value... | GHashTable *g_hash_table_dup(GHashTable *src, GHashFunc hash_funct,
GEqualFunc key_equal_funct,
GDestroyNotify key_destroy_funct,
GDestroyNotify value_destroy_funct,
GDupFunc key_dup_funct, GDupFunc value... | g_hash_table_dup | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
void g_hash_table_dup_item(gpointer k, gpointer v, gpointer arg_gp) {
long v3;
long v4;
GHashTable *ht_dst;
GDupFunc k_dup_funct;
GDupFunc v_dup_funct;
ht_dst = *(GHashTable **)arg_gp;
k_dup_funct = (GDupFunc) * ((_QWORD *)arg_gp + 1);
v_dup_funct = (GDupFunc) * ((_QWORD *)arg_gp + 2);
if (v_dup_func... | void g_hash_table_dup_item(gpointer k, gpointer v, gpointer arg_gp) {
GHashTable *ht_dst = ((struct keyvalue_copy_arg *)arg_gp)->ht_dst;
GDupFunc k_dup_funct = ((struct keyvalue_copy_arg *)arg_gp)->k_dup_funct;
GDupFunc v_dup_funct = ((struct keyvalue_copy_arg *)arg_gp)->v_dup_funct;
g_hash_table_insert(ht_dst,... | g_hash_table_dup_item | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
GTree *g_tree_dup(GTree *src, GCompareDataFunc key_compare_func,
gpointer key_compare_data, GDestroyNotify key_destroy_func,
GDestroyNotify value_destroy_func, GDupFunc key_dup_funct,
GDupFunc value_dup_funct) {
GTree *dst;
keyvalue_copy_arg arg;
unsigned long... | GTree *g_tree_dup(GTree *src, GCompareDataFunc key_compare_func,
gpointer key_compare_data, GDestroyNotify key_destroy_func,
GDestroyNotify value_destroy_func, GDupFunc key_dup_funct,
GDupFunc value_dup_funct) {
GTree *dst = g_tree_new_full(key_compare_func, key_c... | g_tree_dup | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
gboolean g_tree_dup_item(gpointer k, gpointer v, gpointer arg_gp) {
long v3;
long v4;
GTree *bt_dst;
GDupFunc k_dup_funct;
GDupFunc v_dup_funct;
bt_dst = *(GTree **)arg_gp;
k_dup_funct = (GDupFunc) * ((_QWORD *)arg_gp + 1);
v_dup_funct = (GDupFunc) * ((_QWORD *)arg_gp + 2);
if (v_dup_funct)
v3 = ... | gboolean g_tree_dup_item(gpointer k, gpointer v, gpointer arg_gp) {
GTree *bt_dst = ((struct keyvalue_copy_arg *)arg_gp)->bt_dst;
GDupFunc k_dup_funct = ((struct keyvalue_copy_arg *)arg_gp)->k_dup_funct;
GDupFunc v_dup_funct = ((struct keyvalue_copy_arg *)arg_gp)->v_dup_funct;
g_tree_replace(bt_dst, k_dup_funct... | g_tree_dup_item | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
void gkf_parse(ctx_t *ctx_p, GKeyFile *gkf, paramsource_t paramsource) {
int ret;
char *config_block;
const option *lo_ptr;
char *value;
for (config_block = (char *)ctx_p->config_block; config_block;
config_block = ctx_p->flags_values_raw[531]) {
lo_ptr = long_options;
if (config_block != ctx_... | void gkf_parse(ctx_t *ctx_p, GKeyFile *gkf, paramsource_t paramsource) {
debug(9, "");
char *config_block = (char *)ctx_p->config_block;
while (config_block != NULL) {
const struct option *lo_ptr = long_options;
if (config_block != ctx_p->config_block) {
ctx_p->flags_values_raw[CONFIGBLOCKINHERITS... | gkf_parse | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int helper_isalive() {
if (helper_pid)
return helper_isalive_proc();
else
return helper_isalive_thread();
} | static inline int helper_isalive() {
return helper_pid ? helper_isalive_proc() : helper_isalive_thread();
} | helper_isalive | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int helper_isalive_proc() {
if (waitpid(helper_pid, 0, 1) < 0) {
helper_isalive_cache = 0;
return 0;
} else {
helper_isalive_cache = 1;
return 1;
}
} | static inline int helper_isalive_proc() {
int rc;
debug(12, "helper_pid == %u", helper_pid);
if ((rc = waitpid(helper_pid, NULL, WNOHANG)) >= 0)
return helper_isalive_cache = 1;
debug(1, "waitpid(%u, NULL, WNOHANG) => %i", helper_pid, rc);
return helper_isalive_cache = 0;
} | helper_isalive_proc | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int helper_isalive_thread() {
if (pthread_kill(privileged_thread, 0)) {
helper_isalive_cache = 0;
return 0;
} else {
helper_isalive_cache = 1;
return 1;
}
} | static inline int helper_isalive_thread() {
int rc;
debug(12, "");
if ((rc = pthread_kill(privileged_thread, 0)))
return helper_isalive_cache = 0;
debug(1, "pthread_kill(privileged_thread, 0) => %i", helper_pid, rc);
return helper_isalive_cache = 1;
} | helper_isalive_thread | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int hl_isanswered(int lockid) {
return hl_lock_p->count_wait[lockid] == hl_lock_p->count_signal[lockid] + 1;
} | static inline int hl_isanswered(int lockid) {
return hl_lock_p->count_wait[lockid] == hl_lock_p->count_signal[lockid] + 1;
} | hl_isanswered | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int hl_isready(int lockid) {
return hl_lock_p->count_wait[lockid] == hl_lock_p->count_signal[lockid];
} | static inline int hl_isready(int lockid) {
return hl_lock_p->count_wait[lockid] == hl_lock_p->count_signal[lockid];
} | hl_isready | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
void hl_lock_init(volatile hl_lock *hl_lock_p) {
int i;
hl_lock_p->enabled = 1;
hl_lock_p->locallock_hl_setstate_ifstate = 1;
for (i = 0; i <= 8; ++i) {
hl_lock_p->tries[i] = 0x2000;
hl_lock_p->delay[i] = 0x3FFFFFFFFFFFFFFFLL;
hl_lock_p->tries_step[i] = 1.1;
}
} | static inline void hl_lock_init(volatile struct hl_lock *hl_lock_p) {
debug(10, "");
hl_lock_p->enabled = 1;
hl_lock_p->locallock_hl_setstate_ifstate = 1;
#ifdef HL_LOCK_TRIES_AUTO
int i;
i = 0;
while (i < PC_MAX) {
hl_lock_p->tries[i] = HL_LOCK_TRIES_INITIAL;
hl_lock_p->delay[i] = ((unsigned long)... | hl_lock_init | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
void hl_setstate(int lockid, hllock_state_t stateid) {
_InterlockedExchange((volatile int *)&hl_lock_p->state[lockid], stateid);
} | static inline void hl_setstate(int lockid, hllock_state_t stateid) {
g_atomic_int_set(&hl_lock_p->state[lockid], stateid);
} | hl_setstate | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int hl_setstate_ifstate(int lockid, hllock_state_t stateid_new,
hllock_state_t stateid_old_mask) {
volatile hl_lock *local_lock_p;
local_lock_p = hl_lock_p;
if ((helper_pid || parent_pid) && (++counter_8 & 0xFFFFFF) == 0) {
if (helper_pid) {
if (!helper_isalive_proc())
c... | int hl_setstate_ifstate(int lockid, hllock_state_t stateid_new,
hllock_state_t stateid_old_mask) {
static long long counter = 0;
volatile int *local_lock_p = &hl_lock_p->locallock_hl_setstate_ifstate;
debug(90, "%i, 0x%o, 0x%o", lockid, stateid_new, stateid_old_mask);
if (helper_pid || ... | hl_setstate_ifstate | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
void hl_shutdown(int lockid) {
memset((void *)hl_lock_p->tries, 0, sizeof(hl_lock_p->tries));
hl_lock_p->state[lockid] = highlock_lock_state_HLLS_FALLBACK;
hl_lock_p->enabled = 0;
} | void hl_shutdown(int lockid) {
debug(1, "");
#ifdef PARANOID
critical_on(HLLOCK_MAX != 1);
#ifdef HL_LOCK_TRIES_AUTO
memset((void *)hl_lock_p->tries, 0, sizeof(hl_lock_p->tries));
#else
hl_lock_p->tries = 0;
#endif
#endif
hl_lock_p->state[lockid] = HLLS_FALLBACK;
hl_lock_p->enabled = 0;
return;
} | hl_shutdown | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int hl_signal(int lockid) {
++hl_lock_p->count_signal[lockid];
if (!hl_setstate_ifstate(lockid, highlock_lock_state_HLLS_SIGNAL,
highlock_lock_state_HLLS_READY))
return 0;
while (hl_lock_p->state[lockid] != highlock_lock_state_HLLS_GOTSIGNAL) {
if (hl_lock_p->state[lockid] == hi... | static inline int hl_signal(int lockid) {
debug(15, "%u", lockid);
hl_lock_p->count_signal[lockid]++;
if (hl_setstate_ifstate(lockid, HLLS_SIGNAL, HLLS_READY)) {
while (hl_lock_p->state[lockid] != HLLS_GOTSIGNAL) {
if (hl_lock_p->state[lockid] == HLLS_FALLBACK) {
debug(15, "fallback");
... | hl_signal | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int hl_wait(int lockid, unsigned long hl_lock_tries) {
unsigned long v3;
volatile unsigned long v4;
v4 = 0;
while (hl_lock_p->state[lockid] == highlock_lock_state_HLLS_GOTSIGNAL)
;
while (!hl_isready(lockid))
;
hl_setstate(lockid, highlock_lock_state_HLLS_READY);
++hl_lock_p->count_wait[lockid];
... | static inline int hl_wait(int lockid
#ifdef HL_LOCK_TRIES_AUTO
,
unsigned long hl_lock_tries
#endif
) {
volatile unsigned long try = 0;
debug(15, "");
while (hl_lock_p->state[lockid] == HLLS_GOTSIGNAL)
;
while (!hl_isready(lockid))
;
hl_setstate... | hl_wait | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int inotify_add_watch_dir(ctx_t *ctx_p, indexes_t *indexes_p,
const char *const accpath) {
return privileged_inotify_add_watch((int)ctx_p->fsmondata, accpath,
0x2000FCEu, 7);
} | int inotify_add_watch_dir(ctx_t *ctx_p, indexes_t *indexes_p,
const char *const accpath) {
(void)indexes_p;
int inotify_d = (int)(long)ctx_p->fsmondata;
return privileged_inotify_add_watch(inotify_d, accpath, INOTIFY_MARKMASK,
PC_INOTIFY_ADD_WATCH_DI... | inotify_add_watch_dir | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int inotify_deinit(ctx_t *ctx_p) { return close((int)ctx_p->fsmondata); } | int inotify_deinit(ctx_t *ctx_p) {
int inotify_d = (int)(long)ctx_p->fsmondata;
debug(3, "Closing inotify_d");
return close(inotify_d);
} | inotify_deinit | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int inotify_handle(ctx_t *ctx_p, indexes_t *indexes_p) {
size_t v2;
int v3;
int count;
unsigned int __i;
__mode_t st_mode;
int inotify_d;
char *path_rel;
size_t path_rel_len;
char *path_full;
size_t path_full_size;
char *ptr;
stat64_t *lst_p;
size_t st_size;
fd_set *__arr;
size_t r;
char... | int inotify_handle(ctx_t *ctx_p, indexes_t *indexes_p) {
static struct timeval tv = {0};
int inotify_d = (int)(long)ctx_p->fsmondata;
int count = 0;
fd_set rfds;
FD_ZERO(&rfds);
FD_SET(inotify_d, &rfds);
char *path_rel = NULL;
size_t path_rel_len = 0;
char *path_full = NULL;
size_t path_full_size = ... | inotify_handle | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int inotify_wait(ctx_t *ctx_p, indexes *indexes_p, timeval *tv_p) {
unsigned int __i;
int inotify_d;
fd_set rfds;
unsigned long v7;
v7 = __readfsqword(0x28u);
inotify_d = (int)ctx_p->fsmondata;
for (__i = 0; __i <= 0xF; ++__i)
rfds.fds_bits[__i] = 0;
rfds.fds_bits[inotify_d / 64] |= 1LL << (inotify... | int inotify_wait(ctx_t *ctx_p, struct indexes *indexes_p,
struct timeval *tv_p) {
(void)indexes_p;
int inotify_d = (int)(long)ctx_p->fsmondata;
debug(3, "select with timeout %li secs (fd == %u).", tv_p->tv_sec, inotify_d);
fd_set rfds;
FD_ZERO(&rfds);
FD_SET(inotify_d, &rfds);
return sele... | inotify_wait | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int is_protected(void *addr) {
ssize_t v1;
char t;
t = *(_BYTE *)addr;
v1 = read(devzero_fd, addr, 1u);
if (v1 != -1)
*(_BYTE *)addr = t;
return v1 == -1;
} | int is_protected(void *addr) {
char *_addr = addr, t;
int is_protected;
t = *_addr;
is_protected = (read(devzero_fd, addr, 1) == -1);
if (!is_protected)
*_addr = t;
return is_protected;
} | is_protected | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
char *v3;
__uid_t pw_uid;
__gid_t gr_gid;
char *v6;
char *v7;
char *v8;
int *v9;
int v10;
char *v11;
uid_t v12;
gid_t v13;
int v14;
char *statusfile;
int v16;
char *v17;
int *v18;
int v19;
int v20;
int v21;
int v22;
int... | int main(int _argc, char *_argv[]) {
struct ctx *ctx_p = xcalloc(1, sizeof(*ctx_p));
argv = _argv;
argc = _argc;
int ret = 0, nret, rm_listoutdir = 0;
SAFE(posixhacks_init(), errno = ret = _SAFE_rc);
ctx_p->flags[MONITOR] = DEFAULT_NOTIFYENGINE;
ctx_p->syncdelay = DEFAULT_SYNCDELAY;
ctx_p->_queues[QUEUE... | main | clsync-0.4.5 | app-admin | O0/app-admin/clsync-0.4.5/clsync | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.