rpm  4.5
Data Structures | Macros | Typedefs | Functions | Variables
system.h File Reference
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <time.h>
#include <strings.h>
#include <errno.h>
#include <sys/file.h>
#include <ctype.h>
Include dependency graph for system.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  our_mntent
 

Macros

#define major(dev)   (((dev) >> 8) & 0xff)
 
#define minor(dev)   ((dev) & 0xff)
 
#define makedev(maj, min)   (((maj) << 8) | (min))
 
#define EXIT_FAILURE   1
 
#define SEEK_SET   0
 
#define SEEK_CUR   1
 
#define SEEK_END   2
 
#define F_OK   0
 
#define X_OK   1
 
#define W_OK   2
 
#define R_OK   4
 
#define dirent   direct
 
#define NLENGTH(direct)   ((direct)->d_namlen)
 
#define freecon(_c)
 
#define getfilecon(_fn, _c)   (-1)
 
#define lgetfilecon(_fn, _c)   (-1)
 
#define fgetfilecon(_fd, _c)   (-1)
 
#define setfilecon(_fn, _c)   (-1)
 
#define lsetfilecon(_fn, _c)   (-1)
 
#define fsetfilecon(_fd, _c)   (-1)
 
#define security_check_context(_c)   (0)
 
#define is_selinux_enabled()   (-1)
 
#define rpm_execcon(_v, _fn, _av, _envp)   (0)
 
#define matchpathcon_init(_fn)   (-1)
 
#define matchpathcon(_fn, _fmode, _s)   (-1)
 
#define __progname   program_name
 
#define setprogname(pn)
 
#define setlocale(Category, Locale)   /* empty */
 
#define bindtextdomain(Domain, Directory)   /* empty */
 
#define textdomain(Domain)   /* empty */
 
#define _(Text)   Text
 
#define D_(Text)   Text
 
#define dgettext(DomainName, Text)   Text
 
#define N_(Text)   Text
 
#define S_IFSOCK   (0xc000)
 
#define S_ISLNK(mode)   ((mode & 0xf000) == S_IFLNK)
 
#define S_ISSOCK(mode)   ((mode & 0xf000) == S_IFSOCK)
 
#define lchown   chown
 
#define our_mntent   struct our_mntent
 
#define GETMNTENT_ONE   1
 
#define GETMNTENT_TWO   0
 
#define MOUNTED   "/etc/mnttab"
 
#define FILE_RCSID(id)
 

Typedefs

typedef char * security_context_t
 

Functions

char * memchr ()
 
char * stpcpy (char *dest, const char *src)
 
char * stpncpy (char *dest, const char *src, size_t n)
 
char * getenv (const char *name)
 
char * realpath (const char *path, char resolved_path[])
 
char * alloca ()
 
void * xmalloc (size_t size)
 
void * xcalloc (size_t nmemb, size_t size)
 
void * xrealloc (void *ptr, size_t size)
 
char * xstrdup (const char *str)
 
void * vmefail (size_t size)
 
int setenv (const char *name, const char *value, int replace)
 
void unsetenv (const char *name)
 
struct our_mntentgetmntent (FILE *filep)
 

Variables

int errno
 
const char * program_name
 

Macro Definition Documentation

#define _ (   Text)    Text

Definition at line 490 of file system.h.

