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
char *rpmPubkeyBase64(rpmPubkey key) { char *enc; enc = 0; if (key) { pthread_rwlock_rdlock(&key->lock); enc = rpmBase64Encode(key->pkt, key->pktlen, -1); pthread_rwlock_unlock(&key->lock); } return enc; }
char *rpmPubkeyBase64(rpmPubkey key) { char *enc = NULL; if (key) { pthread_rwlock_rdlock(&key->lock); enc = rpmBase64Encode(key->pkt, key->pktlen, -1); pthread_rwlock_unlock(&key->lock); } return enc; }
rpmPubkeyBase64
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
pgpDig rpmPubkeyDig(rpmPubkey key) { int rc; pgpDig_s *dig; pgpDigParams pubp; if (!key) return 0; dig = pgpNewDig(); pthread_rwlock_rdlock(&key->lock); rc = pgpPrtPkts(key->pkt, key->pktlen, dig, print_pkts); pthread_rwlock_unlock(&key->lock); if (!rc) { pubp = pgpDigGetParams(dig, 6u); ...
pgpDig rpmPubkeyDig(rpmPubkey key) { pgpDig dig = NULL; static unsigned char zeros[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int rc; if (key == NULL) return NULL; dig = pgpNewDig(); pthread_rwlock_rdlock(&key->lock); rc = pgpPrtPkts(key->pkt, key->pktlen...
rpmPubkeyDig
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmPubkey rpmPubkeyFree(rpmPubkey key) { if (!key) return 0; pthread_rwlock_wrlock(&key->lock); if (--key->nrefs) { pthread_rwlock_unlock(&key->lock); } else { pgpDigParamsFree(key->pgpkey); free(key->pkt); pthread_rwlock_unlock(&key->lock); pthread_rwlock_destroy(&key->lock); free(k...
rpmPubkey rpmPubkeyFree(rpmPubkey key) { if (key == NULL) return NULL; pthread_rwlock_wrlock(&key->lock); if (--key->nrefs == 0) { pgpDigParamsFree(key->pgpkey); free(key->pkt); pthread_rwlock_unlock(&key->lock); pthread_rwlock_destroy(&key->lock); free(key); } else { pthread_rwlock...
rpmPubkeyFree
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmPubkey rpmPubkeyLink(rpmPubkey key) { if (key) { pthread_rwlock_wrlock(&key->lock); ++key->nrefs; pthread_rwlock_unlock(&key->lock); } return key; }
rpmPubkey rpmPubkeyLink(rpmPubkey key) { if (key) { pthread_rwlock_wrlock(&key->lock); key->nrefs++; pthread_rwlock_unlock(&key->lock); } return key; }
rpmPubkeyLink
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmPubkey rpmPubkeyNew(const uint8_t *pkt, size_t pktlen) { uint8_t *v2; pgpDigParams pgpkey; rpmPubkey key; pgpKeyID_t keyid; unsigned long v7; v7 = __readfsqword(0x28u); key = 0; pgpkey = 0; if (pkt && pktlen && !pgpPubkeyKeyID(pkt, pktlen, keyid) && !pgpPrtParams(pkt, pktlen, 6u, &pgpkey)) {...
rpmPubkey rpmPubkeyNew(const uint8_t *pkt, size_t pktlen) { rpmPubkey key = NULL; pgpDigParams pgpkey = NULL; pgpKeyID_t keyid; if (pkt == NULL || pktlen == 0) goto exit; if (pgpPubkeyKeyID(pkt, pktlen, keyid)) goto exit; if (pgpPrtParams(pkt, pktlen, PGPTAG_PUBLIC_KEY, &pgpkey)) goto exit; ...
rpmPubkeyNew
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
pgpDigParams rpmPubkeyPgpDigParams(rpmPubkey key) { pgpDigParams_s *params; params = 0; if (key) return key->pgpkey; return params; }
pgpDigParams rpmPubkeyPgpDigParams(rpmPubkey key) { pgpDigParams params = NULL; if (key) { params = key->pgpkey; } return params; }
rpmPubkeyPgpDigParams
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmPubkey rpmPubkeyRead(const char *filename) { uint8_t *pkt; size_t pktlen; rpmPubkey key; unsigned long v5; v5 = __readfsqword(0x28u); pkt = 0; key = 0; if (pgpReadPkts(filename, &pkt, &pktlen) > pgpArmor_e_PGPARMOR_NONE) { key = rpmPubkeyNew(pkt, pktlen); free(pkt); } return key; }
rpmPubkey rpmPubkeyRead(const char *filename) { uint8_t *pkt = NULL; size_t pktlen; rpmPubkey key = NULL; if (pgpReadPkts(filename, &pkt, &pktlen) <= 0) { goto exit; } key = rpmPubkeyNew(pkt, pktlen); free(pkt); exit: return key; }
rpmPubkeyRead
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmPushMacro(rpmMacroContext mc, const char *n, const char *o, const char *b, int level) { return rpmPushMacroFlags(mc, n, o, b, level, rpmMacroFlags_e_RPMMACRO_DEFAULT); }
int rpmPushMacro(rpmMacroContext mc, const char *n, const char *o, const char *b, int level) { return rpmPushMacroFlags(mc, n, o, b, level, RPMMACRO_DEFAULT); }
rpmPushMacro
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmPushMacroFlags(rpmMacroContext mc, const char *n, const char *o, const char *b, int level, rpmMacroFlags flags) { char flagsa; rpmMacroContext_s *mca; flagsa = flags; mca = rpmmctxAcquire(mc); pushMacro(mca, n, o, b, level, (4 * flagsa) & 4); rpmmctxRelease(mca); return 0; }
int rpmPushMacroFlags(rpmMacroContext mc, const char *n, const char *o, const char *b, int level, rpmMacroFlags flags) { mc = rpmmctxAcquire(mc); pushMacro(mc, n, o, b, level, flags & RPMMACRO_LITERAL ? ME_LITERAL : ME_NONE); rpmmctxRelease(mc); return 0; }
rpmPushMacroFlags
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmSetCloseOnExec() { int fd; int fda; int open_max; DIR *dir; struct dirent *entry; rlimit rl; unsigned long v6; v6 = __readfsqword(0x28u); dir = opendir("/proc/self/fd"); if (dir) { while (1) { entry = readdir(dir); if (!entry) break; fda = atoi(entry->d_name); ...
void rpmSetCloseOnExec(void) { const int min_fd = STDERR_FILENO; int fd; DIR *dir = opendir("/proc/self/fd"); if (dir == NULL) { struct rlimit rl; int open_max; if (getrlimit(RLIMIT_NOFILE, &rl) == 0 && rl.rlim_max != RLIM_INFINITY) open_max = rl.rlim_max; else open_max = sysconf(...
rpmSetCloseOnExec
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmMemFailFunc rpmSetMemFail(rpmMemFailFunc func, void *data) { void *(*ofunc)(size_t, void *); ofunc = failfunc; failfunc = func; failfunc_data = data; return ofunc; }
rpmMemFailFunc rpmSetMemFail(rpmMemFailFunc func, void *data) { rpmMemFailFunc ofunc = failfunc; failfunc = func; failfunc_data = data; return ofunc; }
rpmSetMemFail
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_b64decode(lua_State *L) { void *data; size_t len; const char *str; unsigned long v5; v5 = __readfsqword(0x28u); str = (const char *)luaL_checklstring(L, 1, 0); if (str) { data = 0; len = 0; if (rpmBase64Decode(str, &data, &len)) lua_pushnil(L); else lua_pushlstring(L, ...
static int rpm_b64decode(lua_State *L) { const char *str = luaL_checkstring(L, 1); if (str) { void *data = NULL; size_t len = 0; if (rpmBase64Decode(str, &data, &len) == 0) { lua_pushlstring(L, data, len); } else { lua_pushnil(L); } free(data); } return 1; }
rpm_b64decode
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_b64encode(lua_State *L) { int linelen; size_t len; const char *str; char *data; unsigned long v6; v6 = __readfsqword(0x28u); str = (const char *)luaL_checklstring(L, 1, &len); linelen = -1; if ((unsigned int)lua_gettop(L) == 2) linelen = luaL_checkinteger(L, 2); if (str && len) { da...
static int rpm_b64encode(lua_State *L) { size_t len; const char *str = luaL_checklstring(L, 1, &len); int linelen = -1; if (lua_gettop(L) == 2) linelen = luaL_checkinteger(L, 2); if (str && len) { char *data = rpmBase64Encode(str, len, linelen); lua_pushstring(L, data); free(data); } retur...
rpm_b64encode
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_call(lua_State *L) { int v1; float v2; int i; rpmhookArgs args; const char *name; char *argt; if ((unsigned int)lua_isstring(L, 1)) { v1 = lua_gettop(L); args = rpmhookArgsNew(v1 - 1); name = (const char *)lua_tolstring(L, 1, 0); argt = (char *)rmalloc(args->argc + 1); for (i ...
static int rpm_call(lua_State *L) { if (!lua_isstring(L, 1)) { (void)luaL_argerror(L, 1, "hook name expected"); } else { rpmhookArgs args = rpmhookArgsNew(lua_gettop(L) - 1); const char *name = lua_tostring(L, 1); char *argt = (char *)xmalloc(args->argc + 1); int i; for (i = 0; i != args->ar...
rpm_call
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_define(lua_State *L) { const char *str; str = (const char *)luaL_checklstring(L, 1, 0); if (rpmDefineMacro(0, str, 0)) return luaL_error(L, "error defining macro"); else return 0; }
static int rpm_define(lua_State *L) { const char *str = luaL_checkstring(L, 1); if (rpmDefineMacro(NULL, str, 0)) return luaL_error(L, "error defining macro"); return 0; }
rpm_define
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_execute(lua_State *L) { int status; pid_t pid; int i; int n; const char *file; char **argv; unsigned long v8; v8 = __readfsqword(0x28u); file = (const char *)luaL_checklstring(L, 1, 0); n = lua_gettop(L); argv = (char **)malloc(8LL * (n + 1)); if (!argv) return luaL_error(L, "not en...
static int rpm_execute(lua_State *L) { const char *file = luaL_checkstring(L, 1); int i, n = lua_gettop(L); int status; pid_t pid; char **argv = malloc((n + 1) * sizeof(char *)); if (argv == NULL) return luaL_error(L, "not enough memory"); argv[0] = (char *)file; for (i = 1; i < n; i++) argv[i]...
rpm_execute
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_exit(lua_State *L) { int v2; if (rpmlua_have_forked) { v2 = luaL_optinteger(L, 1, 0); exit(v2); } return luaL_error(L, "exit not permitted in this context"); }
static int rpm_exit(lua_State *L) { if (!_rpmlua_have_forked) return luaL_error(L, "exit not permitted in this context"); exit(luaL_optinteger(L, 1, EXIT_SUCCESS)); }
rpm_exit
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_expand(lua_State *L) { char *val; const char *str; unsigned long v4; v4 = __readfsqword(0x28u); str = (const char *)luaL_checklstring(L, 1, 0); val = 0; if (rpmExpandMacros(0, str, &val, 0) < 0) return luaL_error(L, "error expanding macro"); lua_pushstring(L, val); free(val); return 1; ...
static int rpm_expand(lua_State *L) { const char *str = luaL_checkstring(L, 1); char *val = NULL; if (rpmExpandMacros(NULL, str, &val, 0) < 0) return luaL_error(L, "error expanding macro"); lua_pushstring(L, val); free(val); return 1; }
rpm_expand
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_interactive(lua_State *L) { if (!isatty(1) || !isatty(0)) return luaL_error(L, "not a tty"); rpmluaInteractive(L); return 0; }
static int rpm_interactive(lua_State *L) { if (!(isatty(STDOUT_FILENO) && isatty(STDIN_FILENO))) return luaL_error(L, "not a tty"); _rpmluaInteractive(L); return 0; }
rpm_interactive
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_isdefined(lua_State *L) { unsigned int parametric; unsigned int defined; const char *str; str = (const char *)luaL_checklstring(L, 1, 0); parametric = 0; defined = rpmMacroIsDefined(0, str); if (defined) parametric = rpmMacroIsParametric(0, str); lua_pushboolean(L, defined); lua_pushboole...
static int rpm_isdefined(lua_State *L) { const char *str = luaL_checkstring(L, 1); int parametric = 0; int defined = rpmMacroIsDefined(NULL, str); if (defined) parametric = rpmMacroIsParametric(NULL, str); lua_pushboolean(L, defined); lua_pushboolean(L, parametric); return 2; }
rpm_isdefined
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_load(lua_State *L) { double MacroFile; const char *str; str = (const char *)luaL_checklstring(L, 1, 0); MacroFile = (double)rpmLoadMacroFile(0, str); lua_pushnumber(L, MacroFile); return 1; }
static int rpm_load(lua_State *L) { const char *str = luaL_checkstring(L, 1); int rc = rpmLoadMacroFile(NULL, str); lua_pushnumber(L, rc); return 1; }
rpm_load
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_next_file(lua_State *L) { char *FileFunc; if (nextFileFunc) { FileFunc = nextFileFunc(nextFileFuncParam); lua_pushstring(L, FileFunc); } else { lua_pushstring(L, 0); } return 1; }
static int rpm_next_file(lua_State *L) { if (nextFileFunc) lua_pushstring(L, nextFileFunc(nextFileFuncParam)); else lua_pushstring(L, NULL); return 1; }
rpm_next_file
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_open(lua_State *L) { const char *v1; int *v2; char *v3; const char *path; FD_t fd; path = (const char *)luaL_checklstring(L, 1, 0); v1 = (const char *)luaL_optlstring(L, 2, "r", 0); fd = Fopen(path, v1); if (fd) return newinstance(L, "rpm.fd", fd); v2 = __errno_location(); v3 = strerr...
static int rpm_open(lua_State *L) { const char *path = luaL_checkstring(L, 1); const char *mode = luaL_optlstring(L, 2, "r", NULL); FD_t fd = Fopen(path, mode); if (fd == NULL) { return luaL_error(L, "%s open failed: %s", path, strerror(errno)); } return newinstance(L, "rpm.fd", fd); }
rpm_open
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_print(lua_State *L) { char *v2; char *buf; size_t used; char *v5; int i; int n; size_t sl; rpmlua lua; rpmluapb prbuf_0; const char *s; rpmluapb prbuf; unsigned long v13; v13 = __readfsqword(0x28u); lua = (rpmlua)getdata(L, "lua"); n = lua_gettop(L); if (!lua) return 0; lu...
static int rpm_print(lua_State *L) { rpmlua lua = (rpmlua)getdata(L, "lua"); int n = lua_gettop(L); int i; if (!lua) return 0; lua_getglobal(L, "tostring"); for (i = 1; i <= n; i++) { const char *s; size_t sl; lua_pushvalue(L, -1); lua_pushvalue(L, i); lua_call(L, 1, 1); s = lua_...
rpm_print
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_redirect2null(lua_State *L) { int r; int target_fd; int fd; int e; if (!rpmlua_have_forked) return luaL_error(L, "redirect2null not permitted in this context"); target_fd = luaL_checkinteger(L, 1); fd = open("/dev/null", 1); r = fd; if (fd >= 0 && fd != target_fd) { r = dup2(fd, targe...
static int rpm_redirect2null(lua_State *L) { int target_fd, fd, r, e; if (!_rpmlua_have_forked) return luaL_error(L, "redirect2null not permitted in this context"); target_fd = luaL_checkinteger(L, 1); r = fd = open("/dev/null", O_WRONLY); if (fd >= 0 && fd != target_fd) { r = dup2(fd, target_fd); ...
rpm_redirect2null
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_register(lua_State *L) { const char *v1; rpmluaHookData hookdata; if ((unsigned int)lua_isstring(L, 1)) { if ((unsigned int)lua_type(L, 2) == 6) { hookdata = (rpmluaHookData)lua_newuserdatauv(L, 16, 1); lua_pushvalue(L, 0xFFFFFFFFLL); hookdata->dataRef = luaL_ref(L, 4293966296LL); ...
static int rpm_register(lua_State *L) { if (!lua_isstring(L, 1)) { (void)luaL_argerror(L, 1, "hook name expected"); } else if (!lua_isfunction(L, 2)) { (void)luaL_argerror(L, 2, "function expected"); } else { rpmluaHookData hookdata = lua_newuserdata(L, sizeof(struct rpmluaHookData_s)); lu...
rpm_register
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_undefine(lua_State *L) { const char *str; str = (const char *)luaL_checklstring(L, 1, 0); rpmPopMacro(0, str); return 0; }
static int rpm_undefine(lua_State *L) { const char *str = luaL_checkstring(L, 1); rpmPopMacro(NULL, str); return 0; }
rpm_undefine
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_unregister(lua_State *L) { const char *v1; rpmluaHookData hookdata; if ((unsigned int)lua_isstring(L, 1)) { if ((unsigned int)lua_isuserdata(L, 2)) { hookdata = (rpmluaHookData)lua_touserdata(L, 2); luaL_unref(L, 4293966296LL, (unsigned int)hookdata->funcRef); luaL_unref(L, 42939662...
static int rpm_unregister(lua_State *L) { if (!lua_isstring(L, 1)) { (void)luaL_argerror(L, 1, "hook name expected"); } else if (!lua_isuserdata(L, 2)) { (void)luaL_argerror(L, 2, "hook information expected"); } else { rpmluaHookData hookdata = (rpmluaHookData)lua_touserdata(L, 2); luaL_unref(L, L...
rpm_unregister
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_ver_new(lua_State *L) { const char *v1; int nargs; rpmver ver; const char *e; const char *v; const char *evr; nargs = lua_gettop(L); ver = 0; if (nargs == 1) { evr = (const char *)lua_tolstring(L, 1, 0); ver = rpmverParse(evr); } else if (nargs == 3) { e = (const char *)lua_tols...
static int rpm_ver_new(lua_State *L) { int nargs = lua_gettop(L); rpmver ver = NULL; if (nargs == 1) { const char *evr = lua_tostring(L, 1); ver = rpmverParse(evr); } else if (nargs == 3) { const char *e = lua_tostring(L, 1); const char *v = lua_tostring(L, 2); const char *r = lua_tostring(...
rpm_ver_new
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpm_vercmp(lua_State *L) { const char *rax3; const char *rax3a; long v3; int rc; const char *s1; const char *s2; rpmver_s *v1; rpmver_s *v2; s1 = (const char *)luaL_checklstring(L, 1, 0); s2 = (const char *)luaL_checklstring(L, 2, 0); rc = 0; if (s1 && s2) { rax3 = (const char *)luaL_ch...
static int rpm_vercmp(lua_State *L) { const char *s1 = luaL_checkstring(L, 1); const char *s2 = luaL_checkstring(L, 2); int rc = 0; if (s1 && s2) { rpmver v1 = rpmverParse(luaL_checkstring(L, 1)); rpmver v2 = rpmverParse(luaL_checkstring(L, 2)); if (v1 && v2) { lua_pushinteger(L, rpmverCmp(v1...
rpm_vercmp
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmhookArgs rpmhookArgsFree(rpmhookArgs args) { if (args) free(args); return 0; }
rpmhookArgs rpmhookArgsFree(rpmhookArgs args) { if (args != NULL) free(args); return NULL; }
rpmhookArgsFree
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmhookArgs rpmhookArgsNew(int argc) { rpmhookArgs result; result = (rpmhookArgs)rcalloc(1u, 8 * (argc - 1 + 3LL)); result->argc = argc; return result; }
rpmhookArgs rpmhookArgsNew(int argc) { rpmhookArgs args = (rpmhookArgs)xcalloc(1, sizeof(*args) + sizeof(args->argv) * (argc - 1)); args->argc = argc; return args; }
rpmhookArgsNew
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmhookArgs rpmhookArgsParse(const char *argt, __va_list_tag *ap) { int v2; int v3; rpmhookArgv *overflow_arg_area; int *v5; double *v6; float v7; rpmhookArgv *v8; int i; rpmhookArgs args; v2 = strlen(argt); args = rpmhookArgsNew(v2); args->argt = argt; for (i = 0; i != args->argc; ++i) { ...
static rpmhookArgs rpmhookArgsParse(const char *argt, va_list ap) { rpmhookArgs args = rpmhookArgsNew(strlen(argt)); int i; args->argt = argt; for (i = 0; i != args->argc; i++) { switch (argt[i]) { case 's': args->argv[i].s = va_arg(ap, char *); break; case 'i': args->argv[i].i = ...
rpmhookArgsParse
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmhookCall(const char *name, const char *argt, ...) { long v2; long v3; long v4; long v5; rpmhookArgs_s *args; va_list ap; unsigned long v8; long v9; long v10; long v11; long v12; va_start(ap, argt); v2 = va_arg(ap, _QWORD); v3 = va_arg(ap, _QWORD); v4 = va_arg(ap, _QWORD); v5 = v...
void rpmhookCall(const char *name, const char *argt, ...) { if (globalTable != NULL) { rpmhookArgs args; va_list ap; va_start(ap, argt); args = rpmhookArgsParse(argt, ap); rpmhookTableCallArgs(&globalTable, name, args); (void)rpmhookArgsFree(args); va_end(ap); } }
rpmhookCall
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmhookCallArgs(const char *name, rpmhookArgs args) { if (globalTable) rpmhookTableCallArgs(&globalTable, name, args); }
void rpmhookCallArgs(const char *name, rpmhookArgs args) { if (globalTable != NULL) rpmhookTableCallArgs(&globalTable, name, args); }
rpmhookCallArgs
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmhookRegister(const char *name, rpmhookFunc func, void *data) { if (!globalTable) globalTable = rpmhookTableNew(256); rpmhookTableAddItem(&globalTable, name, func, data); }
void rpmhookRegister(const char *name, rpmhookFunc func, void *data) { if (globalTable == NULL) globalTable = rpmhookTableNew(RPMHOOK_TABLE_INITSIZE); rpmhookTableAddItem(&globalTable, name, func, data); }
rpmhookRegister
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmhookTableAddItem(rpmhookTable *table, const char *name, rpmhookFunc func, void *data) { int n; rpmhookItem *item; rpmhookBucket bucket; n = rpmhookTableFindBucket(table, name); item = &(*table)->bucket[n].item; if (!(*table)->bucket[n].name) { bucket = &(*table)->bucket...
static void rpmhookTableAddItem(rpmhookTable *table, const char *name, rpmhookFunc func, void *data) { int n = rpmhookTableFindBucket(table, name); rpmhookBucket bucket = &(*table)->bucket[n]; rpmhookItem *item = &bucket->item; if (!bucket->name) { bucket->name = xstrdup(name...
rpmhookTableAddItem
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmhookTableCallArgs(rpmhookTable *table, const char *name, rpmhookArgs args) { rpmhookItem item; rpmhookItem next; for (item = (*table)->bucket[rpmhookTableFindBucket(table, name)].item; item; item = next) { next = item->next; if (item->func(args, item->data)) ...
static void rpmhookTableCallArgs(rpmhookTable *table, const char *name, rpmhookArgs args) { int n = rpmhookTableFindBucket(table, name); rpmhookItem item = (*table)->bucket[n].item; rpmhookItem next; while (item) { next = item->next; if (item->func(args, item->data) != 0...
rpmhookTableCallArgs
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmhookTableDelItem(rpmhookTable *table, const char *name, rpmhookFunc func, void *data, int matchfunc, int matchdata) { char *v6; rpmhookItem item; rpmhookItem lastItem; rpmhookBucket bucket; rpmhookItem nextItem; v6 = (char *)*table + 24 * rpmhookTab...
static void rpmhookTableDelItem(rpmhookTable *table, const char *name, rpmhookFunc func, void *data, int matchfunc, int matchdata) { int n = rpmhookTableFindBucket(table, name); rpmhookBucket bucket = &(*table)->bucket[n]; rpmhookItem item = bucket->...
rpmhookTableDelItem
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmhookTableFindBucket(rpmhookTable *table, const char *name) { unsigned char *v2; int ret; unsigned long perturb; unsigned long hash; unsigned char *bp_0; rpmhookBucket bucket; unsigned char *be; hash = 0; bp_0 = (unsigned char *)name; be = (unsigned char *)&name[strlen(name)]; if (3 * ((*ta...
static int rpmhookTableFindBucket(rpmhookTable *table, const char *name) { unsigned long perturb; unsigned long hash = 0; unsigned char *bp = (unsigned char *)name; unsigned char *be = bp + strlen(name); rpmhookBucket bucket; int ret; if (((*table)->used / 2) * 3 > (*table)->size) rpmhookTableRehash...
rpmhookTableFindBucket
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmhookTable rpmhookTableNew(int size) { rpmhookTable result; result = (rpmhookTable)rcalloc(1u, 24LL * (size - 1) + 32); result->size = size; return result; }
static rpmhookTable rpmhookTableNew(int size) { rpmhookTable table = (rpmhookTable)xcalloc( 1, sizeof(*table) + sizeof(table->bucket) * (size - 1)); table->size = size; return table; }
rpmhookTableNew
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmhookTableRehash(rpmhookTable *table) { int i; int n; rpmhookTable newtable[2]; newtable[1] = (rpmhookTable)__readfsqword(0x28u); newtable[0] = rpmhookTableNew(2 * (*table)->size); for (i = 0; i != (*table)->size; ++i) { if ((*table)->bucket[i].name) { n = rpmhookTableFindBucket(newtable, ...
static void rpmhookTableRehash(rpmhookTable *table) { rpmhookTable newtable = rpmhookTableNew((*table)->size * 2); int n, i = 0; for (; i != (*table)->size; i++) { if ((*table)->bucket[i].name == NULL) continue; n = rpmhookTableFindBucket(&newtable, (*table)->bucket[i].name); newtable->bucket[n...
rpmhookTableRehash
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmhookUnregister(const char *name, rpmhookFunc func, void *data) { if (globalTable) rpmhookTableDelItem(&globalTable, name, func, data, 1, 1); }
void rpmhookUnregister(const char *name, rpmhookFunc func, void *data) { if (globalTable != NULL) rpmhookTableDelItem(&globalTable, name, func, data, 1, 1); }
rpmhookUnregister
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmhookUnregisterAll(const char *name) { if (globalTable) rpmhookTableDelItem(&globalTable, name, 0, 0, 0, 0); }
void rpmhookUnregisterAll(const char *name) { if (globalTable != NULL) rpmhookTableDelItem(&globalTable, name, NULL, NULL, 0, 0); }
rpmhookUnregisterAll
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmhookUnregisterAny(const char *name, rpmhookFunc func) { if (globalTable) rpmhookTableDelItem(&globalTable, name, func, 0, 1, 0); }
void rpmhookUnregisterAny(const char *name, rpmhookFunc func) { if (globalTable != NULL) rpmhookTableDelItem(&globalTable, name, func, NULL, 1, 0); }
rpmhookUnregisterAny
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmioMkpath(const char *path, mode_t mode, uid_t uid, gid_t gid) { long gida; int rc; char *d; char *de; stat st; unsigned long v10; HIDWORD(gida) = uid; LODWORD(gida) = gid; v10 = __readfsqword(0x28u); if (!path || !*path) return -1; d = rstrcat(0, path); if (d[strlen(d) - 1] != 47) ...
int rpmioMkpath(const char *path, mode_t mode, uid_t uid, gid_t gid) { char *d, *de; int rc; if (path == NULL || *path == '\0') return -1; d = rstrcat(NULL, path); if (d[strlen(d) - 1] != '/') { rstrcat(&d, "/"); } de = d; for (; (de = strchr(de + 1, '/'));) { struct stat st; *de = '\0'...
rpmioMkpath
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmioSlurp(const char *fn, uint8_t **bp_0, ssize_t *blenp) { ssize_t v3; int rc; int nb; ssize_t blen; uint8_t *b; _FD_s *fd; off_t size; blen = 0; b = 0; rc = 0; fd = Fopen(fn, "r.ufdio"); if (fd && !Ferror(fd)) { size = fdSize(fd); if (size < 0) v3 = blenmax_0; else ...
int rpmioSlurp(const char *fn, uint8_t **bp, ssize_t *blenp) { static const ssize_t blenmax = (32 * BUFSIZ); ssize_t blen = 0; uint8_t *b = NULL; ssize_t size; FD_t fd; int rc = 0; fd = Fopen(fn, "r.ufdio"); if (fd == NULL || Ferror(fd)) { rc = 2; goto exit; } size = fdSize(fd); blen = (...
rpmioSlurp
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmlog(int code, const char *fmt, ...) { long v2; long v3; long v4; long v5; int saved_errno; int n; char *msg; rpmlogRec_s rec; va_list ap; unsigned long v11; long v12; long v13; long v14; long v15; va_start(ap, fmt); v2 = va_arg(ap, _QWORD); v3 = va_arg(ap, _QWORD); v4 = va_a...
void rpmlog(int code, const char *fmt, ...) { int saved_errno = errno; unsigned pri = RPMLOG_PRI(code); unsigned mask = RPMLOG_MASK(pri); int saverec = (pri <= RPMLOG_WARNING); va_list ap; int n; if ((mask & rpmlogSetMask(0)) == 0) goto exit; va_start(ap, fmt); n = vsnprintf(NULL, 0, fmt, ap); ...
rpmlog
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmlogClose() { int i; rpmlogCtx ctx; rpmlogRec rec; ctx = rpmlogCtxAcquire(1); if (ctx) { for (i = 0; i < ctx->nrecs; ++i) { rec = &ctx->recs[i]; rec->message = (char *)rfree(rec->message); } ctx->recs = (rpmlogRec)rfree(ctx->recs); ctx->nrecs = 0; rpmlogCtxRelease(ctx);...
void rpmlogClose(void) { rpmlogCtx ctx = rpmlogCtxAcquire(1); if (ctx == NULL) return; for (int i = 0; i < ctx->nrecs; i++) { rpmlogRec rec = ctx->recs + i; rec->message = _free(rec->message); } ctx->recs = _free(ctx->recs); ctx->nrecs = 0; rpmlogCtxRelease(ctx); }
rpmlogClose
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmlogCode() { int code; rpmlogCtx ctx; code = -1; ctx = rpmlogCtxAcquire(0); if (ctx && ctx->recs && ctx->nrecs > 0) code = ctx->recs[ctx->nrecs - 1].code; rpmlogCtxRelease(ctx); return code; }
int rpmlogCode(void) { int code = -1; rpmlogCtx ctx = rpmlogCtxAcquire(0); if (ctx && ctx->recs != NULL && ctx->nrecs > 0) code = ctx->recs[ctx->nrecs - 1].code; rpmlogCtxRelease(ctx); return code; }
rpmlogCode
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmlogCtx rpmlogCtxAcquire(int write) { int xx; if (write) xx = pthread_rwlock_wrlock(&globalCtx_1.lock); else xx = pthread_rwlock_rdlock(&globalCtx_1.lock); if (xx) return 0; else return &globalCtx_1; }
static rpmlogCtx rpmlogCtxAcquire(int write) { static struct rpmlogCtx_s _globalCtx = {PTHREAD_RWLOCK_INITIALIZER, RPMLOG_UPTO(RPMLOG_NOTICE), 0, NULL, ...
rpmlogCtxAcquire
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmlogCtx rpmlogCtxRelease(rpmlogCtx ctx) { if (ctx) pthread_rwlock_unlock(&ctx->lock); return 0; }
static rpmlogCtx rpmlogCtxRelease(rpmlogCtx ctx) { if (ctx) pthread_rwlock_unlock(&ctx->lock); return NULL; }
rpmlogCtxRelease
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmlogDefault(FILE *stdlog, rpmlogRec rec) { FILE *v2; int ColorConfig; int v4; rpmlogLvl pri; FILE *v6; const char *v7; const char *v8; rpmlogLvl v9; FILE *msgout; const char *colorOn; if (stdlog) v2 = stdlog; else v2 = stderr; msgout = v2; colorOn = 0; if (*(int *)__tls_get_...
static int rpmlogDefault(FILE *stdlog, rpmlogRec rec) { FILE *msgout = (stdlog ? stdlog : stderr); static __thread int color = -1; const char *colorOn = NULL; if (color < 0) color = getColorConfig(); if (color == COLOR_ALWAYS || (color == COLOR_AUTO && isatty(fileno(msgout)))) colorOn = rpmlogLevelC...
rpmlogDefault
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmlogGetNrecs() { int nrecs; rpmlogCtx ctx; ctx = rpmlogCtxAcquire(0); nrecs = -1; if (ctx) nrecs = ctx->nrecs; rpmlogCtxRelease(ctx); return nrecs; }
int rpmlogGetNrecs(void) { rpmlogCtx ctx = rpmlogCtxAcquire(0); int nrecs = -1; if (ctx) nrecs = ctx->nrecs; rpmlogCtxRelease(ctx); return nrecs; }
rpmlogGetNrecs
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
const char *rpmlogLevelColor(rpmlogLvl pri) { return rpmlogMsgPrefixColor[pri & 7]; }
static const char *rpmlogLevelColor(rpmlogLvl pri) { return rpmlogMsgPrefixColor[pri & 0x7]; }
rpmlogLevelColor
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
const char *rpmlogLevelPrefix(rpmlogLvl pri) { const char *prefix; prefix = (const char *)&unk_321E6; if (rpmlogMsgPrefix[pri] && *rpmlogMsgPrefix[pri]) return dgettext("rpm", rpmlogMsgPrefix[pri]); return prefix; }
const char *rpmlogLevelPrefix(rpmlogLvl pri) { const char *prefix = ""; if (rpmlogMsgPrefix[pri] && *rpmlogMsgPrefix[pri]) prefix = _(rpmlogMsgPrefix[pri]); return prefix; }
rpmlogLevelPrefix
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
const char *rpmlogMessage() { char *msg; rpmlogCtx ctx; msg = dgettext("rpm", "(no error)"); ctx = rpmlogCtxAcquire(0); if (ctx && ctx->recs && ctx->nrecs > 0) msg = ctx->recs[ctx->nrecs - 1].message; rpmlogCtxRelease(ctx); return msg; }
const char *rpmlogMessage(void) { const char *msg = _("(no error)"); rpmlogCtx ctx = rpmlogCtxAcquire(0); if (ctx && ctx->recs != NULL && ctx->nrecs > 0) msg = ctx->recs[ctx->nrecs - 1].message; rpmlogCtxRelease(ctx); return msg; }
rpmlogMessage
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmlogOpen(const char *ident, int option, int facility) { ; }
void rpmlogOpen(const char *ident, int option, int facility) {}
rpmlogOpen
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmlogPrint(FILE *f) { FILE *fa; int i; rpmlogCtx ctx; rpmlogRec rec; fa = f; ctx = rpmlogCtxAcquire(0); if (ctx) { if (!f) fa = stderr; for (i = 0; i < ctx->nrecs; ++i) { rec = &ctx->recs[i]; if (rec->message) { if (*rec->message) fprintf(fa, " %s", re...
void rpmlogPrint(FILE *f) { rpmlogCtx ctx = rpmlogCtxAcquire(0); if (ctx == NULL) return; if (f == NULL) f = stderr; for (int i = 0; i < ctx->nrecs; i++) { rpmlogRec rec = ctx->recs + i; if (rec->message && *rec->message) fprintf(f, " %s", rec->message); } rpmlogCtxRelease(ctx);...
rpmlogPrint
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
const char *rpmlogRecMessage(rpmlogRec rec) { if (rec) return rec->message; else return 0; }
const char *rpmlogRecMessage(rpmlogRec rec) { return (rec != NULL) ? rec->message : NULL; }
rpmlogRecMessage
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmlogLvl rpmlogRecPriority(rpmlogRec rec) { if (rec) return rec->pri; else return -1; }
rpmlogLvl rpmlogRecPriority(rpmlogRec rec) { return (rec != NULL) ? rec->pri : (rpmlogLvl)-1; }
rpmlogRecPriority
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmlogCallback rpmlogSetCallback(rpmlogCallback cb, rpmlogCallbackData data) { int (*ocb)(rpmlogRec, rpmlogCallbackData); rpmlogCtx ctx; ctx = rpmlogCtxAcquire(1); ocb = 0; if (ctx) { ocb = ctx->cbfunc; ctx->cbfunc = cb; ctx->cbdata = data; } rpmlogCtxRelease(ctx); return ocb; }
rpmlogCallback rpmlogSetCallback(rpmlogCallback cb, rpmlogCallbackData data) { rpmlogCtx ctx = rpmlogCtxAcquire(1); rpmlogCallback ocb = NULL; if (ctx) { ocb = ctx->cbfunc; ctx->cbfunc = cb; ctx->cbdata = data; } rpmlogCtxRelease(ctx); return ocb; }
rpmlogSetCallback
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
FILE *rpmlogSetFile(FILE *fp) { FILE *ofp; rpmlogCtx ctx; ctx = rpmlogCtxAcquire(1); ofp = 0; if (ctx) { ofp = ctx->stdlog; ctx->stdlog = fp; } rpmlogCtxRelease(ctx); return ofp; }
FILE *rpmlogSetFile(FILE *fp) { rpmlogCtx ctx = rpmlogCtxAcquire(1); FILE *ofp = NULL; if (ctx) { ofp = ctx->stdlog; ctx->stdlog = fp; } rpmlogCtxRelease(ctx); return ofp; }
rpmlogSetFile
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmlogSetMask(int mask) { int omask; rpmlogCtx ctx; ctx = rpmlogCtxAcquire(mask != 0); omask = -1; if (ctx) { omask = ctx->mask; if (mask) ctx->mask = mask; } rpmlogCtxRelease(ctx); return omask; }
int rpmlogSetMask(int mask) { rpmlogCtx ctx = rpmlogCtxAcquire(mask ? 1 : 0); int omask = -1; if (ctx) { omask = ctx->mask; if (mask) ctx->mask = mask; } rpmlogCtxRelease(ctx); return omask; }
rpmlogSetMask
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmluaCheckScript(rpmlua _lua, const char *script, const char *name) { rpmlua v3; size_t v4; long v5; char *v6; int ret; lua_State *L; if (_lua) { v3 = _lua; } else { if (!globalLuaState) globalLuaState = rpmluaNew(); v3 = globalLuaState; } L = v3->L; ret = 0; if (!name) ...
int rpmluaCheckScript(rpmlua _lua, const char *script, const char *name) { INITSTATE(_lua, lua); lua_State *L = lua->L; int ret = 0; if (name == NULL) name = "<lua>"; if (luaL_loadbuffer(L, script, strlen(script), name) != 0) { rpmlog(RPMLOG_ERR, _("invalid syntax in lua scriptlet: %s\n"), ...
rpmluaCheckScript
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmlua rpmluaFree(rpmlua lua) { if (lua) { if (lua->L) lua_close(lua->L); free(lua->printbuf); free(lua); if (lua == globalLuaState) globalLuaState = 0; } return 0; }
rpmlua rpmluaFree(rpmlua lua) { if (lua) { if (lua->L) lua_close(lua->L); free(lua->printbuf); free(lua); if (lua == globalLuaState) globalLuaState = NULL; } return NULL; }
rpmluaFree
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void *rpmluaGetData(rpmlua _lua, const char *key) { rpmlua v2; if (_lua) { v2 = _lua; } else { if (!globalLuaState) globalLuaState = rpmluaNew(); v2 = globalLuaState; } return getdata(v2->L, key); }
void *rpmluaGetData(rpmlua _lua, const char *key) { INITSTATE(_lua, lua); return getdata(lua->L, key); }
rpmluaGetData
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmlua rpmluaGetGlobalState() { if (!globalLuaState) globalLuaState = rpmluaNew(); return globalLuaState; }
rpmlua rpmluaGetGlobalState(void) { INITSTATE(NULL, lua); return lua; }
rpmluaGetGlobalState
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void *rpmluaGetLua(rpmlua _lua) { rpmlua v1; if (_lua) { v1 = _lua; } else { if (!globalLuaState) globalLuaState = rpmluaNew(); v1 = globalLuaState; } return v1->L; }
void *rpmluaGetLua(rpmlua _lua) { INITSTATE(_lua, lua); return lua->L; }
rpmluaGetLua
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmluaHookWrapper(rpmhookArgs args, void *data) { int v2; long v3; char *v4; int ret; int i; lua_State *L; L = *(lua_State **)data; ret = 0; lua_rawgeti(*(_QWORD *)data, 4293966296LL, *((int *)data + 2)); lua_createtable(L, 0, 0); for (i = 0; i != args->argc; ++i) { v2 = args->argt[i]; ...
static int rpmluaHookWrapper(rpmhookArgs args, void *data) { rpmluaHookData hookdata = (rpmluaHookData)data; lua_State *L = hookdata->L; int ret = 0; int i; lua_rawgeti(L, LUA_REGISTRYINDEX, hookdata->funcRef); lua_newtable(L); for (i = 0; i != args->argc; i++) { switch (args->argt[i]) { case 's':...
rpmluaHookWrapper
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmlua rpmluaNew() { const char *v1; const char *v2; const luaL_Reg *lib; rpmlua lua; char *initlua; lua_State *L; stat st; unsigned long v8; v8 = __readfsqword(0x28u); L = (lua_State *)luaL_newstate(); if (!L) return 0; luaL_openlibs(L); lua = (rpmlua)rcalloc(1u, 0x18u); lua->L = L; ...
rpmlua rpmluaNew() { rpmlua lua = NULL; struct stat st; const luaL_Reg *lib; char *initlua = NULL; static const luaL_Reg extlibs[] = { {"posix", luaopen_posix}, {"rex", luaopen_rex}, {"rpm", luaopen_rpm}, {NULL, NULL}, }; lua_State *L = luaL_newstate(); if (!L) return NULL;...
rpmluaNew
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
char *rpmluaPopPrintBuffer(rpmlua _lua) { rpmlua v1; char *ret; rpmluapb prbuf; if (_lua) { v1 = _lua; } else { if (!globalLuaState) globalLuaState = rpmluaNew(); v1 = globalLuaState; } prbuf = v1->printbuf; ret = 0; if (prbuf) { ret = prbuf->buf; v1->printbuf = prbuf->next;...
char *rpmluaPopPrintBuffer(rpmlua _lua) { INITSTATE(_lua, lua); rpmluapb prbuf = lua->printbuf; char *ret = NULL; if (prbuf) { ret = prbuf->buf; lua->printbuf = prbuf->next; free(prbuf); } return ret; }
rpmluaPopPrintBuffer
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmluaPushPrintBuffer(rpmlua _lua) { rpmlua v1; rpmlua lua; rpmluapb prbuf; if (_lua) { v1 = _lua; } else { if (!globalLuaState) globalLuaState = rpmluaNew(); v1 = globalLuaState; } lua = v1; prbuf = (rpmluapb)rcalloc(1u, 0x20u); prbuf->buf = 0; prbuf->alloced = 0; prbuf->u...
void rpmluaPushPrintBuffer(rpmlua _lua) { INITSTATE(_lua, lua); rpmluapb prbuf = xcalloc(1, sizeof(*prbuf)); prbuf->buf = NULL; prbuf->alloced = 0; prbuf->used = 0; prbuf->next = lua->printbuf; lua->printbuf = prbuf; }
rpmluaPushPrintBuffer
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmluaReadline(lua_State *L, const char *prompt) { if (prompt) { fputs(prompt, stdout); fflush(stdout); } if (!fgets(buffer_2, 1024, stdin)) return 0; lua_pushstring(L, buffer_2); return 1; }
static int rpmluaReadline(lua_State *L, const char *prompt) { static char buffer[1024]; if (prompt) { (void)fputs(prompt, stdout); (void)fflush(stdout); } if (fgets(buffer, sizeof(buffer), stdin) == NULL) { return 0; } else { lua_pushstring(L, buffer); return 1; } }
rpmluaReadline
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmluaRegister(rpmlua lua, const void *regfuncs, const char *lib) { lua_getfield(lua->L, 4293966296LL, "_LOADED"); lua_getfield(lua->L, 0xFFFFFFFFLL, lib); luaL_setfuncs(lua->L, regfuncs, 0); lua_settop(lua->L, 4294967293LL); }
void rpmluaRegister(rpmlua lua, const void *regfuncs, const char *lib) { const luaL_Reg *funcs = regfuncs; lua_getfield(lua->L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE); lua_getfield(lua->L, -1, lib); luaL_setfuncs(lua->L, funcs, 0); lua_pop(lua->L, 2); }
rpmluaRegister
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmluaRunScript(rpmlua _lua, const char *script, const char *name, const char *opts, ARGV_t args) { rpmlua v5; size_t v6; long v7; char *v8; char *v9; int v10; long v11; char *v12; const char *scripta; int ret; int oind; int i; int argc; ARGV_const_t arg; lua_State ...
int rpmluaRunScript(rpmlua _lua, const char *script, const char *name, const char *opts, ARGV_t args) { INITSTATE(_lua, lua); lua_State *L = lua->L; int ret = -1; int oind = 0; static const char *lualocal = "local opt = select(1, ...); local arg = select(2, ...);"; if (name == NUL...
rpmluaRunScript
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmluaRunScriptFile(rpmlua _lua, const char *filename) { rpmlua v2; long v3; char *v4; long v5; char *v6; int ret; lua_State *L; if (_lua) { v2 = _lua; } else { if (!globalLuaState) globalLuaState = rpmluaNew(); v2 = globalLuaState; } L = v2->L; ret = 0; if ((unsigned in...
int rpmluaRunScriptFile(rpmlua _lua, const char *filename) { INITSTATE(_lua, lua); lua_State *L = lua->L; int ret = 0; if (luaL_loadfile(L, filename) != 0) { rpmlog(RPMLOG_ERR, _("invalid syntax in lua file: %s\n"), lua_tostring(L, -1)); lua_pop(L, 1); ret = -1; } else if (lua_pcall(L, ...
rpmluaRunScriptFile
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmluaSetData(rpmlua _lua, const char *key, const void *data) { rpmlua v3; lua_State *L; if (_lua) { v3 = _lua; } else { if (!globalLuaState) globalLuaState = rpmluaNew(); v3 = globalLuaState; } L = v3->L; lua_pushstring(v3->L, "rpm_"); lua_pushstring(L, key); lua_concat(L, 2);...
void rpmluaSetData(rpmlua _lua, const char *key, const void *data) { INITSTATE(_lua, lua); lua_State *L = lua->L; lua_pushliteral(L, "rpm_"); lua_pushstring(L, key); lua_concat(L, 2); if (data == NULL) lua_pushnil(L); else lua_pushlightuserdata(L, (void *)data); lua_rawset(L, LUA_REGISTRYINDEX);...
rpmluaSetData
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmluaSetNextFileFunc(char *(*func)(void *), void *funcParam) { nextFileFunc = func; nextFileFuncParam = funcParam; }
void rpmluaSetNextFileFunc(char *(*func)(void *), void *funcParam) { nextFileFunc = func; nextFileFuncParam = funcParam; }
rpmluaSetNextFileFunc
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmMacroContext rpmmctxAcquire(rpmMacroContext mc) { rpmMacroContext mca; mca = mc; if (!mc) mca = rpmGlobalMacroContext; pthread_once(&locksInitialized, initLocks); pthread_mutex_lock(&mca->lock); return mca; }
static rpmMacroContext rpmmctxAcquire(rpmMacroContext mc) { if (mc == NULL) mc = rpmGlobalMacroContext; pthread_once(&locksInitialized, initLocks); pthread_mutex_lock(&mc->lock); return mc; }
rpmmctxAcquire
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmMacroContext rpmmctxRelease(rpmMacroContext mc) { pthread_mutex_unlock(&mc->lock); return 0; }
static rpmMacroContext rpmmctxRelease(rpmMacroContext mc) { pthread_mutex_unlock(&mc->lock); return NULL; }
rpmmctxRelease
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmsigGet(int signum, rpmsig_s **sig) { rpmsig_s *tbl; for (tbl = rpmsigTbl; tbl->signum >= 0; ++tbl) { if (signum == tbl->signum) { *sig = tbl; return 1; } } return 0; }
static int rpmsigGet(int signum, struct rpmsig_s **sig) { for (rpmsig tbl = rpmsigTbl; tbl->signum >= 0; tbl++) { if (tbl->signum == signum) { *sig = tbl; return 1; } } return 0; }
rpmsigGet
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmsqActivate(int state) { rpmsig tbl; rpmsig tbl_0; sigset_t newMask; sigset_t oldMask; sigaction sa; unsigned long v7; v7 = __readfsqword(0x28u); if (disableInterruptSafety) return 0; sigfillset(&newMask); pthread_sigmask(0, &newMask, &oldMask); if (state) { for (tbl = rpmsigTbl; tb...
int rpmsqActivate(int state) { sigset_t newMask, oldMask; if (disableInterruptSafety) return 0; (void)sigfillset(&newMask); (void)pthread_sigmask(SIG_BLOCK, &newMask, &oldMask); if (state) { struct sigaction sa; for (rpmsig tbl = rpmsigTbl; tbl->signum >= 0; tbl++) { sigdelset(&rpmsqCaugh...
rpmsqActivate
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmsqBlock(int op) { int ret; sigset_t newMask; unsigned long v4; v4 = __readfsqword(0x28u); ret = 0; if (op) { if (op == 1) { if (--blocked_1) { if (blocked_1 < 0) { blocked_1 = 0; return -1; } } else { ret = pthread_sigmask(2, &oldMask_0, 0)...
int rpmsqBlock(int op) { static sigset_t oldMask; static int blocked = 0; sigset_t newMask; int ret = 0; if (op == SIG_BLOCK) { blocked++; if (blocked == 1) { sigfillset(&newMask); sigdelset(&newMask, SIGABRT); sigdelset(&newMask, SIGBUS); sigdelset(&newMask, SIGFPE); si...
rpmsqBlock
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmsqHandler(int signum, siginfo_t *info, void *context) { int save; rpmsig sig[2]; sig[1] = (rpmsig)__readfsqword(0x28u); save = *__errno_location(); if (sigismember(&rpmsqActive, signum)) { if (!sigismember(&rpmsqCaught, signum)) { sig[0] = 0; if (rpmsigGet(signum, sig)) { siga...
static void rpmsqHandler(int signum, siginfo_t *info, void *context) { int save = errno; if (sigismember(&rpmsqActive, signum)) { if (!sigismember(&rpmsqCaught, signum)) { rpmsig sig = NULL; if (rpmsigGet(signum, &sig)) { (void)sigaddset(&rpmsqCaught, signum); memcpy(&sig->siginfo, ...
rpmsqHandler
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmsqIgn(int signum, siginfo_t *info, void *context) { ; }
static void rpmsqIgn(int signum, siginfo_t *info, void *context) {}
rpmsqIgn
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmsqIsCaught(int signum) { return sigismember(&rpmsqCaught, signum); }
int rpmsqIsCaught(int signum) { return sigismember(&rpmsqCaught, signum); }
rpmsqIsCaught
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int rpmsqPoll() { void (*defhandler)(int, siginfo_t *, void *); int n; rpmsig tbl; rpmsqAction_t handler; sigset_t newMask; sigset_t oldMask; unsigned long v7; v7 = __readfsqword(0x28u); n = 0; sigfillset(&newMask); pthread_sigmask(0, &newMask, &oldMask); for (tbl = rpmsigTbl; tbl->signum >= 0;...
int rpmsqPoll(void) { sigset_t newMask, oldMask; int n = 0; (void)sigfillset(&newMask); (void)pthread_sigmask(SIG_BLOCK, &newMask, &oldMask); for (rpmsig tbl = rpmsigTbl; tbl->signum >= 0; tbl++) { if (sigismember(&oldMask, tbl->signum)) continue; if (sigismember(&rpmsqCaught, tbl->signum)) {...
rpmsqPoll
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmsqAction_t rpmsqSetAction(int signum, rpmsqAction_t handler) { void (*v2)(int, siginfo_t *, void *); rpmsig sig; rpmsqAction_t oh; unsigned long v6; v6 = __readfsqword(0x28u); sig = 0; oh = (rpmsqAction_t)-1LL; if (rpmsigGet(signum, &sig)) { oh = sig->handler; if (handler == (rpmsqAction_t)(...
rpmsqAction_t rpmsqSetAction(int signum, rpmsqAction_t handler) { rpmsig sig = NULL; rpmsqAction_t oh = RPMSQ_ERR; if (rpmsigGet(signum, &sig)) { oh = sig->handler; sig->handler = (handler == RPMSQ_IGN) ? rpmsqIgn : handler; } return oh; }
rpmsqSetAction
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmsqSetInterruptSafety(int on) { disableInterruptSafety = on == 0; }
void rpmsqSetInterruptSafety(int on) { disableInterruptSafety = !on; }
rpmsqSetInterruptSafety
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmsqTerm(int signum, siginfo_t *info, void *context) { int v3; unsigned int v4; char *v5; int lvl; if (info->_sifields._pad[0]) { if (signum == 13) v3 = 7; else v3 = 4; lvl = v3; v4 = info->_sifields._pad[0]; v5 = dgettext("rpm", "exiting on signal %d from pid %d\n"); ...
static void rpmsqTerm(int signum, siginfo_t *info, void *context) { if (info->si_pid == 0) { rpmlog(RPMLOG_DEBUG, "exiting on signal %d (killed by death, eh?)\n", signum); } else { int lvl = (signum == SIGPIPE) ? RPMLOG_DEBUG : RPMLOG_WARNING; rpmlog(lvl, _("exiting on signal %d from pid %d\n...
rpmsqTerm
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmstrPool rpmstrPoolCreate() { void **v0; rpmstrPool pool; pool = (rpmstrPool)rcalloc(1u, 0x80u); pool->offs_alloced = 2048; pool->offs = (const char **)rcalloc(pool->offs_alloced, 8u); pool->chunks_allocated = 1024; pool->chunks = (char **)rcalloc(pool->chunks_allocated, 8u); pool->chunks_size = 1; ...
rpmstrPool rpmstrPoolCreate(void) { rpmstrPool pool = xcalloc(1, sizeof(*pool)); pool->offs_alloced = STROFFS_CHUNK; pool->offs = xcalloc(pool->offs_alloced, sizeof(*pool->offs)); pool->chunks_allocated = STRDATA_CHUNKS; pool->chunks = xcalloc(pool->chunks_allocated, sizeof(*pool->chunks)); pool->chunks_s...
rpmstrPoolCreate
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmstrPool rpmstrPoolFree(rpmstrPool pool) { void **v1; int i; if (pool) { poolLock(pool, 1); if (pool->nrefs <= 1) { if (pool_debug) poolHashPrintStats(pool); poolHashFree(pool->hash); free(pool->offs); for (i = 1; i <= pool->chunks_size; ++i) { v1 = (void **)&poo...
rpmstrPool rpmstrPoolFree(rpmstrPool pool) { if (pool) { poolLock(pool, 1); if (pool->nrefs > 1) { pool->nrefs--; poolUnlock(pool); } else { if (pool_debug) poolHashPrintStats(pool); poolHashFree(pool->hash); free(pool->offs); for (int i = 1; i <= pool->chunks_s...
rpmstrPoolFree
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void rpmstrPoolFreeze(rpmstrPool pool, int keephash) { if (pool) { poolLock(pool, 1); if (!pool->frozen) { if (!keephash) pool->hash = poolHashFree(pool->hash); pool->offs_alloced = pool->offs_size + 2; pool->offs = (const char **)rrealloc(pool->offs, 8LL * pool->offs_alloc...
void rpmstrPoolFreeze(rpmstrPool pool, int keephash) { if (!pool) return; poolLock(pool, 1); if (!pool->frozen) { if (!keephash) { pool->hash = poolHashFree(pool->hash); } pool->offs_alloced = pool->offs_size + 2; pool->offs = xrealloc(pool->offs, pool->offs_alloced * sizeof(*pool->offs...
rpmstrPoolFreeze
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmsid rpmstrPoolGet(rpmstrPool pool, const char *key, size_t keylen, unsigned int keyHash) { unsigned int i; unsigned int hash; poolHash ht; const char *s; ht = pool->hash; for (i = 0;; ++i) { hash = hashbucket(keyHash, i) % ht->numBuckets; if (!ht->buckets[hash].keyid) ...
static rpmsid rpmstrPoolGet(rpmstrPool pool, const char *key, size_t keylen, unsigned int keyHash) { poolHash ht = pool->hash; const char *s; for (unsigned int i = 0;; i++) { unsigned int hash = hashbucket(keyHash, i) % ht->numBuckets; if (!ht->buckets[hash].keyid) { re...
rpmstrPoolGet
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmsid rpmstrPoolId(rpmstrPool pool, const char *s, int create) { rpmsid sid; unsigned int hash; size_t slen[2]; slen[1] = __readfsqword(0x28u); sid = 0; if (pool && s) { hash = rstrlenhash(s, slen); poolLock(pool, create); sid = strn2id(pool, s, slen[0], hash, create); poolUnlock(pool); ...
rpmsid rpmstrPoolId(rpmstrPool pool, const char *s, int create) { rpmsid sid = 0; if (pool && s) { size_t slen; unsigned int hash = rstrlenhash(s, &slen); poolLock(pool, create); sid = strn2id(pool, s, slen, hash, create); poolUnlock(pool); } return sid; }
rpmstrPoolId
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmsid rpmstrPoolIdn(rpmstrPool pool, const char *s, size_t slen, int create) { rpmsid sid; unsigned int hash; sid = 0; if (pool && s) { hash = rstrnhash(s, slen); poolLock(pool, create); sid = strn2id(pool, s, slen, hash, create); poolUnlock(pool); } return sid; }
rpmsid rpmstrPoolIdn(rpmstrPool pool, const char *s, size_t slen, int create) { rpmsid sid = 0; if (pool && s) { unsigned int hash = rstrnhash(s, slen); poolLock(pool, create); sid = strn2id(pool, s, slen, hash, create); poolUnlock(pool); } return sid; }
rpmstrPoolIdn
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmstrPool rpmstrPoolLink(rpmstrPool pool) { if (pool) { poolLock(pool, 1); ++pool->nrefs; poolUnlock(pool); } return pool; }
rpmstrPool rpmstrPoolLink(rpmstrPool pool) { if (pool) { poolLock(pool, 1); pool->nrefs++; poolUnlock(pool); } return pool; }
rpmstrPoolLink
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmsid rpmstrPoolNumStr(rpmstrPool pool) { rpmsid n; n = 0; if (pool) { poolLock(pool, 0); n = pool->offs_size; poolUnlock(pool); } return n; }
rpmsid rpmstrPoolNumStr(rpmstrPool pool) { rpmsid n = 0; if (pool) { poolLock(pool, 0); n = pool->offs_size; poolUnlock(pool); } return n; }
rpmstrPoolNumStr
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
rpmsid rpmstrPoolPut(rpmstrPool pool, const char *s, size_t slen, unsigned int hash) { char **v4; char *t; size_t ssize; ssize = slen + 1; if (pool->offs_alloced <= ++pool->offs_size) { pool->offs_alloced += 2048; pool->offs = (const char **)rrealloc(pool->offs, 8LL * pool->offs_...
static rpmsid rpmstrPoolPut(rpmstrPool pool, const char *s, size_t slen, unsigned int hash) { char *t = NULL; size_t ssize = slen + 1; pool->offs_size += 1; if (pool->offs_alloced <= pool->offs_size) { pool->offs_alloced += STROFFS_CHUNK; pool->offs = xrealloc(pool->offs, po...
rpmstrPoolPut
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0