Files | |
file | argv.c |
file | argv.h |
file | getpass.c |
file | macro.c |
file | rpmlog.c |
file | rpmlog.h |
Yet Another syslog(3) API clone. | |
file | rpmerr.h |
file | rpmio.c |
file | rpmio.h |
file | rpmio_internal.h |
file | rpmmacro.h |
file | rpmmalloc.c |
file | rpmmessages.h |
file | rpmpgp.c |
Routines to handle RFC-2440 detached signatures. | |
file | rpmpgp.h |
OpenPGP constants and structures from RFC-2440. | |
file | rpmrpc.c |
file | rpmsq.c |
file | rpmsq.h |
file | rpmsw.c |
file | rpmsw.h |
file | rpmurl.h |
file | strcasecmp.c |
file | ugid.c |
file | ugid.h |
file | url.c |
Data Structures | |
struct | FDIO_s |
struct | pgpDigParams_s |
Values parsed from OpenPGP signature/pubkey packet(s). More... | |
struct | pgpDig_s |
Container for values parsed from an OpenPGP signature and public key. More... | |
struct | _FDSTACK_s |
struct | _FDDIGEST_s |
struct | _FD_s |
The FD_t File Handle data structure. More... | |
struct | rpmsw_s |
struct | rpmop_s |
Cumulative statistics for an operation. More... | |
typedef off_t | _libio_off_t |
Hide libio API lossage. | |
typedef off_t | _libio_pos_t |
Typedefs | |
typedef _FD_s * | FD_t |
typedef FDIO_s * | FDIO_t |
typedef _FDSTACK_s | FDSTACK_t |
typedef enum fdOpX_e | fdOpX |
Identify per-desciptor I/O operation statistics. | |
struct { | |
lu_byte left | |
lu_byte right | |
rpmop_s ops [FDSTAT_MAX] | |
} | FDSTAT_t |
Cumulative statistics for a descriptor. | |
typedef _FDDIGEST_s * | FDDIGEST_t |
typedef enum rpmDigestFlags_e | rpmDigestFlags |
Bit(s) to control digest operation. | |
typedef unsigned long int | rpmtime_t |
typedef rpmsw_s * | rpmsw |
typedef rpmop_s * | rpmop |
Enumerations | |
enum | fdOpX_e { FDSTAT_READ = 0, FDSTAT_WRITE = 1, FDSTAT_SEEK = 2, FDSTAT_CLOSE = 3, FDSTAT_DIGEST = 4, FDSTAT_MAX = 5 } |
Identify per-desciptor I/O operation statistics. More... | |
enum | rpmDigestFlags_e { RPMDIGEST_NONE = 0 } |
Bit(s) to control digest operation. More... | |
Functions | |
int | xstrcasecmp (const char *s1, const char *s2) |
Locale insensitive strcasecmp(3). | |
int | xstrncasecmp (const char *s1, const char *s2, size_t n) |
Locale insensitive strncasecmp(3). | |
const char * | xstrtolocale (const char *str) |
Force encoding of string. | |
const char * | fdbg (FD_t fd) |
int | fdFgets (FD_t fd, char *buf, size_t len) |
FD_t | ftpOpen (const char *url, int flags, mode_t mode, urlinfo *uret) |
int | ftpReq (FD_t data, const char *ftpCmd, const char *ftpArg) |
int | ftpCmd (const char *cmd, const char *url, const char *arg2) |
int | ufdClose (void *cookie) |
static void | fdSetOpen (FD_t fd, const char *path, int flags, mode_t mode) |
static const char * | fdGetOPath (FD_t fd) |
static int | fdGetOFlags (FD_t fd) |
static mode_t | fdGetOMode (FD_t fd) |
static FDIO_t | fdGetIo (FD_t fd) |
static void | fdSetIo (FD_t fd, FDIO_t io) |
static FILE * | fdGetFILE (FD_t fd) |
static void * | fdGetFp (FD_t fd) |
static void | fdSetFp (FD_t fd, void *fp) |
static int | fdGetFdno (FD_t fd) |
static void | fdSetFdno (FD_t fd, int fdno) |
static void | fdSetContentLength (FD_t fd, ssize_t contentLength) |
static void | fdPush (FD_t fd, FDIO_t io, void *fp, int fdno) |
static void | fdPop (FD_t fd) |
static rpmop | fdstat_op (FD_t fd, fdOpX opx) |
static void | fdstat_enter (FD_t fd, int opx) |
static void | fdstat_exit (FD_t fd, int opx, ssize_t rc) |
static void | fdstat_print (FD_t fd, const char *msg, FILE *fp) |
static void | fdSetSyserrno (FD_t fd, int syserrno, const void *errcookie) |
static int | fdGetRdTimeoutSecs (FD_t fd) |
static unsigned long long | fdGetCpioPos (FD_t fd) |
static void | fdSetCpioPos (FD_t fd, long int cpioPos) |
static FD_t | c2f (void *cookie) |
static void | fdInitDigest (FD_t fd, pgpHashAlgo hashalgo, int flags) |
Attach digest to fd. | |
static void | fdUpdateDigests (FD_t fd, const unsigned char *buf, ssize_t buflen) |
Update digest(s) attached to fd. | |
static void | fdFiniDigest (FD_t fd, pgpHashAlgo hashalgo, void *datap, size_t *lenp, int asAscii) |
static int | fdFileno (void *cookie) |
DIGEST_CTX | rpmDigestDup (DIGEST_CTX octx) |
Duplicate a digest context. | |
DIGEST_CTX | rpmDigestInit (pgpHashAlgo hashalgo, rpmDigestFlags flags) |
Initialize digest. | |
int | rpmDigestUpdate (DIGEST_CTX ctx, const void *data, size_t len) |
Update context with next plain text buffer. | |
int | rpmDigestFinal (DIGEST_CTX ctx, void *datap, size_t *lenp, int asAscii) |
Return digest and destroy context. | |
static rpmtime_t | tvsub (const struct timeval *etv, const struct timeval *btv) |
Return difference of 2 timeval stamps in micro-seconds. | |
int | rpmswEnter (rpmop op, ssize_t rc) |
Enter timed operation. | |
rpmtime_t | rpmswExit (rpmop op, ssize_t rc) |
Exit timed operation. | |
rpmtime_t | rpmswAdd (rpmop to, rpmop from) |
Sum statistic counters. | |
rpmtime_t | rpmswSub (rpmop to, rpmop from) |
Subtract statistic counters. | |
void | rpmswPrint (const char *name, rpmop op) |
Print operation statistics. |
|
Hide libio API lossage. The libio interface changed after glibc-2.1.3 to pass the seek offset argument as a pointer rather than as an off_t. The snarl below defines typedefs to isolate the lossage. |
|
|
|
|
|
|
|
|
|
Identify per-desciptor I/O operation statistics.
|
|
|
|
Cumulative statistics for a descriptor.
|
|
Bit(s) to control digest operation.
|
|
|
|
|
|
|
|
Identify per-desciptor I/O operation statistics.
Definition at line 144 of file rpmio_internal.h. |
|
Bit(s) to control digest operation.
|
|
Definition at line 599 of file rpmio_internal.h. References FDSANE. Referenced by __fdClose(), __fdRead(), __fdWrite(), fdFileno(), fdSeek(), fdSeekNot(), ftpReq(), ufdClose(), ufdRead(), ufdSeek(), ufdWrite(), and XfdLink(). |
|
Definition at line 161 of file rpmio.c. References _FD_s::bytesRemain, bzdio, fdio, _FDSTACK_s::fdno, _FDSTACK_s::fp, fpio, _FD_s::fps, gzdio, _FDSTACK_s::io, lzdio, _FD_s::nfps, _FD_s::rd_timeoutsecs, ufdio, and _FD_s::wr_chunked. Referenced by __fdClose(), __fdOpen(), __fdRead(), __fdWrite(), Fclose(), fdDup(), Fdopen(), fdSeek(), Ferror(), Fileno(), Fread(), Fseek(), Fwrite(), ufdOpen(), XfdFree(), and XfdLink(). |
|
Definition at line 613 of file rpmio.c. References _rpmio_debug, errno, fdFileno(), fdRead, fdReadable(), _FD_s::rd_timeoutsecs, and _FD_s::syserrno. Referenced by checkResponse(), and ftpNLST(). |
|
Definition at line 690 of file rpmio_internal.h. References c2f(), _FDSTACK_s::fdno, and _FD_s::fps. Referenced by __fdClose(), __fdRead(), __fdWrite(), fdFgets(), fdReadable(), fdSeek(), fdWritable(), Ferror(), Fopen(), ftpAbort(), ftpLogin(), ftpReq(), ufdRead(), urlConnect(), and XurlFree(). |
|
Definition at line 651 of file rpmio_internal.h. References _FD_s::digests, FDSTAT_DIGEST, fdstat_enter(), fdstat_exit(), _FDDIGEST_s::hashalgo, _FDDIGEST_s::hashctx, _FD_s::ndigests, and rpmDigestFinal(). Referenced by dodigest(), extractRegular(), statFormat(), and writeRPM(). |
|
Definition at line 579 of file rpmio_internal.h. References _FD_s::fd_cpioPos, and FDSANE. Referenced by fsmSetup(), and fsmStage(). |
|
Definition at line 406 of file rpmio_internal.h. References _FDSTACK_s::fdno, FDSANE, _FD_s::fps, and _FD_s::nfps. Referenced by Fclose(), Fopen(), and ufdWrite(). |
|
Definition at line 364 of file rpmio_internal.h. References FDSANE, _FD_s::fps, and _FD_s::nfps. |
|
Definition at line 378 of file rpmio_internal.h. References FDSANE, _FDSTACK_s::fp, _FD_s::fps, and _FD_s::nfps. Referenced by addFileToTagAux(), doScript(), Fdopen(), Fflush(), Fopen(), processPackageFiles(), readLine(), rpmfd_Fopen(), rpmReadPackageManifest(), and XurlFree(). |
|
Definition at line 336 of file rpmio_internal.h. References FDSANE, _FD_s::fps, _FDSTACK_s::io, and _FD_s::nfps. Referenced by Fflush(), Fread(), Fseek(), Fwrite(), getFdErrstr(), ufdRead(), and ufdWrite(). |
|
Definition at line 316 of file rpmio_internal.h. References FDSANE, and _FD_s::oflags. |
|
Definition at line 326 of file rpmio_internal.h. References FDSANE, and _FD_s::omode. |
|
Definition at line 306 of file rpmio_internal.h. References FDSANE, and _FD_s::opath. Referenced by rpmReadHeader(). |
|
Definition at line 569 of file rpmio_internal.h. References FDSANE, and _FD_s::rd_timeoutsecs. |
|
Attach digest to fd.
Definition at line 613 of file rpmio_internal.h. References _FD_s::digests, FDDIGEST_MAX, FDSTAT_DIGEST, fdstat_enter(), fdstat_exit(), _FDDIGEST_s::hashalgo, _FDDIGEST_s::hashctx, _FD_s::ndigests, and rpmDigestInit(). Referenced by dodigest(), extractRegular(), rpmReadPackageFile(), rpmVerifySignatures(), statFormat(), and writeRPM(). |
|
Definition at line 455 of file rpmio_internal.h. References FDSANE, fdSetFdno(), fdSetFp(), fdSetIo(), and _FD_s::nfps. Referenced by Fclose(). |
|
Definition at line 440 of file rpmio_internal.h. References FDSANE, fdSetFdno(), fdSetFp(), fdSetIo(), _FD_s::fps, and _FD_s::nfps. Referenced by Fdopen(), Fopen(), and XurlFree(). |
|
Definition at line 430 of file rpmio_internal.h. References _FD_s::bytesRemain, _FD_s::contentLength, and FDSANE. |
|
Definition at line 589 of file rpmio_internal.h. References _FD_s::fd_cpioPos, and FDSANE. Referenced by fsmSetup(), and fsmStage(). |
|
Definition at line 418 of file rpmio_internal.h. References _FDSTACK_s::fdno, FDSANE, _FD_s::fps, and _FD_s::nfps. Referenced by __fdClose(), __fdOpen(), fdDup(), fdPop(), fdPush(), ftpReq(), and tcpConnect(). |
|
Definition at line 391 of file rpmio_internal.h. References FDSANE, _FDSTACK_s::fp, _FD_s::fps, and _FD_s::nfps. Referenced by Fclose(), Fdopen(), fdPop(), fdPush(), and ufdClose(). |
|
Definition at line 349 of file rpmio_internal.h. References FDSANE, _FD_s::fps, _FDSTACK_s::io, and _FD_s::nfps. Referenced by fdPop(), fdPush(), ftpOpen(), ufdOpen(), and urlConnect(). |
|
Definition at line 290 of file rpmio_internal.h. References FDSANE, _FD_s::oflags, _FD_s::omode, _FD_s::opath, and xstrdup(). Referenced by __fdOpen(), fdDup(), ftpOpen(), rpmtsCallback(), ufdOpen(), and urlConnect(). |
|
Definition at line 556 of file rpmio_internal.h. References _FD_s::errcookie, FDSANE, and _FD_s::syserrno. Referenced by ftpLogin(), ftpReq(), and tcpConnect(). |
|
Definition at line 484 of file rpmio_internal.h. References fdstat_op(), rpmswEnter(), and _FD_s::stats. Referenced by __fdClose(), __fdRead(), __fdWrite(), fdFiniDigest(), fdInitDigest(), fdSeek(), and fdUpdateDigests(). |
|
Definition at line 496 of file rpmio_internal.h. References _FD_s::bytesRemain, errno, fdstat_op(), FDSTAT_READ, FDSTAT_WRITE, rpmswExit(), _FD_s::stats, and _FD_s::syserrno. Referenced by __fdClose(), __fdRead(), __fdWrite(), fdFiniDigest(), fdInitDigest(), fdSeek(), and fdUpdateDigests(). |
|
Definition at line 469 of file rpmio_internal.h. References FDSTAT_MAX, and _FD_s::stats. Referenced by fdstat_enter(), fdstat_exit(), fsmStage(), rpmpsmStage(), and rpmReadPackageFile(). |
|
Definition at line 520 of file rpmio_internal.h. References rpmop_s::bytes, rpmop_s::count, FDSTAT_CLOSE, FDSTAT_READ, FDSTAT_SEEK, FDSTAT_WRITE, _FD_s::stats, and rpmop_s::usecs. |
|
Update digest(s) attached to fd.
Definition at line 631 of file rpmio_internal.h. References _FD_s::digests, FDSTAT_DIGEST, fdstat_enter(), fdstat_exit(), _FDDIGEST_s::hashctx, _FD_s::ndigests, and rpmDigestUpdate(). Referenced by __fdRead(), and __fdWrite(). |
|
Definition at line 1618 of file rpmio.c. References urlinfo_s::ctrl, fdFree, ftpCommand(), urlConnect(), and urlPath(). Referenced by ftpChdir(), ftpMkdir(), ftpRename(), ftpRmdir(), and ftpUnlink(). |
|
Definition at line 2162 of file rpmio.c. References urlinfo_s::data, fdLink, fdNew, fdSetIo(), fdSetOpen(), ftpTimeoutSecs, ufdio, _FD_s::url, URL_IS_FTP, urlConnect(), and urlLink. |
|
Definition at line 1221 of file rpmio.c. References _ftp_debug, alloca(), c2f(), _FD_s::contentLength, urlinfo_s::ctrl, errno, fdClose, fdFileno(), fdLink, fdSetFdno(), fdSetSyserrno(), fdWrite, ftpCheckResponse(), ftpCommand(), FTPERR_BAD_SERVER_RESPONSE, FTPERR_FAILED_CONNECT, FTPERR_FAILED_DATA_CONNECT, FTPERR_PASSIVE_ERROR, FTPERR_SERVER_IO_ERROR, FTPERR_UNKNOWN, _FD_s::ftpFileDoneNeeded, ftpStrerror(), inet_aton(), stpcpy(), _FD_s::url, and URLSANE. |
|
Duplicate a digest context.
Definition at line 325 of file digest.c. References DIGEST_CTX_s::param, and xcalloc(). Referenced by verifyDSASignature(), verifyMD5Signature(), verifyRSASignature(), and verifySHA1Signature(). |
|
Return digest and destroy context. Final wrapup - pad to 64-byte boundary with the bit pattern 1 0* (64-bit count of bits processed, MSB-first)
Definition at line 661 of file digest.c. References DIGEST_CTX_s::Digest, DIGEST_CTX_s::digestsize, DPRINTF, DIGEST_CTX_s::param, DIGEST_CTX_s::paramsize, and xmalloc(). Referenced by digestFormat(), dodigest(), fdFiniDigest(), makeHDRSignature(), pgpFreeDig(), pgpPubkeyFingerprint(), unsatisfiedDepend(), verifyDSASignature(), verifyMD5Signature(), verifyRSASignature(), verifySHA1Signature(), and XfdFree(). |
|
Initialize digest. Set bit count to 0 and buffer to mysterious initialization constants.
Definition at line 335 of file digest.c. References crc32(), crc64(), crc64_combine(), DPRINTF, PGPHASHALGO_ADLER32, PGPHASHALGO_CRC32, PGPHASHALGO_CRC64, PGPHASHALGO_HAVAL_5_160, PGPHASHALGO_JLU32, PGPHASHALGO_MD2, PGPHASHALGO_MD4, PGPHASHALGO_MD5, PGPHASHALGO_RIPEMD128, PGPHASHALGO_RIPEMD160, PGPHASHALGO_RIPEMD256, PGPHASHALGO_RIPEMD320, PGPHASHALGO_SALSA10, PGPHASHALGO_SALSA20, PGPHASHALGO_SHA1, PGPHASHALGO_SHA224, PGPHASHALGO_SHA256, PGPHASHALGO_SHA384, PGPHASHALGO_SHA512, PGPHASHALGO_TIGER192, sum32Digest(), sum32Reset(), sum32Update(), sum64Digest(), sum64Reset(), sum64Update(), and xcalloc(). Referenced by digestFormat(), dodigest(), fdInitDigest(), headerCheck(), makeHDRSignature(), pgpPubkeyFingerprint(), readFile(), rpmReadPackageFile(), and unsatisfiedDepend(). |
|
Update context with next plain text buffer.
Definition at line 647 of file digest.c. References DPRINTF, DIGEST_CTX_s::param, and DIGEST_CTX_s::Update. Referenced by digestFormat(), dodigest(), fdUpdateDigests(), headerCheck(), makeHDRSignature(), pgpPubkeyFingerprint(), readFile(), rpmReadPackageFile(), unsatisfiedDepend(), verifyDSASignature(), and verifyRSASignature(). |
|
Sum statistic counters.
Definition at line 274 of file rpmsw.c. References rpmop_s::bytes, rpmop_s::count, and rpmop_s::usecs. Referenced by fsmStage(), psmWait(), rpmpsmStage(), rpmReadPackageFile(), rpmtsCloseDB(), and rpmtsCloseSDB(). |
|
Enter timed operation.
Definition at line 242 of file rpmsw.c. References rpmop_s::begin, rpmop_s::bytes, rpmop_s::count, rpmswNow(), and rpmop_s::usecs. Referenced by doHeaderUnload(), fdstat_enter(), headerCheck(), rpmpsmStage(), rpmReadPackageFile(), rpmsqWaitUnregister(), rpmtsCheck(), rpmtsCreate(), rpmtsOrder(), rpmtsRun(), verifyDSASignature(), verifyMD5Signature(), verifyRSASignature(), and verifySHA1Signature(). |
|
Exit timed operation.
Definition at line 258 of file rpmsw.c. References rpmop_s::begin, rpmop_s::bytes, rpmswDiff(), rpmswNow(), and rpmop_s::usecs. Referenced by doHeaderUnload(), fdstat_exit(), headerCheck(), rpmpsmStage(), rpmReadPackageFile(), rpmsqWaitUnregister(), rpmtsCheck(), rpmtsOrder(), rpmtsPrintStats(), rpmtsRun(), verifyDSASignature(), verifyMD5Signature(), verifyRSASignature(), and verifySHA1Signature(). |
|
Print operation statistics.
Definition at line 298 of file rpmsw.c. References rpmop_s::bytes, rpmop_s::count, and rpmop_s::usecs. |
|
Subtract statistic counters.
Definition at line 286 of file rpmsw.c. References rpmop_s::bytes, rpmop_s::count, and rpmop_s::usecs. Referenced by rpmReadPackageFile(). |
|
Return difference of 2 timeval stamps in micro-seconds.
Definition at line 107 of file rpmsw.c. References rpmop_s::usecs. Referenced by rpmswDiff(). |
|
Definition at line 2048 of file rpmio.c. References _FD_s::bytesRemain, c2f(), _FD_s::contentLength, urlinfo_s::ctrl, urlinfo_s::data, fdClose, fdFree, fdGetFILE, fdReadable(), fdSetFp(), ftpAbort(), ftpFileDone(), _FD_s::ftpFileDoneNeeded, noLibio, _FD_s::persist, urlinfo_s::scheme, UFDONLY, _FD_s::url, URL_IS_FTP, urlFree, and urlinfo_s::urltype. |
|
Locale insensitive strcasecmp(3).
Definition at line 9 of file strcasecmp.c. References xtolower(). Referenced by _tagValue(), findTag(), hdr_subscript(), isMemberInEntry(), machAddEquiv(), machEquivSearch(), myTagValue(), optionCompare(), parseYesNo(), rpmLookupSignatureType(), rpmRebuildTargetVars(), and tagNumFromPyObject(). |
|
Locale insensitive strncasecmp(3).
Definition at line 32 of file strcasecmp.c. References xtolower(). Referenced by findPreambleTag(), isPart(), Link(), matchTok(), and Rename(). |
|
Force encoding of string.
Referenced by i18nTag(), localeTag(), parseChangelog(), xmlFormat(), and yamlFormat(). |
|
|
|
Cumulative statistics. Definition at line 157 of file rpmio_internal.h. |
|
|