Referenced by _specQuery(), addCanon(), addChangelog(), addDefault(), addFile(), addFileToTagAux(), addMacro(), addSource(), argerror(), armorFormat(), base64Format(), bncdataFormat(), build(), buildHost(), cdataFormat(), checkFiles(), checkForDuplicates(), checkForRequired(), checkForValidArchitectures(), checkOwners(), checkPassPhrase(), copyFile(), copyNextLine(), cpio_copy(), cpio_doio(), cpioStrerror(), cvtdberr(), dateFormat(), dayFormat(), db3open(), dbiFindMatches(), dbiOpen(), dbiTagsInit(), depflagsFormat(), digestFormat(), doAddSubtract(), doDefine(), doIcon(), doLogical(), doMultiplyDivide(), doPatch(), doPatchMacro(), doPrimary(), doReadRC(), doRelational(), doSetupMacro(), doUndefine(), doUnglobal(), doUntar(), expandMacro(), expandMacros(), fflagsFormat(), findPreambleTag(), freeArgs(), fsmMapAttrs(), fsmStage(), ftpStrerror(), genCpioListAndHeader(), getFilesystemList(), getGidS(), getGname(), getGnameS(), getOutputFrom(), getUidS(), getUname(), getUnameS(), grabArgs(), handlePreambleTag(), headerCheck(), headerDump(), headerFindI18NString(), iconvFormat(), IDTXglob(), ignoreDep(), installArgCallback(), intFormat(), isCompressed(), machCompatCacheAdd(), main(), makeGPGSignature(), makePGPSignature(), makeTempFile(), manageFile(), miFreeHeader(), packageBinaries(), parseBuildInstallClean(), parseDescription(), parseExpression(), parseExpressionBoolean(), parseExpressionString(), parseFiles(), parseForAttr(), parseForConfig(), parseForDev(), parseForLang(), parseFormat(), parseForSimple(), parseForVerify(), parseNoSource(), parsePreamble(), parsePrep(), parseRCPOT(), parseScript(), parseSpec(), permsFormat(), pgpsigFormat(), prepFetch(), printBanner(), printExpansion(), printMacro(), printNewSpecfile(), printVersion(), processBinaryFile(), processBinaryFiles(), processMetadataFile(), processPackageFiles(), processScriptFiles(), processSourceFiles(), queryHeader(), rdToken(), readFile(), readLead(), readLine(), readRPM(), realDateFormat(), rpmalAllFileSatisfiesDepend(), rpmalAllSatisfiesDepend(), rpmcliImportPubkeys(), rpmcliInit(), rpmdbAdd(), rpmdbCount(), rpmdbFindByFile(), rpmdbGrowIterator(), rpmdbInitIterator(), rpmdbNew(), rpmdbNextIterator(), rpmdbRebuild(), rpmdbRemove(), rpmdsCompare(), rpmdsNotify(), rpmdsPipe(), rpmdsSysinfoFile(), rpmDumpMacroTable(), rpmErase(), rpmfcApply(), rpmfcClassify(), rpmfcExpandRegexps(), rpmfcFindRequiredPackages(), rpmfcGenerateDependsHelper(), rpmfcHelper(), rpmfcMatchRegexps(), rpmGetFilesystemUsage(), rpmGetPassPhrase(), rpmgiInitFilter(), rpmgiNext(), rpmgiOpen(), rpmInstall(), rpmInstallSource(), rpmInstallSourcePackage(), rpmlogMessage(), rpmMkdirPath(), rpmProblemString(), rpmpsmStage(), rpmQueryVerify(), rpmReadHeader(), rpmReadPackageFile(), rpmReadRC(), rpmReadSignature(), rpmReSign(), rpmRollback(), rpmShowProgress(), rpmShowRC(), rpmsxParse(), rpmtsAddInstallElement(), rpmtsInitIterator(), rpmtsOpenDB(), rpmtsOpenSDB(), rpmtsOrder(), rpmtsRollback(), rpmtsRun(), rpmtsSolve(), rpmVerifySignature(), rpmVerifySignatures(), rpnFormat(), runScript(), shescapeFormat(), showQueryPackage(), singleSprintf(), sqlescapeFormat(), statFormat(), timeCheck(), triggertypeFormat(), unsatisfiedDepend(), urlFind(), urlFreeCache(), urlSplit(), urlStrerror(), uuidFormat(), verifyDependencies(), verifyDSASignature(), verifyHeader(), verifyMD5Signature(), verifyRSASignature(), verifySHA1Signature(), verifySizeSignature(), vmefail(), vrpmlog(), writeRPM(), xmlFormat(), XurlFree(), yamlFormat(), and zapRelation().

