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 |
|---|---|---|---|---|---|---|---|
uint16_t fts_stat(FTS *sp_0, FTSENT *p, int follow) {
stat *p_sb;
dev_t fts_dev;
ino_t fts_ino;
_ftsent *i;
int saved_errno;
stat *sbp;
stat sb;
unsigned long v11;
v11 = __readfsqword(0x28u);
if ((sp_0->fts_options & 8) != 0)
p_sb = &sb;
else
p_sb = p->fts_statp;
sbp = p_sb;
if ((sp_0... | static uint16_t fts_stat(FTS *sp, FTSENT *p, int follow) {
register FTSENT *t;
register dev_t dev;
register ino_t ino;
struct stat *sbp, sb;
int saved_errno;
sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
#if defined FTS_WHITEOUT && 0
if (p->fts_flags & FTS_ISW) {
if (sbp != &sb) {
memset(sbp,... | fts_stat | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
void genCpioListAndHeader(FileList fl, Package pkg, int isSrc) {
char *v3;
uint32_t v4;
char *v5;
const char *v6;
char *v7;
char *v8;
char *diskPath;
ARGV_t dpaths;
int v11;
long v12;
long v13;
int *v14;
char *v15;
char *v16;
char *v17;
char *v18;
char *v19;
char *v20;
char *v21;
... | static void genCpioListAndHeader(FileList fl, Package pkg, int isSrc) {
FileListRec flp;
char buf[BUFSIZ];
int i, npaths = 0;
int fail_on_dupes =
rpmExpandNumeric("%{?_duplicate_files_terminate_build}") > 0;
uint32_t defaultalgo = PGPHASHALGO_MD5, digestalgo;
rpm_loff_t totalFileSize = 0;
Header h =... | genCpioListAndHeader | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
void genSourceRpmName(rpmSpec spec) {
const char *v1;
char *nvr;
if (!spec->sourceRpmName) {
nvr = (char *)headerGetAsString(spec->packages->header, 5014);
if (spec->noSource)
v1 = "no";
else
v1 = byte_2DA9A;
rasprintf(&spec->sourceRpmName, "%s.%ssrc.rpm", nvr, v1);
free(nvr);
}... | static void genSourceRpmName(rpmSpec spec) {
if (spec->sourceRpmName == NULL) {
char *nvr = headerGetAsString(spec->packages->header, RPMTAG_NVR);
rasprintf(&spec->sourceRpmName, "%s.%ssrc.rpm", nvr,
spec->noSource ? "no" : "");
free(nvr);
}
} | genSourceRpmName | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int generateBuildIDs(FileList fl, ARGV_t *files) {
char *v2;
char *v3;
_BOOL4 v5;
int v6;
char **v7;
char **v8;
unsigned char *v9;
int v10;
long v11;
char *v12;
char *v13;
long v14;
char *diskPath;
char *v16;
unsigned int v17;
char *v18;
int v19;
int v20;
int v21;
int dups;
int... | static int generateBuildIDs(FileList fl, ARGV_t *files) {
int rc = 0;
int i;
FileListRec flp;
char **ids = NULL;
char **paths = NULL;
size_t nr_ids, allocated;
nr_ids = allocated = 0;
char *build_id_links_macro = rpmExpand("%{?_build_id_links}", NULL);
int build_id_links;
if (*build_id_links_macro ... | generateBuildIDs | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpm_time_t getBuildTime() {
char *v0;
rpm_time_t buildTime;
char *endptr;
char *srcdate;
time_t epoch;
unsigned long v6;
v6 = __readfsqword(0x28u);
buildTime = 0;
srcdate = secure_getenv("SOURCE_DATE_EPOCH");
if (!srcdate ||
!(unsigned int)rpmExpandNumeric("%{?use_source_date_epoch_as_buildti... | static rpm_time_t getBuildTime(void) {
rpm_time_t buildTime = 0;
char *srcdate;
time_t epoch;
char *endptr;
srcdate = getenv("SOURCE_DATE_EPOCH");
if (srcdate && rpmExpandNumeric("%{?use_source_date_epoch_as_buildtime}")) {
errno = 0;
epoch = strtol(srcdate, &endptr, 10);
if (srcdate == endptr ... | getBuildTime | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
uint32_t getElfColor(const char *fn) {
uint32_t color;
int fd;
Elf *elf;
GElf_Ehdr ehdr;
unsigned long v6;
v6 = __readfsqword(0x28u);
color = 0;
fd = open(fn, 0);
if (fd >= 0) {
elf = (Elf *)elf_begin((unsigned int)fd, 1, 0);
if (elf && gelf_getehdr(elf, &ehdr)) {
if (ehdr.e_ident[4] ==... | static uint32_t getElfColor(const char *fn) {
uint32_t color = 0;
#ifdef HAVE_LIBELF
int fd = open(fn, O_RDONLY);
if (fd >= 0) {
Elf *elf = elf_begin(fd, ELF_C_READ, NULL);
GElf_Ehdr ehdr;
if (elf && gelf_getehdr(elf, &ehdr)) {
switch (ehdr.e_ident[EI_CLASS]) {
case ELFCLASS64:
col... | getElfColor | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
char *getIOFlags(Package pkg) {
char *v1;
char *rpmio_flags;
const char *compr;
char *s;
char *buf;
if ((unsigned int)headerIsSource(pkg->header))
rpmio_flags = (char *)rpmExpand("%{?_source_payload}", 0);
else
rpmio_flags = (char *)rpmExpand("%{?_binary_payload}", 0);
if (*rpmio_flags != 119) ... | static char *getIOFlags(Package pkg) {
char *rpmio_flags;
const char *s;
if (headerIsSource(pkg->header))
rpmio_flags = rpmExpand("%{?_source_payload}", NULL);
else
rpmio_flags = rpmExpand("%{?_binary_payload}", NULL);
if (rpmio_flags[0] != 'w') {
free(rpmio_flags);
rpmio_flags = xstrdup("w9... | getIOFlags | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int getOutputFrom(ARGV_t argv, const char *writePtr, size_t writeBytesLeft,
StringBuf sb_stdout, int failNonZero, const char *buildRoot) {
_BOOL4 v6;
char *v7;
char *v8;
int *v10;
char *v11;
char *v12;
char *v13;
__pid_t v14;
int *v15;
char *v16;
char *v17;
char *v18;
int v19... | static int getOutputFrom(ARGV_t argv, const char *writePtr,
size_t writeBytesLeft, StringBuf sb_stdout,
int failNonZero, const char *buildRoot) {
pid_t child, reaped;
int toProg[2] = {-1, -1};
int fromProg[2] = {-1, -1};
int status;
int myerrno = 0;
int ret ... | getOutputFrom | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC getPkgFilename(Header h, char **filename) {
const char *v2;
long String;
char *v4;
rpmRC rc;
const char *errorString;
char *binFormat;
char *binRpm;
unsigned long v10;
v10 = __readfsqword(0x28u);
binFormat = (char *)rpmGetPath("%{_rpmfilename}", 0);
binRpm = (char *)headerFormat(h, binForma... | static rpmRC getPkgFilename(Header h, char **filename) {
const char *errorString;
char *binFormat = rpmGetPath("%{_rpmfilename}", NULL);
char *binRpm = headerFormat(h, binFormat, &errorString);
rpmRC rc = RPMRC_FAIL;
if (binRpm == NULL) {
rpmlog(RPMLOG_ERR,
_("Could not generate output "
... | getPkgFilename | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
char *getSpecialDocDir(Header h, rpmFlags sdtype) {
const char *v2;
const char *v3;
char *v4;
const char *errstr;
char *fmt;
const char *dirtype;
const char *fmt_default;
char *fmt_macro;
char *res;
unsigned long v12;
v12 = __readfsqword(0x28u);
errstr = 0;
if (sdtype == 2)
v2 = "docdir";... | static char *getSpecialDocDir(Header h, rpmFlags sdtype) {
const char *errstr = NULL;
const char *dirtype = (sdtype == RPMFILE_DOC) ? "docdir" : "licensedir";
const char *fmt_default = "%{NAME}-%{VERSION}";
char *fmt_macro = rpmExpand("%{?_docdir_fmt}", NULL);
char *fmt = NULL;
char *res = NULL;
if (fmt_... | getSpecialDocDir | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
const char *getStringBuf(StringBuf sb) {
if (sb)
return sb->buf;
else
return 0;
} | const char *getStringBuf(StringBuf sb) { return (sb != NULL) ? sb->buf : NULL; } | getStringBuf | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int handleComments(char *s) {
while (*s && risspace_5(*s))
++s;
if (*s != 35)
return 0;
*s = 0;
return 1;
} | int handleComments(char *s) {
SKIPSPACE(s);
if (*s == '#') {
*s = '\0';
return 1;
}
return 0;
} | handleComments | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag,
const char *macro, const char *lang) {
char *v5;
unsigned int v6;
char *v7;
char *line;
unsigned int lineNum;
char *v10;
char *v11;
unsigned int v12;
char *v13;
char *v14;
unsigned int v15;
char *v16;
cha... | static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag,
const char *macro, const char *lang) {
char *field = spec->line;
char *end;
int multiToken = 0;
rpmsenseFlags tagflags = RPMSENSE_ANY;
rpmRC rc = RPMRC_FAIL;
if (field == NULL)
goto exit;
while ((... | handlePreambleTag | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int haveCharInDep(Package pkg, char c) {
int i;
const char *depstr;
rpmds ds_0;
const char *evr;
charInDepData data;
unsigned long v8;
v8 = __readfsqword(0x28u);
data.c = c;
data.present = 0;
for (i = 0; i <= 11; ++i) {
ds_0 = (rpmds)rpmdsInit(pkg->dependencies[i]);
while ((int)rpmdsNext(ds... | static int haveCharInDep(Package pkg, char c) {
struct charInDepData data = {c, 0};
for (int i = 0; i < PACKAGE_NUM_DEPS; i++) {
rpmds ds = rpmdsInit(pkg->dependencies[i]);
while (rpmdsNext(ds) >= 0) {
if (rpmdsIsRich(ds)) {
const char *depstr = rpmdsN(ds);
rpmrichParse(&depstr, NULL, ... | haveCharInDep | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int haveLangTag(Header h, rpmTagVal tag, const char *lang) {
int rc;
int langNum;
const char *s;
const char *s_0;
rpmtd_s td;
unsigned long v10;
v10 = __readfsqword(0x28u);
rc = 0;
langNum = -1;
if (lang && *lang) {
headerGet(h, 100, &td, 1);
while (1) {
s = (const char *)rpmtdNextStr... | static int haveLangTag(Header h, rpmTagVal tag, const char *lang) {
int rc = 0;
int langNum = -1;
if (lang && *lang) {
struct rpmtd_s langtd;
const char *s = NULL;
headerGet(h, RPMTAG_HEADERI18NTABLE, &langtd, HEADERGET_MINMEM);
while ((s = rpmtdNextString(&langtd)) != NULL) {
if (rstreq(s... | haveLangTag | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int haveModinfo(Elf *elf) {
int have_modinfo;
size_t shstrndx;
Elf_Scn *scn;
GElf_Shdr *shdr;
const char *sname;
GElf_Shdr shdr_mem;
unsigned long v8;
v8 = __readfsqword(0x28u);
scn = 0;
have_modinfo = 0;
if (!(unsigned int)elf_getshdrstrndx(elf, &shstrndx)) {
while (1) {
scn = (Elf_Scn... | static int haveModinfo(Elf *elf) {
Elf_Scn *scn = NULL;
size_t shstrndx;
int have_modinfo = 0;
const char *sname;
if (elf_getshdrstrndx(elf, &shstrndx) == 0) {
while ((scn = elf_nextscn(elf, scn)) != NULL) {
GElf_Shdr shdr_mem, *shdr = gelf_getshdr(scn, &shdr_mem);
if (shdr == NULL)
c... | haveModinfo | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int haveRichDep(Package pkg) {
int i;
rpmTagVal tagN;
rpmds ds_0;
for (i = 0; i <= 11; ++i) {
ds_0 = (rpmds)rpmdsInit(pkg->dependencies[i]);
tagN = rpmdsTagN(ds_0);
if (tagN == 1049 || tagN == 5046 || tagN == 5049 || tagN == 5052 ||
tagN == 5055 || tagN == 1054) {
while ((int)rpmdsNex... | static int haveRichDep(Package pkg) {
for (int i = 0; i < PACKAGE_NUM_DEPS; i++) {
rpmds ds = rpmdsInit(pkg->dependencies[i]);
rpmTagVal tagN = rpmdsTagN(ds);
if (tagN != RPMTAG_REQUIRENAME && tagN != RPMTAG_RECOMMENDNAME &&
tagN != RPMTAG_SUGGESTNAME && tagN != RPMTAG_SUPPLEMENTNAME &&
ta... | haveRichDep | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int initAttrs(rpmfc fc) {
size_t v1;
rpmfcAttr *v2;
int nattrs;
int i;
ARGV_t files;
char *attrPath;
char *bn;
unsigned long v9;
v9 = __readfsqword(0x28u);
files = 0;
attrPath = (char *)rpmExpand("%{_fileattrsdir}/*.attr", 0);
nattrs = 0;
if (!(unsigned int)rpmGlob(attrPath, 0, &files)) {
... | static int initAttrs(rpmfc fc) {
ARGV_t files = NULL;
char *attrPath = rpmExpand("%{_fileattrsdir}/*.attr", NULL);
int nattrs = 0;
if (rpmGlob(attrPath, NULL, &files) == 0) {
nattrs = argvCount(files);
fc->atypes = xcalloc(nattrs + 1, sizeof(*fc->atypes));
for (int i = 0; i < nattrs; i++) {
c... | initAttrs | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
void initSourceHeader(rpmSpec spec) {
long v1;
long v2;
int i;
Source *srcPtr;
Package p;
Package sourcePkg;
HeaderIterator hi;
Header h;
uint32_t dsflags[10];
unsigned long v10;
v10 = __readfsqword(0x28u);
sourcePkg = spec->sourcePackage;
if (!(unsigned int)headerIsEntry(sourcePkg->header, 1... | static void initSourceHeader(rpmSpec spec) {
Package sourcePkg = spec->sourcePackage;
struct Source *srcPtr;
if (headerIsEntry(sourcePkg->header, RPMTAG_NAME))
return;
headerCopyTags(spec->packages->header, sourcePkg->header, sourceTags);
for (int i = 0; i < PACKAGE_NUM_DEPS; i++) {
rpmdsPutToHeade... | initSourceHeader | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int intCmp(int a, int b) { return a != b; } | static int intCmp(int a, int b) { return (a != b); } | intCmp | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
unsigned int intId(int a) { return a; } | static unsigned int intId(int a) { return a; } | intId | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int isAttrDefault(rpmstrPool pool, rpmsid arsid) {
const char *ars;
ars = (const char *)rpmstrPoolStr(pool, arsid);
return ars && *ars == 45 && !ars[1];
} | static int isAttrDefault(rpmstrPool pool, rpmsid arsid) {
const char *ars = rpmstrPoolStr(pool, arsid);
return (ars && ars[0] == '-' && ars[1] == '\0');
} | isAttrDefault | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int isDoc(ARGV_const_t docDirs, const char *fileName) {
size_t k;
size_t l;
k = strlen(fileName);
while (*docDirs) {
l = strlen(*(const char **)docDirs);
if (l < k && rstreqn(fileName, *(const char **)docDirs, l) &&
fileName[l] == 47)
return 1;
++docDirs;
}
return 0;
} | static int isDoc(ARGV_const_t docDirs, const char *fileName) {
size_t k, l;
k = strlen(fileName);
for (ARGV_const_t dd = docDirs; *dd; dd++) {
l = strlen(*dd);
if (l < k && rstreqn(fileName, *dd, l) && fileName[l] == '/')
return 1;
}
return 0;
} | isDoc | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int isHardLink(FileListRec flp, FileListRec tlp) {
return isLinkable(flp->fl_st.st_mode) && isLinkable(tlp->fl_st.st_mode) &&
flp->fl_st.st_nlink > 1 &&
flp->fl_st.st_nlink == tlp->fl_st.st_nlink &&
flp->fl_st.st_ino == tlp->fl_st.st_ino &&
flp->fl_st.st_dev == tlp->fl_st.st_dev;
} | static int isHardLink(FileListRec flp, FileListRec tlp) {
return ((isLinkable(flp->fl_mode) && isLinkable(tlp->fl_mode)) &&
((flp->fl_nlink > 1) && (flp->fl_nlink == tlp->fl_nlink)) &&
(flp->fl_ino == tlp->fl_ino) && (flp->fl_dev == tlp->fl_dev));
} | isHardLink | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int isLinkable(mode_t mode) {
return (mode & 0xF000) == 0x8000 || (mode & 0xF000) == 0xA000;
} | static int isLinkable(mode_t mode) { return (S_ISREG(mode) || S_ISLNK(mode)); } | isLinkable | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int isMemberInEntry(Header h, const char *name, rpmTagVal tag) {
int found;
const char *str;
rpmtd_s td;
unsigned long v7;
v7 = __readfsqword(0x28u);
found = 0;
if (!(unsigned int)headerGet(h, (unsigned int)tag, &td, 1))
return -1;
while (1) {
str = (const char *)rpmtdNextString(&td);
if (!... | static int isMemberInEntry(Header h, const char *name, rpmTagVal tag) {
struct rpmtd_s td;
int found = 0;
const char *str;
if (!headerGet(h, tag, &td, HEADERGET_MINMEM))
return -1;
while ((str = rpmtdNextString(&td))) {
if (!rstrcasecmp(str, name)) {
found = 1;
break;
}
}
rpmtdFr... | isMemberInEntry | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int isPart(const char *line) {
char c;
const PartRec *p;
for (p = partList; p->token; ++p) {
if (!(unsigned int)rstrncasecmp(line, p->token, p->len)) {
c = line[p->len];
if (!c || risspace_5(c))
break;
}
}
if (p->token)
return p->part;
else
return 0;
} | int isPart(const char *line) {
const struct PartRec *p;
for (p = partList; p->token != NULL; p++) {
char c;
if (rstrncasecmp(line, p->token, p->len))
continue;
c = *(line + p->len);
if (c == '\0' || risspace(c))
break;
}
return (p->token ? p->part : PART_NONE);
} | isPart | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC lookupPackage(rpmSpec spec, const char *name, int flag, Package *pkg) {
const char *String;
char *v6;
unsigned int v7;
char *v8;
char *line;
unsigned int lineNum;
char *v11;
char flaga;
char *namea;
rpmsid nameid;
char *fullName;
Package p;
unsigned long v18;
namea = (char *)name;
f... | rpmRC lookupPackage(rpmSpec spec, const char *name, int flag, Package *pkg) {
char *fullName = NULL;
rpmsid nameid = 0;
Package p;
if (name == NULL) {
if (pkg)
*pkg = spec->packages;
return RPMRC_OK;
}
if (!(flag & PART_NAME)) {
rasprintf(&fullName, "%s-%s",
headerGetString... | lookupPackage | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int matchTok(const char *token, const char *line) {
int rc;
const char *b;
const char *toklen;
toklen = (const char *)strlen(token);
rc = 0;
while (1) {
b = line;
if (!*line)
break;
while (*b && risspace_5(*b))
++b;
for (line = b; *line && !risspace_5(*line); ++line)
;
... | static int matchTok(const char *token, const char *line) {
const char *b, *be = line;
size_t toklen = strlen(token);
int rc = 0;
while (*(b = be) != '\0') {
SKIPSPACE(b);
be = b;
SKIPNONSPACE(be);
if (be == b)
break;
if (toklen != (be - b) || rstrncasecmp(token, b, (be - b)))
co... | matchTok | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int matches(const matchRule *rule, const char *ftype, const char *fmime,
const char *path, int executable) {
regex_t *mime;
const char *mtype;
regex_t *mreg;
if (!rule->mime)
fmime = ftype;
mtype = fmime;
if (rule->mime)
mime = rule->mime;
else
mime = rule->magic;
mreg = mime;
... | static int matches(const struct matchRule *rule, const char *ftype,
const char *fmime, const char *path, int executable) {
const char *mtype = rule->mime ? fmime : ftype;
regex_t *mreg = rule->mime ? rule->mime : rule->magic;
if (!executable && hasAttr(rule->flags, "exeonly"))
return 0;
... | matches | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
char *mkattr() {
char *s[2];
s[1] = (char *)__readfsqword(0x28u);
s[0] = 0;
rasprintf(s, "%s(644,%s,%s,755)", "%defattr", "root", "root");
return s[0];
} | static char *mkattr(void) {
char *s = NULL;
rasprintf(&s, "%s(644,%s,%s,755)", "%defattr", UID_0_USER, GID_0_GROUP);
return s;
} | mkattr | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
Package newPackage(const char *name, rpmstrPool pool, Package *pkglist) {
Package pp;
Package p;
p = (Package)rcalloc(1, 312);
p->header = (Header)headerNew();
p->autoProv = 1;
p->autoReq = 1;
p->fileList = 0;
p->fileExcludeList = 0;
p->fileFile = 0;
p->policyList = 0;
p->fileRenameMap = 0;
p->... | Package newPackage(const char *name, rpmstrPool pool, Package *pkglist) {
Package p = xcalloc(1, sizeof(*p));
p->header = headerNew();
p->autoProv = 1;
p->autoReq = 1;
p->fileList = NULL;
p->fileExcludeList = NULL;
p->fileFile = NULL;
p->policyList = NULL;
p->fileRenameMap = NULL;
p->pool = rpmstrPo... | newPackage | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
Source *newSource(uint32_t num, const char *path, int flags) {
Source *p;
char *buf;
p = (Source *)rmalloc(40);
p->num = num;
p->fullSource = (char *)rstrdup(path);
p->flags = flags;
p->source = strrchr(p->fullSource, 47);
if (p->source) {
buf = strrchr(p->source, 61);
if (buf)
p->source ... | static struct Source *newSource(uint32_t num, const char *path, int flags) {
struct Source *p = xmalloc(sizeof(*p));
p->num = num;
p->fullSource = xstrdup(path);
p->flags = flags;
p->source = strrchr(p->fullSource, '/');
if (p->source) {
const char *buf = strrchr(p->source, '=');
if (buf)
p->s... | newSource | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmSpec newSpec() {
rpmSpec spec;
spec = (rpmSpec)rcalloc(1, 288);
spec->specFile = 0;
spec->fileStack = 0;
spec->lbufSize = (size_t)&loc_14000;
spec->lbuf = (char *)rmalloc(spec->lbufSize);
*spec->lbuf = 0;
spec->line = spec->lbuf;
spec->nextline = 0;
spec->nextpeekc = 0;
spec->lineNum = 0;
sp... | rpmSpec newSpec(void) {
rpmSpec spec = xcalloc(1, sizeof(*spec));
spec->specFile = NULL;
spec->fileStack = NULL;
spec->lbufSize = BUFSIZ * 10;
spec->lbuf = xmalloc(spec->lbufSize);
spec->lbuf[0] = '\0';
spec->line = spec->lbuf;
spec->nextline = NULL;
spec->nextpeekc = '\0';
spec->lineNum = 0;
sp... | newSpec | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
StringBuf newStringBuf() {
StringBuf sb;
sb = (StringBuf)rmalloc(24);
sb->allocated = 1024;
sb->free = sb->allocated;
sb->buf = (char *)rcalloc(sb->allocated, 1);
*sb->buf = 0;
sb->tail = sb->buf;
return sb;
} | StringBuf newStringBuf(void) {
StringBuf sb = xmalloc(sizeof(*sb));
sb->free = sb->allocated = BUF_CHUNK;
sb->buf = xcalloc(sb->allocated, sizeof(*sb->buf));
sb->buf[0] = '\0';
sb->tail = sb->buf;
return sb;
} | newStringBuf | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
void nullAttrRec(AttrRec ar) { memset(ar, 0, sizeof(AttrRec_s)); } | static void nullAttrRec(AttrRec ar) { memset(ar, 0, sizeof(*ar)); } | nullAttrRec | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
void *nullDigest(int algo, int ascii) {
void *d;
DIGEST_CTX ctx;
unsigned long v5;
v5 = __readfsqword(0x28u);
d = 0;
ctx = (DIGEST_CTX)rpmDigestInit((unsigned int)algo, 0);
rpmDigestFinal(ctx, &d, 0, (unsigned int)ascii);
return d;
} | static void *nullDigest(int algo, int ascii) {
void *d = NULL;
DIGEST_CTX ctx = rpmDigestInit(algo, 0);
rpmDigestFinal(ctx, &d, NULL, ascii);
return d;
} | nullDigest | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) {
rpmRC rc;
int npkgs;
int i;
Package pkg;
Package pkga;
Package *tasks;
_QWORD v11[3];
int v12;
rpmRC v13;
int v14;
unsigned long v15;
v15 = __readfsqword(0x28u);
npkgs = 0;
for (pkg = spec->packages; pkg; pkg = pkg->nex... | rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) {
rpmRC rc = RPMRC_OK;
Package pkg;
Package *tasks;
int npkgs = 0;
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next)
npkgs++;
tasks = xcalloc(npkgs, sizeof(Package));
pkg = spec->packages;
for (int i = 0; i < npkgs; i++) ... | packageBinaries | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating,
char **filename) {
rpmRC rc;
rpmRC rca;
rpmRC rcb;
char *pkgcheck;
if (!pkg->fileList)
return rpmRC_e_RPMRC_OK;
rc = processScriptFiles(spec, pkg);
if (rc)
return rc;
if (cookie)
headerPutSt... | static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie,
int cheating, char **filename) {
rpmRC rc = RPMRC_OK;
if (pkg->fileList == NULL)
return rc;
if ((rc = processScriptFiles(spec, pkg)))
return rc;
if (cookie) {
headerPutString(pkg->header, RPMTAG_C... | packageBinary | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmds *packageDependencies(Package pkg, rpmTagVal tag) {
int i;
rpmTagVal tagN;
for (i = 0; i <= 11; ++i) {
if (!pkg->dependencies[i])
return &pkg->dependencies[i];
tagN = rpmdsTagN(pkg->dependencies[i]);
if (tagN == tag || !tagN)
return &pkg->dependencies[i];
}
return 0;
} | rpmds *packageDependencies(Package pkg, rpmTagVal tag) {
for (int i = 0; i < PACKAGE_NUM_DEPS; i++) {
if (pkg->dependencies[i] == NULL) {
return &pkg->dependencies[i];
}
rpmTagVal tagN = rpmdsTagN(pkg->dependencies[i]);
if (tagN == tag || tagN == 0) {
return &pkg->dependencies[i];
}
... | packageDependencies | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC packageSources(rpmSpec spec, char **cookie) {
char *Path;
uint32_t one;
rpmRC rc;
Package sourcePkg;
char *pkgcheck;
unsigned long v8;
v8 = __readfsqword(0x28u);
sourcePkg = spec->sourcePackage;
one = 1;
headerPutString(sourcePkg->header, 1064, "4.17.0");
headerPutString(sourcePkg->header, ... | rpmRC packageSources(rpmSpec spec, char **cookie) {
Package sourcePkg = spec->sourcePackage;
rpmRC rc;
uint32_t one = 1;
headerPutString(sourcePkg->header, RPMTAG_RPMVERSION, VERSION);
headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, spec->buildHost);
headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME... | packageSources | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int parseBits(const char *s, const tokenBits tokbits, rpmsenseFlags *bp_0) {
const char *sa;
rpmsenseFlags bits;
int rc;
int c;
int ca;
tokenBits tb;
const char *se;
sa = s;
tb = 0;
bits = 0;
rc = 0;
if (s) {
while (1) {
while (*sa && risspace_2(*sa))
++sa;
for (se = sa;... | static int parseBits(const char *s, const tokenBits tokbits,
rpmsenseFlags *bp) {
tokenBits tb = NULL;
const char *se;
rpmsenseFlags bits = RPMSENSE_ANY;
int c = 0;
int rc = RPMRC_OK;
if (s) {
for (;;) {
while ((c = *s) && risspace(c))
s++;
se = s;
while (... | parseBits | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int parseChangelog(rpmSpec spec) {
unsigned int lineNum;
char *v2;
int res;
ARGV_t sb[3];
sb[1] = (ARGV_t)__readfsqword(0x28u);
res = -1;
sb[0] = 0;
if ((unsigned int)headerIsEntry(spec->packages->header, 1080)) {
lineNum = spec->lineNum;
v2 = dgettext("rpm", "line %d: second %%changelog\n");
... | int parseChangelog(rpmSpec spec) {
int res = PART_ERROR;
ARGV_t sb = NULL;
if (headerIsEntry(spec->packages->header, RPMTAG_CHANGELOGTIME)) {
rpmlog(RPMLOG_ERR, _("line %d: second %%changelog\n"), spec->lineNum);
goto exit;
}
if ((res = parseLines(spec, STRIP_COMMENTS, &sb, NULL)) == PART_ERROR)
... | parseChangelog | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int parseDescription(rpmSpec spec) {
long v1;
unsigned int lineNum;
char *v3;
char *v5;
long v6;
unsigned int v7;
char *v8;
long v9;
char *line;
unsigned int v11;
char *v12;
char *v13;
int argc;
int nextPart;
int flag;
int rc;
int arg;
StringBuf sb;
Package pkg;
const char **argv... | int parseDescription(rpmSpec spec) {
int nextPart = PART_ERROR;
StringBuf sb = NULL;
int flag = PART_SUBNAME;
Package pkg;
int rc, argc;
int arg;
const char **argv = NULL;
char *name = NULL;
char *lang = NULL;
const char *descr = "";
poptContext optCon = NULL;
struct poptOption optionsTable[] = ... | parseDescription | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int parseEmpty(rpmSpec spec, int prevParsePart) {
char *v2;
unsigned int lineNum;
char *v4;
char *v5;
unsigned int v6;
char *v7;
char *v8;
unsigned int v9;
char *v10;
int res;
int nextPart;
int rc;
int rca;
char *line;
char *linea;
res = -1;
for (line = spec->line + 4; *line && risspa... | static int parseEmpty(rpmSpec spec, int prevParsePart) {
int res = PART_ERROR;
int nextPart, rc;
char *line;
line = spec->line + sizeof("%end") - 1;
SKIPSPACE(line);
if (line[0] != '\0') {
rpmlog(RPMLOG_ERR, _("line %d: %%end doesn't take any arguments: %s\n"),
spec->lineNum, spec->line);
... | parseEmpty | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int parseFiles(rpmSpec spec) {
long v1;
unsigned int lineNum;
char *v3;
char *v4;
long v5;
unsigned int v6;
char *v7;
long v8;
char *line;
unsigned int v10;
char *v11;
long v12;
unsigned int v13;
char *v14;
Package v15;
Package v16;
int argc;
int res;
int arg;
int flag;
int rc;... | int parseFiles(rpmSpec spec) {
int res = PART_ERROR;
Package pkg;
int rc, argc;
int arg;
const char **argv = NULL;
char *name = NULL;
int flag = PART_SUBNAME;
poptContext optCon = NULL;
struct poptOption optionsTable[] = {
{NULL, 'n', POPT_ARG_STRING, &name, 'n', NULL, NULL},
{NULL, 'f', P... | parseFiles | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC parseForAttr(rpmstrPool pool, char *buf, int def, FileEntry entry) {
const char *v4;
char *v6;
char *v7;
char *v8;
char *v9;
char *v10;
char *v11;
char *v12;
char *v13;
char *v14;
char *v15;
long v16;
char *v17;
long v18;
char *v19;
specfFlags specdFlags;
unsigned int ui;
rpmRC... | static rpmRC parseForAttr(rpmstrPool pool, char *buf, int def,
FileEntry entry) {
const char *name = def ? "%defattr" : "%attr";
char *p, *pe, *q = NULL;
char *attr_parameters = NULL;
int x;
struct AttrRec_s arbuf;
AttrRec ar = &arbuf;
rpmRC rc = RPMRC_FAIL;
if ((p = strstr(bu... | parseForAttr | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC parseForCaps(char *buf, FileEntry cur) {
char *v3;
char *v4;
char *v5;
char *v6;
char *p;
char *pa;
char *pe;
char *pea;
char *q;
q = 0;
p = strstr(buf, "%caps");
if (!p)
return rpmRC_e_RPMRC_OK;
for (pe = p; pe - p < strlen("%caps"); ++pe)
*pe = 32;
while (*pe && risspace(*pe... | static rpmRC parseForCaps(char *buf, FileEntry cur) {
char *p, *pe, *q = NULL;
const char *name;
rpmRC rc = RPMRC_FAIL;
if ((p = strstr(buf, (name = "%caps"))) == NULL)
return RPMRC_OK;
for (pe = p; (pe - p) < strlen(name); pe++)
*pe = ' ';
SKIPSPACE(pe);
if (*pe != '(')
return RPMRC_OK;
... | parseForCaps | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC parseForConfig(char *buf, FileEntry cur) {
char *v3;
char *v4;
char *v5;
char *v6;
char *v7;
rpmRC rc;
char *p;
char *pa;
char *pb;
char *pe;
char *pea;
char *peb;
char *q;
q = 0;
rc = rpmRC_e_RPMRC_FAIL;
p = strstr(buf, "%config");
if (!p)
return rpmRC_e_RPMRC_OK;
cur->at... | static rpmRC parseForConfig(char *buf, FileEntry cur) {
char *p, *pe, *q = NULL;
const char *name;
rpmRC rc = RPMRC_FAIL;
if ((p = strstr(buf, (name = "%config"))) == NULL)
return RPMRC_OK;
cur->attrFlags |= RPMFILE_CONFIG;
for (pe = p; (pe - p) < strlen(name); pe++)
*pe = ' ';
SKIPSPACE(pe);
... | parseForConfig | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC parseForDev(char *buf, FileEntry cur) {
char *v3;
char *v4;
char *v5;
char *v6;
rpmRC rc;
const char *errstr;
char *p;
char *pa;
char *pb;
char *pc;
char *pd;
char *pe;
char *pea;
char *peb;
char *pec;
char *ped;
char *pee;
char *pef;
char *q;
char *attr_parameters;
errs... | static rpmRC parseForDev(char *buf, FileEntry cur) {
const char *name;
const char *errstr = NULL;
char *p, *pe, *q = NULL;
rpmRC rc = RPMRC_FAIL;
char *attr_parameters = NULL;
if ((p = strstr(buf, (name = "%dev"))) == NULL)
return RPMRC_OK;
for (pe = p; (pe - p) < strlen(name); pe++)
*pe = ' ';
... | parseForDev | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC parseForLang(char *buf, FileEntry cur) {
char *v2;
char *v3;
char *v4;
rpmRC rc;
char *p;
char *pa;
char *pe;
char *pea;
char *peb;
char *q;
q = 0;
rc = rpmRC_e_RPMRC_FAIL;
while (1) {
p = strstr(buf, "%lang");
if (!p)
break;
for (pe = p; pe - p < strlen("%lang"); ++pe... | static rpmRC parseForLang(char *buf, FileEntry cur) {
char *p, *pe, *q = NULL;
const char *name;
rpmRC rc = RPMRC_FAIL;
while ((p = strstr(buf, (name = "%lang"))) != NULL) {
for (pe = p; (pe - p) < strlen(name); pe++)
*pe = ' ';
SKIPSPACE(pe);
if (*pe != '(') {
rpmlog(RPMLOG_ERR, _("M... | parseForLang | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC parseForSimple(char *buf, FileEntry cur, ARGV_t *fileNames) {
char *v3;
rpmRC res;
char *s;
res = rpmRC_e_RPMRC_OK;
while (1) {
s = strtokWithQuotes(buf, " \t\n");
if (!s)
return res;
buf = 0;
if (!vfaMatch((VFA_t *)virtualAttrs, s, &cur->attrFlags)) {
if (*s == 47)
... | static rpmRC parseForSimple(char *buf, FileEntry cur, ARGV_t *fileNames) {
char *s, *t;
rpmRC res = RPMRC_OK;
int allow_relative = (RPMFILE_PUBKEY | RPMFILE_DOC | RPMFILE_LICENSE);
t = buf;
while ((s = strtokWithQuotes(t, " \t\n")) != NULL) {
t = NULL;
if (vfaMatch(virtualAttrs, s, &(cur->attrFlags)... | parseForSimple | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC parseForVerify(char *buf, int def, FileEntry entry) {
const char *v3;
char *v5;
char *v6;
char *v7;
char *v8;
char *v9;
char *v10;
rpmVerifyFlags v11;
specfFlags specdFlags;
rpmVerifyFlags verifyFlags;
int negated;
rpmRC rc;
char *p;
char *pe;
char *q;
const char *name;
unsigned ... | static rpmRC parseForVerify(char *buf, int def, FileEntry entry) {
char *p, *pe, *q = NULL;
const char *name = def ? "%defverify" : "%verify";
int negated = 0;
rpmVerifyFlags verifyFlags = RPMVERIFY_NONE;
rpmRC rc = RPMRC_FAIL;
if ((p = strstr(buf, name)) == NULL)
return RPMRC_OK;
for (pe = p; (pe -... | parseForVerify | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
parsedSpecLine parseLineType(char *line) {
parsedSpecLine condition;
for (condition = lineTypes_10; condition->text; ++condition) {
if (condition->withArgs) {
if (rstreqn_2(line, condition->text, condition->textLen) &&
(risblank_5(line[condition->textLen]) || !line[condition->textLen])) {
... | static parsedSpecLine parseLineType(char *line) {
parsedSpecLine condition;
for (condition = lineTypes; condition->text != NULL; condition++) {
if (condition->withArgs) {
if (ISMACROWITHARG(line, condition->text, condition->textLen))
return condition;
} else {
if (ISMACRO(line, conditio... | parseLineType | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int parseLines(rpmSpec spec, int strip, ARGV_t *avp, StringBuf *sbp) {
int nextPart;
int rc;
int rca;
nextPart = -1;
rc = readLine(spec, (unsigned char)strip);
if (rc > 0)
return 0;
if (rc >= 0) {
if (sbp && !*sbp)
*sbp = newStringBuf();
while (1) {
nextPart = isPart(spec->line);
... | int parseLines(rpmSpec spec, int strip, ARGV_t *avp, StringBuf *sbp) {
int rc, nextPart = PART_ERROR;
int nl = (strip & STRIP_TRAILINGSPACE);
if ((rc = readLine(spec, strip)) > 0) {
nextPart = PART_NONE;
goto exit;
} else if (rc < 0) {
goto exit;
}
if (sbp && *sbp == NULL)
*sbp = newString... | parseLines | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int parseList(rpmSpec spec, const char *name, rpmTagVal tag) {
int res;
ARGV_t lst;
ARGV_const_t l;
unsigned long v8;
v8 = __readfsqword(0x28u);
lst = 0;
res = parseLines(spec, 3, &lst, 0);
if (res != -1) {
for (l = lst; l && *l; ++l) {
if (!rstreq_6(*(const char **)l, &byte_30EA4))
a... | int parseList(rpmSpec spec, const char *name, rpmTagVal tag) {
int res = PART_ERROR;
ARGV_t lst = NULL;
if ((res = parseLines(spec, (STRIP_TRAILINGSPACE | STRIP_COMMENTS), &lst,
NULL)) == PART_ERROR) {
goto exit;
}
for (ARGV_const_t l = lst; l && *l; l++) {
if (rstreq(*l, "")... | parseList | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int parseNoSource(rpmSpec spec, const char *field, rpmTagVal tag) {
unsigned int lineNum;
char *v4;
uint32_t v6;
unsigned int v7;
char *v8;
uint32_t num;
int flag;
const char *f;
const char *fe;
const char *name;
Source *p;
unsigned long v15;
v15 = __readfsqword(0x28u);
if (tag == 1051) {
... | static int parseNoSource(rpmSpec spec, const char *field, rpmTagVal tag) {
const char *f, *fe;
const char *name;
int flag;
uint32_t num;
if (tag == RPMTAG_NOSOURCE) {
flag = RPMBUILD_ISSOURCE;
name = "source";
} else {
flag = RPMBUILD_ISPATCH;
name = "patch";
}
fe = field;
for (f = f... | parseNoSource | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int parsePolicies(rpmSpec spec) {
long v1;
unsigned int lineNum;
char *v3;
char *v4;
long v5;
unsigned int v6;
char *v7;
long v8;
char *line;
unsigned int v10;
char *v11;
int argc;
int res;
int flag;
int rc;
int arg;
Package pkg;
const char **argv;
char *name;
poptContext optCon;... | int parsePolicies(rpmSpec spec) {
int res = PART_ERROR;
Package pkg;
int rc, argc;
int arg;
const char **argv = NULL;
char *name = NULL;
int flag = PART_SUBNAME;
poptContext optCon = NULL;
struct poptOption optionsTable[] = {
{NULL, 'n', POPT_ARG_STRING, &name, 'n', NULL, NULL},
{0, 0, 0,... | parsePolicies | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int parsePreamble(rpmSpec spec, int initialPackage) {
char *v2;
char *v3;
char *v4;
const char *String;
char *v6;
char *line;
unsigned int lineNum;
char *v9;
char *v10;
char *v11;
int flag;
rpmTagVal tag;
int nextPart;
int res;
int rc;
char *name;
char *NVR;
const char *macro;
char... | int parsePreamble(rpmSpec spec, int initialPackage) {
int nextPart = PART_ERROR;
int res = PART_ERROR;
int rc;
char *linep;
int flag = 0;
Package pkg;
char *name = NULL;
char *NVR = NULL;
char lang[BUFSIZ];
if (!initialPackage) {
if (parseSimplePart(spec->line, &name, &flag)) {
rpmlog(RP... | parsePreamble | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int parsePrep(rpmSpec spec) {
unsigned int lineNum;
char *v2;
int rc;
int res;
ARGV_t saveLines;
ARGV_const_t lines;
unsigned long v8;
v8 = __readfsqword(0x28u);
res = -1;
saveLines = 0;
if (spec->prep) {
lineNum = spec->lineNum;
v2 = dgettext("rpm", "line %d: second %%prep\n");
rpmlo... | int parsePrep(rpmSpec spec) {
int rc, res = PART_ERROR;
ARGV_t saveLines = NULL;
if (spec->prep != NULL) {
rpmlog(RPMLOG_ERR, _("line %d: second %%prep\n"), spec->lineNum);
goto exit;
}
spec->prep = newStringBuf();
if ((res = parseLines(spec, STRIP_NOTHING, &saveLines, NULL)) == PART_ERROR)
g... | parsePrep | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTagVal tagN,
int index, rpmsenseFlags tagflags, addReqProvFunction cb,
void *cbdata) {
char *v8;
const char *StringBuf;
char *v10;
char *v11;
char *v12;
char *v13;
char *v14;
char *v15;
char *v16;
cha... | rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTagVal tagN,
int index, rpmsenseFlags tagflags, addReqProvFunction cb,
void *cbdata) {
const char *r, *re, *v, *ve;
char *emsg = NULL;
char *N = NULL, *EVR = NULL;
rpmTagVal nametag = RPMTAG_NOT_FOUND;
rpmsense... | parseRCPOT | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC parseRCPOTRichCB(void *cbdata, rpmrichParseType type, const char *n,
int nl, const char *e, int el, rpmsenseFlags sense,
rpmrichOp op, char **emsg) {
char *v9;
char *v10;
const char *v11;
rpmRC rc;
char *EVR;
char *rp;
StringBufRec *sb;
char *N;
char... | static rpmRC parseRCPOTRichCB(void *cbdata, rpmrichParseType type,
const char *n, int nl, const char *e, int el,
rpmsenseFlags sense, rpmrichOp op, char **emsg) {
struct parseRCPOTRichData *data = cbdata;
StringBuf sb = data->sb;
rpmRC rc = RPMRC_OK;
... | parseRCPOTRichCB | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int parseScript(rpmSpec spec, int parsePart) {
char *line;
unsigned int lineNum;
char *v4;
char *v5;
unsigned int v6;
char *v7;
long v8;
unsigned int v9;
char *v10;
char *v11;
char *v12;
unsigned int v13;
char *v14;
char *v15;
unsigned int v16;
char *v17;
char *v18;
unsigned int v19;... | int parseScript(rpmSpec spec, int parsePart) {
const char *p = "";
const char **progArgv = NULL;
int progArgc;
const char *partname = NULL;
rpmTagVal reqtag = 0;
rpmTagVal tag = 0;
rpmsenseFlags tagflags = 0;
rpmTagVal progtag = 0;
rpmTagVal flagtag = 0;
rpmscriptFlags scriptFlags = 0;
int flag =... | parseScript | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int parseSimplePart(const char *line, char **name, int *flag) {
_BOOL4 rc;
const char *tok;
char *linebuf;
linebuf = (char *)rstrdup(line);
strtok(linebuf, " \t\n");
*name = 0;
tok = strtok(0, " \t\n");
if (tok) {
if (rstreq_3(tok, "-n")) {
tok = strtok(0, " \t\n");
if (!tok) {
... | static int parseSimplePart(const char *line, char **name, int *flag) {
char *tok;
char *linebuf = xstrdup(line);
int rc;
(void)strtok(linebuf, " \t\n");
*name = NULL;
if (!(tok = strtok(NULL, " \t\n"))) {
rc = 1;
goto exit;
}
if (rstreq(tok, "-n")) {
if (!(tok = strtok(NULL, " \t\n"))) {
... | parseSimplePart | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int parseSimpleScript(rpmSpec spec, const char *name, StringBuf *sbp) {
unsigned int lineNum;
char *v4;
int res;
res = -1;
if (!*sbp)
return parseLines(spec, 0, 0, sbp);
lineNum = spec->lineNum;
v4 = dgettext("rpm", "line %d: second %s\n");
rpmlog(3, v4, lineNum, name);
return res;
} | int parseSimpleScript(rpmSpec spec, const char *name, StringBuf *sbp) {
int res = PART_ERROR;
if (*sbp != NULL) {
rpmlog(RPMLOG_ERR, _("line %d: second %s\n"), spec->lineNum, name);
goto exit;
}
res = parseLines(spec, STRIP_NOTHING, NULL, sbp);
exit:
return res;
} | parseSimpleScript | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmSpec parseSpec(const char *specFile, rpmSpecFlags flags,
const char *buildRoot, int recursing) {
long Path;
rpmSpec *v5;
char *v6;
long String;
char *v8;
int parsePart;
int prevParsePart;
int initialPackage;
int goterror;
int index;
int x;
int nthreads;
int badenc;
int n... | static rpmSpec parseSpec(const char *specFile, rpmSpecFlags flags,
const char *buildRoot, int recursing) {
int parsePart = PART_PREAMBLE;
int prevParsePart = PART_EMPTY;
int storedParsePart;
int initialPackage = 1;
rpmSpec spec;
spec = newSpec();
spec->specFile = rpmGetPath(spec... | parseSpec | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int parseTagNumber(const char *line, uint32_t *snum) {
int rc;
char *fieldp;
char *nump;
char *l;
l = (char *)rstrdup(line);
fieldp = l;
nump = l;
while (*fieldp != 58 && *fieldp != 32 && *fieldp != 9)
++fieldp;
*fieldp = 0;
while (*nump && risspace_2(*nump))
++nump;
if (nump && *nump)
... | static int parseTagNumber(const char *line, uint32_t *snum) {
int rc = 0;
char *l = xstrdup(line);
char *fieldp = l;
char *nump = l;
while ((*fieldp != ':') && (*fieldp != ' ') && (*fieldp != '\t')) {
fieldp++;
}
*fieldp = '\0';
SKIPSPACE(nump);
if (nump == NULL || *nump == '\0') {
rc = 1;
... | parseTagNumber | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int parseUnsignedNum(const char *line, uint32_t *res) {
const char *linea;
char *s1;
unsigned long rc;
unsigned long v6;
linea = line;
v6 = __readfsqword(0x28u);
s1 = 0;
if (!line)
return -1;
while (((*__ctype_b_loc())[*linea] & 0x2000) != 0)
++linea;
if (((*__ctype_b_loc())[*linea] & 0x800... | int parseUnsignedNum(const char *line, uint32_t *res) {
char *s1 = NULL;
unsigned long rc;
uint32_t result;
if (line == NULL)
return -1;
while (isspace(*line))
line++;
if (!isdigit(*line))
return -1;
rc = strtoul(line, &s1, 10);
if (*s1 || s1 == line || rc == ULONG_MAX || rc > UINT_MAX)
... | parseUnsignedNum | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int parseYesNo(const char *s) {
return s && *s != 110 && *s != 78 && *s != 48 &&
(unsigned int)rstrcasecmp(s, "false") &&
(unsigned int)rstrcasecmp(s, "off");
} | static inline int parseYesNo(const char *s) {
return ((!s || (s[0] == 'n' || s[0] == 'N' || s[0] == '0') ||
!rstrcasecmp(s, "false") || !rstrcasecmp(s, "off"))
? 0
: 1);
} | parseYesNo | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
void patchDebugPackageString(Package dbg, rpmTag tag, Package pkg,
Package mainpkg) {
char *v4;
size_t v5;
char *oldsubst;
char *newsubst;
char *v9;
const char *oldname;
const char *newname;
const char *old;
char *p;
unsigned long v14;
v14 = __readfsqword(0x28u);
ol... | static void patchDebugPackageString(Package dbg, rpmTag tag, Package pkg,
Package mainpkg) {
const char *oldname, *newname, *old;
char *oldsubst = NULL, *newsubst = NULL, *p;
oldname = headerGetString(mainpkg->header, RPMTAG_NAME);
newname = headerGetString(pkg->header, RPMTA... | patchDebugPackageString | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
OFI_t *popOFI(rpmSpec spec) {
OpenFileInfo *ofi;
if (spec->fileStack) {
ofi = spec->fileStack;
spec->fileStack = ofi->next;
if (ofi->fp)
fclose(ofi->fp);
free(ofi->fileName);
free(ofi->readBuf);
free(ofi);
rpmPopMacro(spec->macros, "__file_name");
}
return spec->fileStack;
} | static OFI_t *popOFI(rpmSpec spec) {
if (spec->fileStack) {
OFI_t *ofi = spec->fileStack;
spec->fileStack = ofi->next;
if (ofi->fp)
fclose(ofi->fp);
free(ofi->fileName);
free(ofi->readBuf);
free(ofi);
rpmPopMacro(spec->macros, "__file_name");
}
return spec->fileStack;
} | popOFI | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
void printDeps(rpmfc fc) {
const char *msg;
int bingo;
DepMsg_t dm;
rpmds ds_0;
const char *DNEVR;
ds_0 = 0;
for (dm = DepMsgs; dm->msg; ++dm) {
if (dm->ntag != -1)
ds_0 = rpmfcDependencies(fc, dm->ntag);
if (dm->ftag) {
ds_0 = (rpmds)rpmdsInit(ds_0);
if (ds_0) {
bingo =... | static void printDeps(rpmfc fc) {
DepMsg_t dm;
rpmds ds = NULL;
const char *DNEVR;
rpmsenseFlags Flags;
int bingo = 0;
for (dm = DepMsgs; dm->msg != NULL; dm++) {
if (dm->ntag != -1) {
ds = rpmfcDependencies(fc, dm->ntag);
}
if (dm->ftag == 0)
continue;
ds = rpmdsInit(ds);
... | printDeps | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC processBinaryFile(Package pkg, FileList fl, const char *fileName) {
_BOOL4 v3;
char *v4;
char *v5;
char *v6;
char *v7;
int argc;
rpmRC rc;
int i;
int quote;
int trailing_slash;
int doGlob;
char *diskPath;
ARGV_t argv;
size_t fnlen;
const char *msg;
unsigned long v20;
v20 = __rea... | static rpmRC processBinaryFile(Package pkg, FileList fl, const char *fileName) {
int quote = 1;
int doGlob;
char *diskPath = NULL;
rpmRC rc = RPMRC_OK;
size_t fnlen = strlen(fileName);
int trailing_slash = (fnlen > 0 && fileName[fnlen - 1] == '/');
if (trailing_slash && !fl->cur.isDir)
fl->cur.isDir ... | processBinaryFile | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC processBinaryFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags,
int didInstall, int test) {
Package_s *next;
char *v5;
long v6;
long v7;
long v8;
long v9;
char *v10;
char *v11;
unsigned int v12;
long v14;
long v15;
long didInstalla;
rpmRC rc;
int header_color;
in... | rpmRC processBinaryFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags,
int didInstall, int test) {
Package pkg;
rpmRC rc = RPMRC_OK;
char *buildroot;
char *uniquearch = NULL;
Package maindbg = NULL;
Package deplink = NULL;
Package dbgsrcpkg = findDebugsourcePackage(spec);
#if HAVE_LI... | processBinaryFiles | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC processBinaryPolicies(rpmSpec spec, int test) { return rpmRC_e_RPMRC_OK; } | rpmRC processBinaryPolicies(rpmSpec spec, int test) {
rpmRC rc = RPMRC_OK;
#if WITH_SELINUX
Package pkg;
char *nvr;
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
if (pkg->policyList == NULL) {
continue;
}
nvr = headerGetAsString(pkg->header, RPMTAG_NVRA);
rpmlog(RPMLOG_NOTIC... | processBinaryPolicies | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC processMetadataFile(Package pkg, FileList fl, const char *fileName,
rpmTagVal tag) {
char *v4;
char *v5;
char *v6;
char *v7;
int absolute;
rpmRC rc;
int xx;
uint8_t *pkt;
ssize_t pktlen;
char *fn;
char *apkt;
const char *buildDir;
unsigned long v18;
v18 = __r... | static rpmRC processMetadataFile(Package pkg, FileList fl, const char *fileName,
rpmTagVal tag) {
const char *buildDir = "%{_builddir}/%{?buildsubdir}/";
char *fn = NULL;
char *apkt = NULL;
uint8_t *pkt = NULL;
ssize_t pktlen = 0;
int absolute = 0;
rpmRC rc = RPMRC_FAIL;
... | processMetadataFile | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC processPackageFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags, Package pkg,
int didInstall, int test) {
char *v6;
specialDir specialDoc;
specialDir specialLic;
ARGV_t idFiles;
ARGV_const_t fp;
char *docs;
const char *arch;
FileList_s fl;
unsigned long v17;
v17 = __read... | static rpmRC processPackageFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags,
Package pkg, int didInstall, int test) {
struct FileList_s fl;
specialDir specialDoc = NULL;
specialDir specialLic = NULL;
pkg->cpioList = NULL;
for (ARGV_const_t fp = pkg->fileFile; fp && *fp != NULL;... | processPackageFiles | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC processScriptFiles(rpmSpec spec, Package pkg) {
int addflags;
rpmRC rc;
_BYTE i[12];
TriggerFileEntry *p;
headerToken_s *h;
rpmTagVal progTags[3];
rpmTagVal flagTags[3];
rpmTagVal scriptTags[3];
rpmTagVal priorityTags[3];
TriggerFileEntry *tfa[3];
unsigned long v13;
v13 = __readfsqword(0x... | static rpmRC processScriptFiles(rpmSpec spec, Package pkg) {
struct TriggerFileEntry *p;
int addflags = 0;
rpmRC rc = RPMRC_FAIL;
Header h = pkg->header;
struct TriggerFileEntry *tfa[] = {pkg->triggerFiles, pkg->fileTriggerFiles,
pkg->transFileTriggerFiles};
rpmTagVal pr... | processScriptFiles | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags) {
char *Path;
char *v3;
unsigned int v4;
char *v5;
char *v6;
char *v7;
int *v8;
char *v9;
char *v10;
long v11;
rpmsid v12;
__uid_t v13;
long v14;
rpmsid v15;
rpmsid v16;
long v17;
rpmsid v18;
__gid_t v19;
long v20;
... | rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags) {
struct Source *srcPtr;
struct FileList_s fl;
ARGV_t files = NULL;
Package pkg;
Package sourcePkg = spec->sourcePackage;
static char *_srcdefattr;
static int oneshot;
if (!oneshot) {
_srcdefattr = rpmExpand("%{?_srcdefattr}", NULL);... | processSourceFiles | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
void processSpecialDir(rpmSpec spec, Package pkg, FileList fl, specialDir sd,
int install, int test) {
const char *v6;
const char *v7;
const char *StringBuf;
char *v9;
char *v10;
int globFilesCount;
int fi;
int i;
ARGV_t globFiles;
char *newfile;
char **files;
ARGV_const_t... | static void processSpecialDir(rpmSpec spec, Package pkg, FileList fl,
specialDir sd, int install, int test) {
const char *sdenv = (sd->sdtype == RPMFILE_DOC) ? "DOCDIR" : "LICENSEDIR";
const char *sdname = (sd->sdtype == RPMFILE_DOC) ? "%doc" : "%license";
char *mkdocdir = rpmExpand(... | processSpecialDir | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
OFI_t *pushOFI(rpmSpec spec, const char *fn) {
OFI_t *ofi;
ofi = (OFI_t *)rcalloc(1, 56);
ofi->fp = 0;
ofi->fileName = (char *)rstrdup(fn);
ofi->lineNum = 0;
ofi->readBufLen = 0x2000;
ofi->readBuf = (char *)rmalloc(ofi->readBufLen);
*ofi->readBuf = 0;
ofi->readPtr = 0;
ofi->next = spec->fileStack;
... | static OFI_t *pushOFI(rpmSpec spec, const char *fn) {
OFI_t *ofi = xcalloc(1, sizeof(*ofi));
ofi->fp = NULL;
ofi->fileName = xstrdup(fn);
ofi->lineNum = 0;
ofi->readBufLen = BUFSIZ;
ofi->readBuf = xmalloc(ofi->readBufLen);
ofi->readBuf[0] = '\0';
ofi->readPtr = NULL;
ofi->next = spec->fileStack;
r... | pushOFI | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC readFilesManifest(rpmSpec spec, Package pkg, const char *path) {
int flags;
int nlines;
flags = 3;
if (!(unsigned int)rpmExpandNumeric("%{?_empty_manifest_terminate_build}"))
flags = 65539;
rpmPushMacroFlags(spec->macros, "license", 0, "%license", 4294967293LL);
nlines = readManifest(spec, path, ... | static rpmRC readFilesManifest(rpmSpec spec, Package pkg, const char *path) {
int nlines = 0;
int flags = STRIP_COMMENTS | STRIP_TRAILINGSPACE;
if (!rpmExpandNumeric("%{?_empty_manifest_terminate_build}"))
flags |= ALLOW_EMPTY;
rpmPushMacroFlags(spec->macros, "license", NULL, "%license", RMIL_SPEC,
... | readFilesManifest | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int readLine(rpmSpec spec, int strip) {
unsigned int lineNum;
char *v3;
char *v4;
const char *text;
unsigned int v7;
char *v8;
char *v9;
const char *v10;
const char *v11;
unsigned int v12;
char *v13;
char *v14;
unsigned int v15;
char *v16;
char *v17;
unsigned int v18;
char *v19;
char... | while (0)
int readLine(rpmSpec spec, int strip) {
char *s;
int match = 0;
struct ReadLevelEntry *rl;
OFI_t *ofi = spec->fileStack;
int rc;
int startLine = 0;
parsedSpecLine lineType;
int prevType = spec->readStack->lastConditional->id;
int checkCondition;
if (!restoreFirstCha... | readLine | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int readLineFromOFI(rpmSpec spec, OFI_t *ofi) {
int *v2;
char *v3;
char *fileName;
char *v5;
while (1) {
if (!ofi->fp) {
ofi->fp = fopen(ofi->fileName, "r");
if (!ofi->fp) {
v2 = __errno_location();
v3 = strerror(*v2);
fileName = ofi->fileName;
v5 = dgettext("r... | static int readLineFromOFI(rpmSpec spec, OFI_t *ofi) {
retry:
if (ofi->fp == NULL) {
ofi->fp = fopen(ofi->fileName, "r");
if (ofi->fp == NULL) {
rpmlog(RPMLOG_ERR, _("Unable to open %s: %s\n"), ofi->fileName,
strerror(errno));
return PART_ERROR;
}
spec->lineNum = ofi->lineNum... | readLineFromOFI | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int readManifest(rpmSpec spec, const char *path, const char *descr, int flags,
ARGV_t *avp, StringBuf *sbp) {
char *buildSubdir;
char *v7;
char *v8;
long v9;
int lineno;
int nlines;
char *expanded;
char *fn;
FILE *fd;
char buf[8200];
unsigned long v22;
v22 = __readfsqword(0x28u... | int readManifest(rpmSpec spec, const char *path, const char *descr, int flags,
ARGV_t *avp, StringBuf *sbp) {
char *fn, buf[BUFSIZ];
FILE *fd = NULL;
int lineno = 0;
int nlines = -1;
if (*path == '/') {
fn = rpmGetPath(path, NULL);
} else {
fn = rpmGetPath("%{_builddir}/",
... | readManifest | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC recurseDir(FileList fl, const char *diskPath) {
char *fts_path;
char *v3;
rpmRC rc;
FTS *ftsp;
FTSENT *fts;
char *ftsSet[2];
unsigned long v9;
v9 = __readfsqword(0x28u);
rc = rpmRC_e_RPMRC_FAIL;
ftsSet[0] = (char *)diskPath;
ftsSet[1] = 0;
ftsp = Fts_open(ftsSet, 21, 0);
do {
fts = ... | static rpmRC recurseDir(FileList fl, const char *diskPath) {
char *ftsSet[2];
FTS *ftsp;
FTSENT *fts;
int myFtsOpts = (FTS_COMFOLLOW | FTS_NOCHDIR | FTS_PHYSICAL);
rpmRC rc = RPMRC_FAIL;
ftsSet[0] = (char *)diskPath;
ftsSet[1] = NULL;
ftsp = Fts_open(ftsSet, myFtsOpts, NULL);
while ((fts = Fts_read(f... | recurseDir | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
regex_t *regFree(regex_t *reg) {
if (reg) {
regfree(reg);
free(reg);
}
return 0;
} | static regex_t *regFree(regex_t *reg) {
if (reg) {
regfree(reg);
free(reg);
}
return NULL;
} | regFree | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int regMatch(regex_t *reg, const char *val) {
return reg && !regexec(reg, val, 0, 0, 0);
} | static int regMatch(regex_t *reg, const char *val) {
return (reg && regexec(reg, val, 0, NULL, 0) == 0);
} | regMatch | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
void resetPackageFilesDefaults(FileList_s *fl, rpmBuildPkgFlags pkgFlags) {
AttrRec_s root_ar;
unsigned long v3;
v3 = __readfsqword(0x28u);
memset(&root_ar, 0, sizeof(root_ar));
root_ar.ar_user = rpmstrPoolId(fl->pool, "root", 1);
root_ar.ar_group = rpmstrPoolId(fl->pool, "root", 1);
dupAttrRec(&root_ar,... | static void resetPackageFilesDefaults(struct FileList_s *fl,
rpmBuildPkgFlags pkgFlags) {
struct AttrRec_s root_ar = {0, 0, 0, 0, 0, 0};
root_ar.ar_user = rpmstrPoolId(fl->pool, UID_0_USER, 1);
root_ar.ar_group = rpmstrPoolId(fl->pool, GID_0_GROUP, 1);
dupAttrRec(&root_ar,... | resetPackageFilesDefaults | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int restoreFirstChar(rpmSpec spec) {
if (!spec->nextline || !spec->nextpeekc)
return 0;
*spec->nextline = spec->nextpeekc;
spec->nextpeekc = 0;
return 1;
} | static int restoreFirstChar(rpmSpec spec) {
if (spec->nextline != NULL && spec->nextpeekc != '\0') {
*spec->nextline = spec->nextpeekc;
spec->nextpeekc = '\0';
return 1;
}
return 0;
} | restoreFirstChar | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmRC rpmCharCheck(rpmSpec spec, const char *field, const char *allowedchars) {
unsigned int v3;
unsigned int v4;
char *v5;
char *v6;
char *v7;
rpmRC rc;
char *err;
const char *ch_0;
unsigned long v13;
v13 = __readfsqword(0x28u);
err = 0;
rc = rpmRC_e_RPMRC_OK;
for (ch_0 = field; *ch_0; ++ch_... | rpmRC rpmCharCheck(rpmSpec spec, const char *field, const char *allowedchars) {
const char *ch;
char *err = NULL;
rpmRC rc = RPMRC_OK;
for (ch = field; *ch; ch++) {
if (risalnum(*ch) || strchr(allowedchars, *ch))
continue;
rasprintf(&err, _("Illegal char '%c' (0x%x)"), isprint(*ch) ? *ch : '?',
... | rpmCharCheck | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int rpmPackageFilesArchive(rpmfiles fi, int isSrc, FD_t cfd, ARGV_t dpaths,
rpm_loff_t *archiveSize, char **failedFile) {
rpm_loff_t v6;
int rc;
int myerrno;
rpmfi archive;
FD_t rfd;
const char *path;
rc = 0;
archive = (rpmfi)rpmfiNewArchiveWriter(cfd, fi);
while (!rc) {
... | static int rpmPackageFilesArchive(rpmfiles fi, int isSrc, FD_t cfd,
ARGV_t dpaths, rpm_loff_t *archiveSize,
char **failedFile) {
int rc = 0;
rpmfi archive = rpmfiNewArchiveWriter(cfd, fi);
while (!rc && (rc = rpmfiNext(archive)) >= 0) {
FD_... | rpmPackageFilesArchive | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
int rpmSpecBuild(rpmts ts, rpmSpec spec, BTA_t buildArgs) {
return buildSpec(ts, buildArgs, spec, buildArgs->buildAmount);
} | int rpmSpecBuild(rpmts ts, rpmSpec spec, BTA_t buildArgs) {
return buildSpec(ts, buildArgs, spec, buildArgs->buildAmount);
} | rpmSpecBuild | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmps rpmSpecCheckDeps(rpmts ts, rpmSpec spec) {
Header v2;
rpmps_s *probs;
rpmtsEmpty(ts);
v2 = rpmSpecSourceHeader(spec);
rpmtsAddInstallElement(ts, v2, 0, 0, 0);
rpmtsCheck(ts);
probs = (rpmps_s *)rpmtsProblems(ts);
rpmtsEmpty(ts);
return probs;
} | rpmps rpmSpecCheckDeps(rpmts ts, rpmSpec spec) {
rpmps probs = NULL;
rpmtsEmpty(ts);
rpmtsAddInstallElement(ts, rpmSpecSourceHeader(spec), NULL, 0, NULL);
rpmtsCheck(ts);
probs = rpmtsProblems(ts);
rpmtsEmpty(ts);
return probs;
} | rpmSpecCheckDeps | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmds rpmSpecDS(rpmSpec spec, rpmTagVal tag) {
if (spec)
return rpmdsNew(spec->sourcePackage->header, (unsigned int)tag, 0);
else
return 0;
} | rpmds rpmSpecDS(rpmSpec spec, rpmTagVal tag) {
return (spec != NULL) ? rpmdsNew(spec->sourcePackage->header, tag, 0) : NULL;
} | rpmSpecDS | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmSpec rpmSpecFree(rpmSpec spec) {
rpmSpec *v2;
int BACount;
ReadLevelEntry *rl;
if (!spec)
return 0;
spec->prep = freeStringBuf(spec->prep);
spec->build = freeStringBuf(spec->build);
spec->install = freeStringBuf(spec->install);
spec->check = freeStringBuf(spec->check);
spec->clean = freeString... | rpmSpec rpmSpecFree(rpmSpec spec) {
if (spec == NULL)
return NULL;
spec->prep = freeStringBuf(spec->prep);
spec->build = freeStringBuf(spec->build);
spec->install = freeStringBuf(spec->install);
spec->check = freeStringBuf(spec->check);
spec->clean = freeStringBuf(spec->clean);
spec->parsed = freeSt... | rpmSpecFree | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
const char *rpmSpecGetSection(rpmSpec spec, int section) {
const char *result;
if (!spec)
return 0;
switch (section) {
case 0:
result = getStringBuf(spec->parsed);
break;
case 1:
result = getStringBuf(spec->prep);
break;
case 2:
result = getStringBuf(spec->build);
break;
case ... | const char *rpmSpecGetSection(rpmSpec spec, int section) {
if (spec) {
switch (section) {
case RPMBUILD_NONE:
return getStringBuf(spec->parsed);
case RPMBUILD_PREP:
return getStringBuf(spec->prep);
case RPMBUILD_BUILD:
return getStringBuf(spec->build);
case RPMBUILD_INSTALL:
... | rpmSpecGetSection | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
rpmSpec rpmSpecParse(const char *specFile, rpmSpecFlags flags,
const char *buildRoot) {
return parseSpec(specFile, flags, buildRoot, 0);
} | rpmSpec rpmSpecParse(const char *specFile, rpmSpecFlags flags,
const char *buildRoot) {
return parseSpec(specFile, flags, buildRoot, 0);
} | rpmSpecParse | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
char *rpmSpecPkgGetSection(rpmSpecPkg pkg, int section) {
if (pkg) {
if (section == 0x40000)
return (char *)argvJoin(pkg->policyList, &unk_31910);
if (section <= 0x40000) {
if (section == (_DWORD)&loc_10000)
return (char *)argvJoin(pkg->fileFile, &unk_31910);
if (section == (_DWORD)&... | char *rpmSpecPkgGetSection(rpmSpecPkg pkg, int section) {
if (pkg) {
switch (section) {
case RPMBUILD_FILE_FILE:
return argvJoin(pkg->fileFile, "");
case RPMBUILD_FILE_LIST:
return argvJoin(pkg->fileList, "");
case RPMBUILD_POLICY:
return argvJoin(pkg->policyList, "");
}
}
re... | rpmSpecPkgGetSection | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
Header rpmSpecPkgHeader(rpmSpecPkg pkg) {
if (pkg)
return pkg->header;
else
return 0;
} | Header rpmSpecPkgHeader(rpmSpecPkg pkg) {
return (pkg != NULL) ? pkg->header : NULL;
} | rpmSpecPkgHeader | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/librpmbuild.so.9.2.0 | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.