#include "system.h"
#include "rpmio_internal.h"
#include <popt.h>
#include "ugid.h"
#include "debug.h"
Go to the source code of this file.
Data Structures | |
| struct | __dirstream |
Defines | |
| #define | g_strdup xstrdup |
| #define | g_free free |
| #define | MAXCOLS 30 |
| #define | alloca_strdup(_s) strcpy(alloca(strlen(_s)+1), (_s)) |
| #define | ISFTPMAGIC(_dir) (!memcmp((_dir), &ftpmagicdir, sizeof(ftpmagicdir))) |
Enumerations | |
| enum | ftpSysCall_t { DO_FTP_STAT = 1, DO_FTP_LSTAT = 2, DO_FTP_READLINK = 3, DO_FTP_ACCESS = 4, DO_FTP_GLOB = 5 } |
Functions | |
| int | ftpMkdir (const char *path, mode_t mode) |
| int | ftpChdir (const char *path) |
| int | ftpRmdir (const char *path) |
| int | ftpRename (const char *oldpath, const char *newpath) |
| int | ftpUnlink (const char *path) |
| int | make_path (const char *apath, mode_t mode) |
| int | MkdirP (const char *path, mode_t mode) |
| mkdir -p. | |
| int | Mkdir (const char *path, mode_t mode) |
| mkdir(2) clone. | |
| int | Chdir (const char *path) |
| chdir(2) clone. | |
| int | Rmdir (const char *path) |
| rmdir(2) clone. | |
| int | Rename (const char *oldpath, const char *newpath) |
| rename(2) clone. | |
| int | Link (const char *oldpath, const char *newpath) |
| link(2) clone. | |
| int | Unlink (const char *path) |
| unlink(2) clone. | |
| int | vfs_split_text (char *p) |
| int | is_num (int idx) |
| int | is_dos_date (const char *str) |
| int | is_week (const char *str, struct tm *tim) |
| int | is_month (const char *str, struct tm *tim) |
| int | is_time (const char *str, struct tm *tim) |
| int | is_year (const char *str, struct tm *tim) |
| int | vfs_parse_filetype (char c) |
| int | vfs_parse_filemode (const char *p) |
| int | vfs_parse_filedate (int idx, time_t *t) |
| int | vfs_parse_ls_lga (char *p, struct stat *st, const char **filename, const char **linkname) |
| int | ftpNLST (const char *url, ftpSysCall_t ftpSysCall, struct stat *st, char *rlbuf, size_t rlbufsiz) |
| const char * | statstr (const struct stat *st, char *buf, size_t size) |
| int | ftpStat (const char *path, struct stat *st) |
| int | ftpLstat (const char *path, struct stat *st) |
| int | ftpReadlink (const char *path, char *buf, size_t bufsiz) |
| DIR * | ftpOpendir (const char *path) |
| direct * | ftpReaddir (DIR *dir) |
| int | ftpClosedir (DIR *dir) |
| int | Stat (const char *path, struct stat *st) |
| stat(2) clone. | |
| int | Lstat (const char *path, struct stat *st) |
| lstat(2) clone. | |
| int | Readlink (const char *path, char *buf, size_t bufsiz) |
| readlink(2) clone. | |
| int | Access (const char *path, int amode) |
| access(2) clone. | |
| int | Glob (const char *pattern, int flags, int errfunc(const char *epath, int eerrno), glob_t *pglob) |
| glob(3) clone. | |
| void | Globfree (glob_t *pglob) |
| globfree(3) clone. | |
| DIR * | Opendir (const char *path) |
| opendir(3) clone. | |
| direct * | Readdir (DIR *dir) |
| readdir(3) clone. | |
| int | Closedir (DIR *dir) |
| closedir(3) clone. | |
Variables | |
| int | current_mday |
| int | current_mon |
| int | current_year |
| char * | columns [30] |
| int | column_ptr [30] |
| size_t | ftpBufAlloced = 0 |
| char * | ftpBuf = NULL |
| int | ftp_st_ino = 0xdead0000 |
| int | ftpmagicdir = 0x8440291 |
Definition in file rpmrpc.c.
|
|
|
|
|
Definition at line 347 of file rpmrpc.c. Referenced by vfs_parse_ls_lga(). |
|
|
Definition at line 346 of file rpmrpc.c. Referenced by vfs_parse_ls_lga(). |
|
|
Definition at line 1174 of file rpmrpc.c. Referenced by Closedir(), ftpClosedir(), ftpReaddir(), and Readdir(). |
|
|
Definition at line 360 of file rpmrpc.c. Referenced by vfs_split_text(). |
|
|
Definition at line 884 of file rpmrpc.c. Referenced by ftpNLST(). |
|
||||||||||||
|
access(2) clone.
Definition at line 1446 of file rpmrpc.c. References URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath(). Referenced by chkdir(). |
|
|
chdir(2) clone.
Definition at line 183 of file rpmrpc.c. References ftpChdir(), URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath(). |
|
|
closedir(3) clone.
Definition at line 1548 of file rpmrpc.c. References ftpClosedir(), and ISFTPMAGIC. Referenced by Glob(), myftw(), and myftw_dir(). |
|
|
Definition at line 36 of file rpmrpc.c. References ftpCmd(). |
|
|
Definition at line 1356 of file rpmrpc.c. References ISFTPMAGIC. Referenced by Closedir(). |
|
||||||||||||
|
Definition at line 1132 of file rpmrpc.c. References DO_FTP_LSTAT, ftp_st_ino, ftpNLST(), and statstr(). Referenced by Lstat(). |
|
||||||||||||
|
Definition at line 20 of file rpmrpc.c. References ftpCmd(). Referenced by Mkdir(). |
|
||||||||||||||||||||||||
|
Definition at line 905 of file rpmrpc.c. References alloca_strdup, DO_FTP_ACCESS, DO_FTP_GLOB, DO_FTP_LSTAT, DO_FTP_READLINK, DO_FTP_STAT, fdFgets(), fdLink, ftpBuf, ftpBufAlloced, ftpChdir(), ftpOpen(), ftpReq(), ftpSysCall_t, urlinfo_s::openError, ufdClose(), urlPath(), vfs_parse_ls_lga(), xcalloc(), and xrealloc(). Referenced by ftpLstat(), ftpOpendir(), ftpReadlink(), and ftpStat(). |
|
|
Definition at line 1178 of file rpmrpc.c. References dirent, DO_FTP_GLOB, ftpBuf, ftpmagicdir, ftpNLST(), stpcpy(), stpncpy(), and xcalloc(). Referenced by Opendir(). |
|
|
Definition at line 1312 of file rpmrpc.c. References dirent, ftpReaddir(), and ISFTPMAGIC. Referenced by ftpReaddir(), and Readdir(). |
|
||||||||||||||||
|
Definition at line 1149 of file rpmrpc.c. References DO_FTP_READLINK, and ftpNLST(). Referenced by Readlink(). |
|
||||||||||||
|
Definition at line 50 of file rpmrpc.c. References ftpCmd(). Referenced by Rename(). |
|
|
Definition at line 43 of file rpmrpc.c. References ftpCmd(). Referenced by Rmdir(). |
|
||||||||||||
|
Definition at line 1115 of file rpmrpc.c. References DO_FTP_STAT, ftp_st_ino, ftpNLST(), and statstr(). Referenced by Stat(). |
|
|
Definition at line 60 of file rpmrpc.c. References ftpCmd(). Referenced by Unlink(). |
|
||||||||||||||||||||
|
glob(3) clone.
Definition at line 1469 of file rpmrpc.c. References Closedir(), Lstat(), Opendir(), Readdir(), Stat(), URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath(). Referenced by rpmGlob(). |
|
|
globfree(3) clone.
Definition at line 1504 of file rpmrpc.c. Referenced by rpmGlob(). |
|
|
Definition at line 399 of file rpmrpc.c. Referenced by vfs_parse_filedate(), and vfs_parse_ls_lga(). |
|
||||||||||||
|
Definition at line 426 of file rpmrpc.c. Referenced by vfs_parse_filedate(), and vfs_parse_ls_lga(). |
|
|
Definition at line 390 of file rpmrpc.c. References columns. Referenced by vfs_parse_filedate(), and vfs_parse_ls_lga(). |
|
||||||||||||
|
Definition at line 443 of file rpmrpc.c. Referenced by vfs_parse_filedate(). |
|
||||||||||||
|
Definition at line 409 of file rpmrpc.c. Referenced by vfs_parse_filedate(), and vfs_parse_ls_lga(). |
|
||||||||||||
|
Definition at line 462 of file rpmrpc.c. Referenced by vfs_parse_filedate(). |
|
||||||||||||
|
link(2) clone.
Definition at line 278 of file rpmrpc.c. References URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, urlPath(), and xstrncasecmp(). Referenced by fsmStage(). |
|
||||||||||||
|
lstat(2) clone.
Definition at line 1398 of file rpmrpc.c. References ftpLstat(), URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath(). Referenced by addFile(), checkOwners(), doUntar(), fsmStage(), Glob(), myftw(), myftw_dir(), and rpmVerifyFile(). |
|
||||||||||||
|
Definition at line 69 of file rpmrpc.c. References alloca(), errno, and rpmCleanPath(). Referenced by MkdirP(). |
|
||||||||||||
|
mkdir(2) clone.
Definition at line 160 of file rpmrpc.c. References ftpMkdir(), URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath(). Referenced by fsmStage(), MkdirP(), and rpmdbRebuild(). |
|
||||||||||||
|
mkdir -p.
Definition at line 138 of file rpmrpc.c. References make_path(), Mkdir(), URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath(). Referenced by chkdir(), and packageBinaries(). |
|
|
opendir(3) clone.
Definition at line 1511 of file rpmrpc.c. References ftpOpendir(), URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath(). Referenced by Glob(), myftw(), and myftw_dir(). |
|
|
readdir(3) clone.
Definition at line 1539 of file rpmrpc.c. References dirent, ftpReaddir(), and ISFTPMAGIC. Referenced by Glob(), and myftw_dir(). |
|
||||||||||||||||
|
readlink(2) clone.
Definition at line 1423 of file rpmrpc.c. References ftpReadlink(), URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath(). Referenced by fsmStage(), genCpioListAndHeader(), and rpmVerifyFile(). |
|
||||||||||||
|
rename(2) clone.
Definition at line 231 of file rpmrpc.c. References ftpRename(), URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, urlPath(), and xstrncasecmp(). Referenced by fsmStage(), and rpmdbMoveDatabase(). |
|
|
rmdir(2) clone.
Definition at line 206 of file rpmrpc.c. References ftpRmdir(), URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath(). Referenced by fsmStage(), and rpmdbRebuild(). |
|
||||||||||||
|
stat(2) clone.
Definition at line 1373 of file rpmrpc.c. References ftpStat(), URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath(). Referenced by buildForTarget(), chkdir(), fsmStage(), Glob(), packageBinaries(), processSourceFiles(), and rpmioFileExists(). |
|
||||||||||||||||
|
Definition at line 1095 of file rpmrpc.c. References snprintf(). Referenced by ftpLstat(), and ftpStat(). |
|
|
unlink(2) clone.
Definition at line 322 of file rpmrpc.c. References ftpUnlink(), URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath(). Referenced by buildForTarget(), buildSpec(), doRmSource(), doScript(), fsmStage(), generateDepends(), rpmInstall(), urlGetFile(), and writeRPM(). |
|
||||||||||||
|
Definition at line 572 of file rpmrpc.c. References columns, current_mday, current_mon, current_year, is_dos_date(), is_month(), is_num(), is_time(), is_week(), and is_year(). Referenced by vfs_parse_ls_lga(). |
|
|
Definition at line 513 of file rpmrpc.c. Referenced by vfs_parse_ls_lga(). |
|
|
Definition at line 494 of file rpmrpc.c. References S_IFSOCK. Referenced by vfs_parse_ls_lga(). |
|
||||||||||||||||||||
|
Definition at line 681 of file rpmrpc.c. References column_ptr, columns, g_free, g_strdup, gnameToGid(), is_dos_date(), is_month(), is_num(), is_week(), S_ISLNK, unameToUid(), vfs_parse_filedate(), vfs_parse_filemode(), vfs_parse_filetype(), vfs_split_text(), and xmalloc(). Referenced by ftpNLST(). |
|
|
Definition at line 368 of file rpmrpc.c. References column_ptr, columns, and MAXCOLS. Referenced by vfs_parse_ls_lga(). |
|
|
Definition at line 365 of file rpmrpc.c. Referenced by vfs_parse_ls_lga(), and vfs_split_text(). |
|
|
Definition at line 363 of file rpmrpc.c. Referenced by is_num(), vfs_parse_filedate(), vfs_parse_ls_lga(), and vfs_split_text(). |
|
|
Definition at line 353 of file rpmrpc.c. Referenced by vfs_parse_filedate(). |
|
|
Definition at line 355 of file rpmrpc.c. Referenced by vfs_parse_filedate(). |
|
|
Definition at line 357 of file rpmrpc.c. Referenced by vfs_parse_filedate(). |
|
|
Definition at line 1113 of file rpmrpc.c. Referenced by ftpLstat(), and ftpStat(). |
|
|
Definition at line 900 of file rpmrpc.c. Referenced by ftpNLST(), and ftpOpendir(). |
|
|
Definition at line 895 of file rpmrpc.c. Referenced by ftpNLST(). |
|
|
Definition at line 1173 of file rpmrpc.c. Referenced by ftpOpendir(). |
1.2.18