#define __progname   program_name

Definition at line 455 of file system.h.

Referenced by argerror(), main(), and rpmcliInit().

#define bindtextdomain (   Domain,
  Directory 
)    /* empty */

Definition at line 487 of file system.h.

Referenced by rpmcliInit().

#define D_ (   Text)    Text
#define dgettext (   DomainName,
  Text 
)    Text

Definition at line 493 of file system.h.

Referenced by i18nTag().

#define dirent   direct

Definition at line 197 of file system.h.

Referenced by ftpOpendir(), and fts_build().

#define EXIT_FAILURE   1
#define F_OK   0

Definition at line 183 of file system.h.

Referenced by db3open(), rpmdbRebuild(), and rpmioAccess().

#define fgetfilecon (   _fd,
  _c 
)    (-1)

Definition at line 311 of file system.h.

#define FILE_RCSID (   id)
Value:
static inline const char *rcsid(const char *p) { \
return rcsid(p = id); \
}

Definition at line 724 of file system.h.

#define freecon (   _c)
#define fsetfilecon (   _fd,
  _c 
)    (-1)

Definition at line 315 of file system.h.

#define getfilecon (   _fn,
  _c 
)    (-1)

Definition at line 309 of file system.h.

#define GETMNTENT_ONE   1

Definition at line 704 of file system.h.

#define GETMNTENT_TWO   0

Definition at line 705 of file system.h.

#define is_selinux_enabled ( )    (-1)

Definition at line 319 of file system.h.

Referenced by rpmdbMoveDatabase(), and rpmtsCreate().

#define lchown   chown

Definition at line 667 of file system.h.

Referenced by Lchown().

#define lgetfilecon (   _fn,
  _c 
)    (-1)

Definition at line 310 of file system.h.

Referenced by rpmfiBuildFSContexts().

#define lsetfilecon (   _fn,
  _c 
)    (-1)

Definition at line 314 of file system.h.

Referenced by fsmStage().

#define major (   dev)    (((dev) >> 8) & 0xff)

Definition at line 90 of file system.h.

Referenced by cpioHeaderRead(), cpioHeaderWrite(), tarHeaderRead(), and tarHeaderWrite().

#define makedev (   maj,
  min 
)    (((maj) << 8) | (min))

Definition at line 92 of file system.h.

Referenced by cpioHeaderRead(), and tarHeaderRead().

#define matchpathcon (   _fn,
  _fmode,
  _s 
)    (-1)
#define matchpathcon_init (   _fn)    (-1)
#define minor (   dev)    ((dev) & 0xff)

Definition at line 91 of file system.h.

Referenced by cpioHeaderRead(), cpioHeaderWrite(), tarHeaderRead(), and tarHeaderWrite().

#define MOUNTED   "/etc/mnttab"

Definition at line 718 of file system.h.

Referenced by getFilesystemList().

#define N_ (   Text)    Text

Definition at line 496 of file system.h.

Referenced by rpmProblemString(), rpmrbCheck(), rpmrbOrder(), rpmrbRun(), and rpmRollback().

#define NLENGTH (   direct)    ((direct)->d_namlen)

Definition at line 198 of file system.h.

#define our_mntent   struct our_mntent

Definition at line 702 of file system.h.

#define R_OK   4

Definition at line 186 of file system.h.

Referenced by rpmioAccess(), rpmtsCreate(), and unsatisfiedDepend().

#define rpm_execcon (   _v,
  _fn,
  _av,
  _envp 
)    (0)

Definition at line 321 of file system.h.

Referenced by runScript().

#define S_IFSOCK   (0xc000)

Definition at line 623 of file system.h.

Referenced by rpmfcClassify(), rpmsxParse(), and vfs_parse_filetype().

