#include "system.h"
#include <stdarg.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <rpmmacro.h>
#include <rpmio_internal.h>
#include <rpmdav.h>
#include "ugid.h"
#include "rpmmessages.h"
#include "debug.h"
#include "LzmaDecode.h"
Include dependency graph for rpmio.c:
Go to the source code of this file.
Data Structures | |
struct | _CBuffer |
struct | lzfile |
Defines | |
#define | IPPORT_FTP 21 |
#define | IPPORT_HTTP 80 |
#define | fdOpen __fdOpen |
#define | fdRead __fdRead |
#define | fdWrite __fdWrite |
#define | fdClose __fdClose |
#define | FDNREFS(fd) (fd ? ((FD_t)fd)->nrefs : -9) |
#define | FDTO(fd) (fd ? ((FD_t)fd)->rd_timeoutsecs : -99) |
#define | FDCPIOPOS(fd) (fd ? ((FD_t)fd)->fd_cpioPos : -99) |
#define | FDONLY(fd) assert(fdGetIo(fd) == fdio) |
#define | GZDONLY(fd) assert(fdGetIo(fd) == gzdio) |
#define | BZDONLY(fd) assert(fdGetIo(fd) == bzdio) |
#define | LZDONLY(fd) assert(fdGetIo(fd) == lzdio) |
#define | UFDONLY(fd) |
#define | fdGetFILE(_fd) ((FILE *)fdGetFp(_fd)) |
#define | TIMEOUT_SECS 60 |
#define | IAC 255 |
#define | IP 244 |
#define | DM 242 |
#define | SHUT_RDWR 1+1 |
#define | kInBufferSize (1 << 15) |
#define | FDIOVEC(_fd, _vec) ((fdGetIo(_fd) && fdGetIo(_fd)->_vec) ? fdGetIo(_fd)->_vec : NULL) |
#define | _PATH "/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:~/bin" |
#define | alloca_strdup(_s) strcpy(alloca(strlen(_s)+1), (_s)) |
Typedefs | |
typedef _CBuffer | CBuffer |
typedef lzfile | LZFILE |
Functions | |
static int | inet_aton (const char *cp, struct in_addr *inp) |
static void * | _free (const void *p) |
Wrapper to free(3), hides const compilation noise, permit NULL, return NULL. | |
static const char * | fdbg (FD_t fd) |
off_t | fdSize (FD_t fd) |
FD_t | fdDup (int fdno) |
static int | fdSeekNot (void *cookie, _libio_pos_t pos, int whence) |
static FD_t | XfdLink (void *cookie, const char *msg, const char *file, unsigned line) |
static FD_t | XfdFree (FD_t fd, const char *msg, const char *file, unsigned line) |
static FD_t | XfdNew (const char *msg, const char *file, unsigned line) |
static ssize_t | __fdRead (void *cookie, char *buf, size_t count) |
static ssize_t | __fdWrite (void *cookie, const char *buf, size_t count) |
static int | fdSeek (void *cookie, _libio_pos_t pos, int whence) |
static int | __fdClose (void *cookie) |
static FD_t | __fdOpen (const char *path, int flags, mode_t mode) |
int | fdWritable (FD_t fd, int secs) |
int | fdReadable (FD_t fd, int secs) |
int | fdFgets (FD_t fd, char *buf, size_t len) |
const char * | ftpStrerror (int errorNumber) |
const char * | urlStrerror (const char *url) |
static int | mygethostbyname (const char *host, struct in_addr *address) |
static int | getHostAddress (const char *host, struct in_addr *address) |
static int | tcpConnect (FD_t ctrl, const char *host, int port) |
static int | checkResponse (void *uu, FD_t ctrl, int *ecp, char **str) |
static int | ftpCheckResponse (urlinfo u, char **str) |
static int | ftpCommand (urlinfo u, char **str,...) |
static int | ftpLogin (urlinfo u) |
int | ftpReq (FD_t data, const char *ftpCmd, const char *ftpArg) |
void | urlSetCallback (rpmCallbackFunction notify, void *notifyData, int notifyCount) |
int | ufdCopy (FD_t sfd, FD_t tfd) |
static int | urlConnect (const char *url, urlinfo *uret) |
int | ufdGetFile (FD_t sfd, FD_t tfd) |
int | ftpCmd (const char *cmd, const char *url, const char *arg2) |
static int | ftpAbort (urlinfo u, FD_t data) |
static int | ftpFileDone (urlinfo u, FD_t data) |
void * | ufdGetUrlinfo (FD_t fd) |
static ssize_t | ufdRead (void *cookie, char *buf, size_t count) |
static ssize_t | ufdWrite (void *cookie, const char *buf, size_t count) |
static int | ufdSeek (void *cookie, _libio_pos_t pos, int whence) |
int | ufdClose (void *cookie) |
FD_t | ftpOpen (const char *url, int flags, mode_t mode, urlinfo *uret) |
static FD_t | ufdOpen (const char *url, int flags, mode_t mode) |
static size_t | MyReadFile (FILE *file, void *data, size_t size) |
static int | MyReadFileAndCheck (FILE *file, void *data, size_t size) |
static int | LzmaReadCompressed (void *object, const unsigned char **buffer, unsigned int *size) |
static void * | lzdFileno (FD_t fd) |
static FD_t | lzdWriteOpen (int fdno, int fopen) |
static FD_t | lzdReadOpen (int fdno, int fopen) |
static FD_t | lzdOpen (const char *path, const char *mode) |
static FD_t | lzdFdopen (void *cookie, const char *fmode) |
static int | lzdFlush (FD_t fd) |
static ssize_t | lzdRead (void *cookie, char *buf, size_t count) |
static ssize_t | lzdWrite (void *cookie, const char *buf, size_t count) |
static int | lzdSeek (void *cookie, _libio_pos_t pos, int whence) |
static int | lzdClose (void *cookie) |
static const char * | getFdErrstr (FD_t fd) |
const char * | Fstrerror (FD_t fd) |
strerror(3) clone. | |
size_t | Fread (void *buf, size_t size, size_t nmemb, FD_t fd) |
fread(3) clone. | |
size_t | Fwrite (const void *buf, size_t size, size_t nmemb, FD_t fd) |
fwrite(3) clone. | |
int | Fseek (FD_t fd, _libio_off_t offset, int whence) |
fseek(3) clone. | |
int | Fclose (FD_t fd) |
fclose(3) clone. | |
static void | cvtfmode (const char *m, char *stdio, size_t nstdio, char *other, size_t nother, const char **end, int *f) |
Convert stdio fmode to open(2) mode, filtering out zlib/bzlib flags. | |
FD_t | Fdopen (FD_t ofd, const char *fmode) |
FD_t | Fopen (const char *path, const char *fmode) |
fopen(3) clone. | |
int | Fflush (FD_t fd) |
fflush(3) clone. | |
int | Ferror (FD_t fd) |
ferror(3) clone. | |
int | Fileno (FD_t fd) |
fileno(3) clone. | |
int | Fcntl (FD_t fd, int op, void *lip) |
fcntl(2) clone. | |
int | rpmioMkpath (const char *path, mode_t mode, uid_t uid, gid_t gid) |
Insure that directories in path exist, creating as needed. | |
int | rpmioAccess (const char *FN, const char *path, int mode) |
Check FN access, expanding relative paths and twiddles. | |
int | rpmioSlurp (const char *fn, const byte **bp, ssize_t *blenp) |
Read an entire file into a buffer. | |
Variables | |
int | noLibio = 1 |
static int | ftpTimeoutSecs = 60 |
int | _rpmio_debug = 0 |
int | _av_debug = 0 |
int | _ftp_debug = 0 |
int | _dav_debug = 0 |
static struct FDIO_s | fdio_s |
FDIO_t | fdio = &fdio_s |
static rpmCallbackFunction | urlNotify = NULL |
static void * | urlNotifyData = NULL |
static int | urlNotifyCount = -1 |
static struct FDIO_s | ufdio_s |
FDIO_t | ufdio = &ufdio_s |
static struct FDIO_s | lzdio_s |
FDIO_t | lzdio = &lzdio_s |
static const char * | _path = "/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:~/bin" |
static struct FDIO_s | fpio_s |
FDIO_t | fpio = &fpio_s |
Definition in file rpmio.c.
|
|
|
|
|
|
|
Definition at line 1677 of file rpmio.c. Referenced by ftpAbort(). |
|
Definition at line 103 of file rpmio.c. Referenced by Fclose(), Fopen(), ftpAbort(), ftpLogin(), and ufdClose(). |
|
|
|
Definition at line 126 of file rpmio.c. Referenced by argvFgets(), Fclose(), Ferror(), Fflush(), Fread(), Fseek(), Fwrite(), rdcl(), rpmdsCpuinfo(), rpmdsSysinfoFile(), and ufdClose(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 101 of file rpmio.c. Referenced by ftpAbort(), ftpCommand(), and ufdWrite(). |
|
|
|
Definition at line 1671 of file rpmio.c. Referenced by ftpAbort(). |
|
Definition at line 1674 of file rpmio.c. Referenced by ftpAbort(). |
|
Definition at line 70 of file rpmio.c. Referenced by ftpLogin(), and urlSplit(). |
|
Definition at line 73 of file rpmio.c. Referenced by urlSplit(). |
|
Definition at line 2775 of file rpmio.c. Referenced by LzmaReadCompressed(). |
|
Definition at line 122 of file rpmio.c. Referenced by lzdSeek(). |
|
Definition at line 1680 of file rpmio.c. Referenced by ftpAbort(). |
|
|
|
Definition at line 124 of file rpmio.c. Referenced by ufdClose(), ufdRead(), and ufdWrite(). |
|
|
|
|
|
Definition at line 481 of file rpmio.c. References c2f(), DBGIO, fdbg(), fdFileno, fdFree, fdSetFdno(), FDSTAT_CLOSE, fdstat_enter(), fdstat_exit(), and _FD_s::req. |
|
Definition at line 511 of file rpmio.c. References DBGIO, fdbg(), fdNew, fdSetFdno(), fdSetOpen(), and _FD_s::flags. |
|
Definition at line 399 of file rpmio.c. References _FD_s::bytesRemain, c2f(), DBGIO, fdbg(), fdFileno, fdstat_enter(), fdstat_exit(), FDSTAT_READ, fdUpdateDigests(), _FD_s::ndigests, and _FD_s::req. |
|
Definition at line 430 of file rpmio.c. References _FD_s::bytesRemain, c2f(), DBGIO, fdbg(), fdFileno, fdstat_enter(), fdstat_exit(), FDSTAT_WRITE, fdUpdateDigests(), _FD_s::ndigests, and _FD_s::req. |
|
Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
|
|
Definition at line 941 of file rpmio.c. References _ftp_debug, _url_iobuf_size, urlinfo_s::buf, urlinfo_s::bufAlloced, _FD_s::contentLength, fdFgets(), fdWritable(), FTPERR_BAD_SERVER_RESPONSE, urlinfo_s::httpVersion, _FD_s::persist, URLSANE, and xcalloc(). Referenced by ftpCheckResponse(). |
|
Convert stdio fmode to open(2) mode, filtering out zlib/bzlib flags. returns stdio[0] = NUL on error.
|
|
|
fcntl(2) clone.
Definition at line 3677 of file rpmio.c. References Fileno(). |
|
Definition at line 180 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(), lzdClose(), ufdOpen(), XfdFree(), and XfdLink(). |
|
Definition at line 270 of file rpmio.c. References DBGIO, fdbg(), fdNew, fdSetFdno(), and fdSetOpen(). Referenced by cpio_doio(), dodigest(), readRPM(), rpmHeaderFromFD(), rpmMergeHeadersFromFD(), rpmpsmStage(), rpmSingleHeaderFromFD(), rpmts_HdrFromFdno(), rpmts_setattro(), rpmtsCallback(), showVerifyPackage(), and ufdOpen(). |
|
Definition at line 3414 of file rpmio.c. References _rpmio_debug, FDIO_s::close, cvtfmode(), DBGIO, fdbg(), fdGetFp(), fdio, fdLink, fdPush(), FDSANE, fdSetFp(), Fileno(), fpio, lzdFdopen(), lzdio, noLibio, FDIO_s::read, FDIO_s::seek, ufdio, and FDIO_s::write. Referenced by cpio_doio(), doScript(), Fopen(), rpmpsmStage(), and rpmReadPackageManifest(). |
|
Definition at line 595 of file rpmio.c. References errno, fdFileno, and _FD_s::req. Referenced by fdFgets(), ftpAbort(), ufdClose(), and ufdRead(). |
|
Definition at line 459 of file rpmio.c. References _FD_s::bytesRemain, c2f(), DBGIO, fdbg(), fdFileno, fdstat_enter(), fdstat_exit(), and FDSTAT_SEEK. Referenced by ufdSeek(). |
|
|
|
Definition at line 243 of file rpmio.c. References _FD_s::contentLength, DBGIO, FDSANE, Fileno(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and _FD_s::urlType. Referenced by doReadRC(), and rpmioSlurp(). |
|
Definition at line 540 of file rpmio.c. References _rpmio_debug, errno, fdFileno, _FD_s::req, and strerror. Referenced by checkResponse(), and ftpLogin(). |
|
ferror(3) clone.
Definition at line 3617 of file rpmio.c. References DBGIO, _FD_s::errcookie, fdbg(), fdFileno, fdGetFILE, fpio, _FD_s::fps, _FDSTACK_s::io, lzdio, _FD_s::nfps, _FD_s::req, and _FD_s::syserrno. Referenced by addFileToTagAux(), cpio_copy(), defaultMachine(), dodigest(), doIcon(), doReadRC(), doScript(), IDTXglob(), isCompressed(), isSpecFile(), makeGPGSignature(), makeHDRSignature(), makePGPSignature(), makeTempFile(), manageFile(), processPackageFiles(), readLead(), readLine(), readRPM(), rpmcliSign(), rpmdsCpuinfo(), rpmdsSysinfoFile(), rpmfd_Fopen(), rpmfd_init(), rpmgiOpen(), rpmInstallSource(), rpmioSlurp(), rpmLoadMacroFile(), rpmpsmStage(), rpmShowProgress(), rpmtsSolve(), urlGetFile(), and writeRPM(). |
|
fflush(3) clone.
Definition at line 3597 of file rpmio.c. References fdGetFILE, fdGetFp(), fdGetIo(), and fpio. Referenced by copyFile(), cpio_doio(), extractRegular(), rpmpsmStage(), and writeRPM(). |
|
fileno(3) clone.
Definition at line 3659 of file rpmio.c. References DBGIO, fdbg(), _FDSTACK_s::fdno, _FD_s::fps, _FD_s::nfps, and _FD_s::req. Referenced by cpio_doio(), doScript(), Fcntl(), Fdopen(), fdSize(), makeTempFile(), printSize(), rpmpsmStage(), rpmReadPackageFile(), rpmtsCallback(), ufdOpen(), writeFile(), and writeRPM(). |
|
fopen(3) clone.
Definition at line 3524 of file rpmio.c. References _rpmio_debug, cvtfmode(), fdClose, fdFileno, fdGetFdno(), fdGetFp(), fdOpen, Fdopen(), fdPush(), fpio, _FD_s::req, ufdOpen(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlIsURL(). Referenced by addFileToTagAux(), defaultMachine(), dodigest(), doIcon(), doReadRC(), IDTXglob(), isCompressed(), isSpecFile(), makeGPGSignature(), makeHDRSignature(), makePGPSignature(), makeTempFile(), manageFile(), processPackageFiles(), readLine(), readRPM(), rpmcliSign(), rpmdbExportInfo(), rpmdsCpuinfo(), rpmdsSysinfoFile(), rpmfd_Fopen(), rpmfd_init(), rpmgiOpen(), rpmHeaderFromFile(), rpmInstallSource(), rpmioSlurp(), rpmLoadMacroFile(), rpmpsmStage(), rpmShowProgress(), rpmtsRollback(), rpmtsSolve(), urlGetFile(), and writeRPM(). |
|
fread(3) clone.
Definition at line 3152 of file rpmio.c. References DBGIO, fdbg(), fdGetFILE, fdGetIo(), FDIOVEC, FDSANE, fpio, and FDIO_s::read. Referenced by copyFile(), cpio_copy(), defaultMachine(), dodigest(), doIcon(), doReadRC(), isCompressed(), isSpecFile(), readFile(), readRPM(), rpmioSlurp(), rpmReadPackageFile(), ufdCopy(), and writeRPM(). |
|
fseek(3) clone.
Definition at line 3199 of file rpmio.c. References DBGIO, fdbg(), fdGetFILE, fdGetIo(), FDIOVEC, FDSANE, fpio, and FDIO_s::seek. Referenced by readRPM(), and writeRPM(). |
|
strerror(3) clone.
Definition at line 3141 of file rpmio.c. References errno, FDSANE, getFdErrstr(), and strerror. Referenced by copyFile(), cpio_copy(), doIcon(), doReadRC(), IDTXglob(), isCompressed(), isSpecFile(), manageFile(), processPackageFiles(), readFile(), readLead(), readLine(), readRPM(), rpmfd_Fopen(), rpmfd_init(), rpmgiOpen(), rpmInstallSource(), rpmpsmStage(), rpmReadPackageFile(), rpmReSign(), rpmShowProgress(), rpmtsSolve(), urlGetFile(), and writeRPM(). |
|
Definition at line 1683 of file rpmio.c. References urlinfo_s::buf, urlinfo_s::bufAlloced, urlinfo_s::ctrl, DBGIO, DM, fdClose, fdFileno, fdFree, _FDSTACK_s::fdno, fdReadable(), fdWrite, _FD_s::fps, ftpCheckResponse(), FTPERR_NIC_ABORT_IN_PROGRESS, FTPERR_SERVER_IO_ERROR, _FD_s::ftpFileDoneNeeded, IAC, IP, _FD_s::rd_timeoutsecs, SHUT_RDWR, timedRead, and URLSANE. Referenced by ufdClose(). |
|
Definition at line 1105 of file rpmio.c. References checkResponse(), urlinfo_s::ctrl, FTPERR_BAD_SERVER_RESPONSE, FTPERR_FILE_NOT_FOUND, FTPERR_NIC_ABORT_IN_PROGRESS, and URLSANE. Referenced by ftpAbort(), ftpCommand(), ftpFileDone(), and ftpLogin(). |
|
Definition at line 1131 of file rpmio.c. References _ftp_debug, alloca(), urlinfo_s::ctrl, fdWrite, ftpCheckResponse(), FTPERR_SERVER_IO_ERROR, stpcpy(), and URLSANE. Referenced by ftpCmd(), ftpLogin(), and ftpReq(). |
|
Definition at line 1746 of file rpmio.c. References urlinfo_s::ctrl, fdFree, ftpCheckResponse(), _FD_s::ftpFileDoneNeeded, and URLSANE. Referenced by ufdClose(). |
|
Definition at line 1171 of file rpmio.c. References alloca(), urlinfo_s::ctrl, errno, fdClose, fdFileno, fdLink, fdSetSyserrno(), fdWritable(), ftpCheckResponse(), ftpCommand(), FTPERR_BAD_HOSTNAME, ftpStrerror(), urlinfo_s::host, IPPORT_FTP, urlinfo_s::password, urlinfo_s::port, urlinfo_s::proxyh, urlinfo_s::proxyp, urlinfo_s::proxyu, tcpConnect(), URLSANE, and urlinfo_s::user. Referenced by urlConnect(). |
|
|
fwrite(3) clone.
Definition at line 3174 of file rpmio.c. References DBGIO, fdbg(), fdGetFILE, fdGetIo(), FDIOVEC, FDSANE, fpio, and FDIO_s::write. Referenced by copyFile(), cpio_copy(), rpmWriteSignature(), ufdCopy(), writeLead(), and writeRPM(). |
|
Definition at line 3113 of file rpmio.c. References _FD_s::errcookie, fdGetIo(), lzdio, strerror, and _FD_s::syserrno. Referenced by Fstrerror(). |
|
Definition at line 817 of file rpmio.c. References errno, FTPERR_BAD_HOST_ADDR, FTPERR_BAD_HOSTNAME, inet_aton(), mygethostbyname(), and xisdigit(). |
|
Definition at line 77 of file rpmio.c. Referenced by getHostAddress(). |
|
< mask for one priority Definition at line 3059 of file rpmio.c. References _free(), _rpmio_debug, c2f(), DBGIO, _FD_s::errcookie, fdbg(), fdFree, FDSTAT_CLOSE, fdstat_enter(), fdstat_exit(), fdstat_print(), _CBuffer::File, lzfile::g_InBuffer, lzdFileno(), lzfile::pid, rpmIsDebug, lzfile::state, and strerror. |
|
Definition at line 2960 of file rpmio.c. References c2f(), fdFileno, fdSetFdno(), lzdReadOpen(), and lzdWriteOpen(). Referenced by Fdopen(). |
|
Definition at line 2819 of file rpmio.c. References FDSANE, _FDSTACK_s::fp, _FD_s::fps, _FDSTACK_s::io, lzdio, and _FD_s::nfps. Referenced by lzdClose(), lzdFlush(), lzdRead(), and lzdWrite(). |
|
Definition at line 2980 of file rpmio.c. References _CBuffer::File, lzfile::g_InBuffer, and lzdFileno(). |
|
Definition at line 2939 of file rpmio.c. References lzdReadOpen(), and lzdWriteOpen(). |
|
Definition at line 2994 of file rpmio.c. References _FD_s::bytesRemain, c2f(), _FD_s::errcookie, fdstat_enter(), fdstat_exit(), FDSTAT_READ, fdUpdateDigests(), _CBuffer::File, lzfile::g_InBuffer, _CBuffer::InCallback, lzdFileno(), _FD_s::ndigests, and lzfile::state. |
|
Definition at line 2888 of file rpmio.c. References _free(), fdLink, fdNew, fdPop(), fdPush(), lzdio, LzmaReadCompressed(), MyReadFileAndCheck(), xcalloc(), and xmalloc(). Referenced by lzdFdopen(), and lzdOpen(). |
|
|
|
Definition at line 3025 of file rpmio.c. References _FD_s::bytesRemain, c2f(), _FD_s::errcookie, fdstat_enter(), fdstat_exit(), FDSTAT_WRITE, fdUpdateDigests(), _CBuffer::File, lzfile::g_InBuffer, lzdFileno(), _FD_s::ndigests, and strerror. |
|
Definition at line 2839 of file rpmio.c. References _free(), fdLink, fdNew, fdPop(), fdPush(), lzdio, and xcalloc(). Referenced by lzdFdopen(), and lzdOpen(). |
|
Definition at line 2809 of file rpmio.c. References _CBuffer::Buffer, _CBuffer::File, kInBufferSize, and MyReadFile(). Referenced by lzdReadOpen(). |
|
Definition at line 796 of file rpmio.c. Referenced by getHostAddress(). |
|
Definition at line 2794 of file rpmio.c. Referenced by LzmaReadCompressed(), and MyReadFileAndCheck(). |
|
Definition at line 2802 of file rpmio.c. References MyReadFile(). Referenced by lzdReadOpen(). |
|
Check FN access, expanding relative paths and twiddles.
Definition at line 3743 of file rpmio.c. References alloca_strdup, and X_OK. Referenced by rpmtsCreate(), and unsatisfiedDepend(). |
|
Insure that directories in path exist, creating as needed.
Definition at line 3686 of file rpmio.c. References alloca(), errno, Mkdir(), Stat(), and stpcpy(). Referenced by db3open(), and makeTempFile(). |
|
Read an entire file into a buffer.
Definition at line 3878 of file rpmio.c. References Fclose(), fdSize(), Ferror(), Fopen(), Fread(), xmalloc(), and xrealloc(). Referenced by pgpReadPkts(), processMetadataFile(), and rpmPlatform(). |
|
Definition at line 847 of file rpmio.c. References _ftp_debug, and FTPERR_FAILED_CONNECT. Referenced by ftpLogin(). |
|
Definition at line 1529 of file rpmio.c. References DBGIO, Fread(), FTPERR_FILE_IO_ERROR, ftpStrerror(), Fwrite(), RPMCALLBACK_INST_OPEN_FILE, and RPMCALLBACK_INST_PROGRESS. Referenced by ufdGetFile(). |
|
Definition at line 1640 of file rpmio.c. References Fclose(), FDSANE, and ufdCopy(). Referenced by urlGetFile(). |
|
Definition at line 1918 of file rpmio.c. References FDSANE, _FD_s::url, and urlLink. |
|
Definition at line 2239 of file rpmio.c. References _rpmio_debug, _FD_s::bytesRemain, _FD_s::contentLength, DBGIO, fdbg(), fdDup(), fdLink, fdOpen, fdSetIo(), fdSetOpen(), Fileno(), ftpOpen(), ftpReq(), urlinfo_s::openError, STDIN_FILENO, ufdClose(), ufdio, URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, urlPath(), _FD_s::urlType, and _FD_s::wr_chunked. Referenced by Fopen(). |
|
Definition at line 1927 of file rpmio.c. References _FD_s::bytesRemain, c2f(), fdFileno, fdGetIo(), fdio, fdRead, fdReadable(), _FD_s::rd_timeoutsecs, and UFDONLY. |
|
Definition at line 2059 of file rpmio.c. References c2f(), fdSeek(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and _FD_s::urlType. |
|
Definition at line 1994 of file rpmio.c. References _FD_s::bytesRemain, c2f(), fdGetFdno(), fdGetIo(), fdio, fdWrite, and UFDONLY. |
|
Definition at line 1593 of file rpmio.c. References _, _FD_s::bytesRemain, _FD_s::contentLength, urlinfo_s::ctrl, fdFileno, fdFree, fdLink, fdNew, fdSetIo(), fdSetOpen(), _FD_s::ftpFileDoneNeeded, ftpLogin(), ftpTimeoutSecs, urlinfo_s::host, urlinfo_s::openError, urlinfo_s::password, _FD_s::rd_timeoutsecs, RPMMESS_DEBUG, rpmMessage, ufdio, _FD_s::url, URL_IS_FTP, urlFree, urlLink, urlSplit(), urlinfo_s::urltype, and urlinfo_s::user. |
|
|
|
Definition at line 770 of file rpmio.c. References _, errno, ftpStrerror(), urlinfo_s::openError, strerror, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, urlIsURL(), and urlSplit(). |
|
Definition at line 331 of file rpmio.c. References _free(), DBGREFS, fdbg(), FDNREFS, FDSANE, _FDDIGEST_s::hashctx, and rpmDigestFinal(). |
|
Definition at line 312 of file rpmio.c. References c2f(), DBGREFS, fdbg(), FDNREFS, and _FD_s::nrefs. Referenced by XfdNew(). |
|
Definition at line 360 of file rpmio.c. References FDMAGIC, ufdio, URL_IS_UNKNOWN, xcalloc(), and XfdLink(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 538 of file rpmio.c. Referenced by fdbg(), Fdopen(), ufdRead(), ufdWrite(), and XurlFree(). |
|
Initial value: |
|
Definition at line 3937 of file rpmio.c. Referenced by Fclose(), fdbg(), Fdopen(), Ferror(), Fflush(), Fopen(), Fread(), Fseek(), Fwrite(), and XurlFree(). |
|
Initial value: |
|
Definition at line 142 of file rpmio.c. Referenced by ftpOpen(), and urlConnect(). |
|
Definition at line 3109 of file rpmio.c. Referenced by fdbg(), Fdopen(), Ferror(), getFdErrstr(), lzdFileno(), lzdReadOpen(), and lzdWriteOpen(). |
|
Initial value: |
|
|
|
Definition at line 2336 of file rpmio.c. Referenced by Fclose(), fdbg(), Fdopen(), ftpOpen(), ufdOpen(), urlConnect(), and XfdNew(). |
|
Initial value: |
|
|
|
|
|
|