#define S_ISLNK (   mode)    ((mode & 0xf000) == S_IFLNK)
#define S_ISSOCK (   mode)    ((mode & 0xf000) == S_IFSOCK)

Definition at line 631 of file system.h.

Referenced by fsmStage(), rpmPermsString(), tarHeaderWrite(), and whatis().

#define security_check_context (   _c)    (0)

Definition at line 317 of file system.h.

Referenced by rpmsxParse().

#define SEEK_CUR   1

Definition at line 179 of file system.h.

Referenced by rpmSingleHeaderFromFD().

#define SEEK_END   2

Definition at line 180 of file system.h.

#define SEEK_SET   0

Definition at line 178 of file system.h.

Referenced by readRPM(), and writeRPM().

#define setfilecon (   _fn,
  _c 
)    (-1)

Definition at line 313 of file system.h.

Referenced by rpmdbMoveDatabase().

#define setlocale (   Category,
  Locale 
)    /* empty */

Definition at line 478 of file system.h.

Referenced by rpmcliInit(), rpmfcClassify(), and rpmGlob().

#define setprogname (   pn)
Value:
{ if ((__progname = strrchr(pn, '/')) != NULL) __progname++; \
else __progname = pn; \
}

Definition at line 456 of file system.h.

Referenced by rpmcliInit().

#define textdomain (   Domain)    /* empty */

Definition at line 489 of file system.h.

Referenced by rpmcliInit().

#define W_OK   2

Definition at line 185 of file system.h.

Referenced by db3open(), rpmInstallSourcePackage(), and rpmioAccess().

#define X_OK   1

Definition at line 184 of file system.h.

Referenced by rpmioAccess(), rpmpsmStage(), and unsatisfiedDepend().

Typedef Documentation

typedef char* security_context_t

Definition at line 305 of file system.h.

Function Documentation

char* alloca ( )

Referenced by compressFilelist(), dateToTimet(), db3open(), dbiFindByLabel(), depflagsFormat(), doDefine(), doFoo(), doIcon(), doLookup(), doOutput(), doReadRC(), doShellEscape(), doUndefine(), doUnglobal(), ensureOlder(), expandMacro(), expandMacros(), expandT(), expandU(), findEntry(), findTag(), formatValue(), fpsCompare(), fsmStage(), fssizesTag(), ftpCommand(), ftpLogin(), ftpReq(), grabArgs(), hdr_subscript(), headerAddI18NString(), headerCheck(), headerCopy(), headerLoad(), headerMatchLocale(), headerSprintf(), i18nTag(), intFormat(), labelCompare(), lookupPackage(), makeGPGSignature(), makePGPSignature(), markReplacedFiles(), parseForAttr(), parseForConfig(), parseForDev(), parseForLang(), parseForVerify(), pgpGrabPkts(), pgpPrtPkt(), pgpPrtPkts(), pgpPubkeyFingerprint(), postPopulateInstallHeader(), printFileInfo(), providePackageNVR(), relocateFileList(), rpm3to4(), rpmAddSignature(), rpmalAdd(), rpmalAllFileSatisfiesDepend(), rpmalAllSatisfiesDepend(), rpmalDel(), rpmdbAdd(), rpmdbCount(), rpmdbFindByFile(), rpmdbMoveDatabase(), rpmdbRemove(), rpmdbRemoveDatabase(), rpmDefineMacro(), rpmDetectPGPVersion(), rpmdsCompare(), rpmdsNSAdd(), rpmdsNVRMatchesDep(), rpmdsSysinfo(), rpmfi_iternext(), rpmfi_MD5(), rpmfiBuildFSContexts(), rpmfiBuildREContexts(), rpmGenPath(), rpmGetFilesystemUsage(), rpmGetPath(), rpmInstall(), rpmioMkpath(), rpmlibNeedsFeature(), rpmLoadMacroFile(), rpmps_ass_sub(), rpmQueryVerify(), rpmReadPackageFile(), rpmReadSignature(), rpmspecQuery(), rpmsqExecve(), rpmteColorDS(), rpmts_Rollback(), rpmtsAddUpgrades(), rpmtsInitIterator(), rpmtsOrder(), rpmtsRollback(), rpmtsSetRootDir(), rpmVerifyFile(), rpnFormat(), runImmedTriggers(), runInstScript(), runScript(), setPathDefault(), skipFiles(), strntoul(), triggercondsTag(), unsatisfiedDepend(), urlFind(), uuidFormat(), verifyDependencies(), writeFile(), writeRPM(), xmlFormat(), XpoptParseArgvString(), and yamlFormat().

char* getenv ( const char *  name)
struct our_mntent* getmntent ( FILE *  filep)
read

Referenced by getFilesystemList().

char* memchr ( )
char* realpath ( const char *  path,
char  resolved_path[] 
)
int setenv ( const char *  name,
const char *  value,
int  replace 
)

Referenced by i18nTag().

char* stpcpy ( char *  dest,
const char *  src 
)
char* stpncpy ( char *  dest,
const char *  src,
size_t  n 
)
void unsetenv ( const char *  name)
void* vmefail ( size_t  size)

Definition at line 13 of file rpmmalloc.c.

References _, and EXIT_FAILURE.

Referenced by xcalloc(), xmalloc(), xrealloc(), and xstrdup().

void* xcalloc ( size_t  nmemb,
size_t  size 
)
void* xmalloc ( size_t  size)

Definition at line 24 of file rpmmalloc.c.

References vmefail().

Referenced by addFile(), addSource(), addTE(), argvJoin(), argvSplit(), copyEntry(), cpioHeaderRead(), dbinstanceTag(), dbt2set(), doAddSubtract(), doHeaderUnload(), doLookup(), doputenv(), doReadRC(), dosetenv(), expandMacro(), expandMacroTable(), FDGsqlTag(), FDGxmlTag(), formatValue(), fpCacheCreate(), fsmFsPath(), fsmStage(), genCpioListAndHeader(), grabData(), headerAddI18NString(), headerAppendEntry(), headerCheck(), headerCopyLoad(), headerendoffTag(), headerInitIterator(), headerRead(), headerstartoffTag(), hGetNVRA(), htAddEntry(), htCreate(), localeTag(), machAddEquiv(), machCompatCacheAdd(), main(), makeGPGSignature(), makePGPSignature(), mireDup(), newOpenFileInfo(), newSl(), newSt(), newStringBuf(), parseForLang(), parseRCPOT(), pgpArmorWrap(), pgpHexSet(), pgpPrtSig(), pgpPrtUserID(), pkgmtimeTag(), pkgsizeTag(), PRCOsqlTag(), PRCOxmlTag(), printNewSpecfile(), pushMacro(), queryArgCallback(), readLine(), relocateFileList(), rpmcliImportPubkey(), rpmdbInitIterator(), rpmdbRebuild(), rpmDigestFinal(), rpmdsDup(), rpmdsDupArgv(), rpmdsGetconf(), rpmdsMerge(), rpmdsNew(), rpmdsNewDNEVR(), rpmdsSingle(), rpmdsThis(), rpmExpand(), rpmfd_Fopen(), rpmfiBuildFClasses(), rpmfiBuildFContexts(), rpmfiBuildFDeps(), rpmfiBuildFNames(), rpmfiBuildFSContexts(), rpmfiBuildREContexts(), rpmfiFN(), rpmfiNew(), rpmgiEscapeSpaces(), rpmGlob(), rpmInitMacros(), rpmInstallSourcePackage(), rpmioSlurp(), rpmProblemString(), rpmpsmStage(), rpmReadHeader(), rpmReadSignature(), rpmRebuildTargetVars(), rpmSetVarArch(), rpmsxAdd(), rpmsxParse(), rpmsxSort(), rpmteChain(), rpmtsRun(), set2dbt(), shescapeFormat(), showQueryPackage(), splitString(), tag2uuidv5(), tarHeaderRead(), tarHeaderReadName(), triggercondsTag(), triggertypeTag(), urlFind(), uuidFormat(), valueMakeInteger(), valueMakeString(), verifyRSASignature(), vfs_parse_ls_lga(), vrpmlog(), writeLinkedFile(), and XurlNew().

void* xrealloc ( void *  ptr,
size_t  size 
)
char* xstrdup ( const char *  str)

Definition at line 55 of file rpmmalloc.c.

References vmefail().

Referenced by addCanon(), addDefault(), addFile(), addSource(), addTE(), addTriggerIndex(), argvAdd(), argvAppend(), argvSplit(), armorFormat(), base64Format(), bncdataFormat(), cdataFormat(), cpio_doio(), cpioHeaderRead(), dbiTagsInit(), depflagsFormat(), digestFormat(), doLookup(), doSetupMacro(), dupAttrRec(), fdSetOpen(), fflagsFormat(), forceIncludeFile(), formatValue(), fsmMakeLinks(), fsmStage(), ftpRealpath(), genSourceRpmName(), getFilesystemList(), getGidS(), getGname(), getGnameS(), getUidS(), getUname(), getUnameS(), headerCheck(), headerReload(), headerSetBaseURL(), headerSetDigest(), headerSetOrigin(), headerSprintf(), i18nTag(), iconvFormat(), ignoreDep(), installArgCallback(), instprefixTag(), intFormat(), localeTag(), machAddEquiv(), machCompatCacheAdd(), main(), mireDup(), parseChangelog(), parseCVOG(), parseExpressionBoolean(), parseExpressionString(), parseForSimple(), parseScript(), parseSpec(), permsFormat(), pgpsigFormat(), pkgbaseurlTag(), pkgdigestTag(), pkgoriginTag(), printNewSpecfile(), processPackageFiles(), processSourceFiles(), pushMacro(), rdToken(), readLine(), realDateFormat(), Realpath(), rpmalAdd(), rpmalAllFileSatisfiesDepend(), rpmcliAllArgCallback(), rpmcliConfigured(), rpmcliQuery(), rpmds_compare(), rpmds_iternext(), rpmds_Single(), rpmdsCompare(), rpmdsCpuinfo(), rpmdsELF(), rpmdsGetconf(), rpmdsLdconfig(), rpmdsNew(), rpmdsPipe(), rpmdsThis(), rpmEVRparse(), rpmExpand(), rpmfcClassify(), rpmfcGenerateDepends(), rpmfd_Fopen(), rpmfi_BN(), rpmfi_DN(), rpmfi_FClass(), rpmfi_FGroup(), rpmfi_FLink(), rpmfi_FN(), rpmfi_FUser(), rpmfi_MD5(), rpmfi_subscript(), rpmfiNew(), rpmGetPath(), rpmgiInitFilter(), rpmgiNext(), rpmGlob(), rpmInitMacros(), rpmInstall(), rpmInstallSourcePackage(), rpmPermsString(), rpmps_ass_sub(), rpmpsAppend(), rpmpsmStage(), rpmQueryVerify(), rpmReadHeader(), rpmReadRC(), rpmReadSignature(), rpmRebuildTargetVars(), rpmSetMachine(), rpmSetVar(), rpmSetVarArch(), rpmtsAddInstallElement(), rpmtsCheck(), rpmtsFindPubkey(), rpmtsSetCurrDir(), rpmtsSetRootDir(), rpnFormat(), shescapeFormat(), sqlescapeFormat(), stashSt(), statFormat(), strdup_locale_convert(), triggercondsTag(), triggertypeFormat(), triggertypeTag(), urlFind(), urlSplit(), uuidFormat(), writeFile(), writeLinkedFile(), writeRPM(), xmlFormat(), and yamlFormat().

Variable Documentation

int errno
const char* program_name