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 "misc/glob.h"
#include "misc/fnmatch.h"

Include dependency graph for system.h:

Go to the source code of this file.

Data Structures

struct  our_mntent

Defines

#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 matchpathcon_fini()
#define __progname   program_name
#define setprogname(pn)
#define setlocale(Category, Locale)
#define bindtextdomain(Domain, Directory)
#define textdomain(Domain)
#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)
#define Makedev(x, y)   makedev((x),(y))
 makedev() on QNX takes three parameters the additional one (first place) specifies the node for QNET as this applic is not QNET aware, we can set it to 'local node'
#define SUPPORT_INITDB   1
 Mark --initdb and --verifydb for destruction.
#define SUPPORT_VERIFYDB   1

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


Detailed Description

Definition in file system.h.


Define Documentation

#define _ ( Text   )     Text

Definition at line 496 of file system.h.

Referenced by _specQuery(), addChangelog(), addFile(), addFileToTagAux(), addMacro(), addSource(), argerror(), armorFormat(), base64Format(), buildHost(), buildSpec(), checkFiles(), checkForDuplicates(), checkForRequired(), checkForValidArchitectures(), checkOwners(), copyFile(), copyNextLineFromOFI(), cpio_copy(), cpio_doio(), cpioStrerror(), cvtdberr(), dateFormat(), dayFormat(), db3open(), dbiFindMatches(), dbiOpen(), depflagsFormat(), doAddSubtract(), doDefine(), doIcon(), doLogical(), doMultiplyDivide(), doPatch(), doPatchMacro(), doPrimary(), doRelational(), doSetupMacro(), doUndefine(), doUntar(), expandMacro(), expandMacros(), fflagsFormat(), findPreambleTag(), freeArgs(), fsmMapAttrs(), fsmStage(), ftpStrerror(), genCpioListAndHeader(), getFilesystemList(), getGidS(), getGname(), getGnameS(), getOutputFrom(), getUidS(), getUname(), getUnameS(), grabArgs(), handlePreambleTag(), headerCheck(), IDTXglob(), ignoreDep(), installArgCallback(), intFormat(), isCompressed(), main(), makeGPGSignature(), 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(), printExpansion(), printMacro(), printNewSpecfile(), printVersion(), processBinaryFile(), processBinaryFiles(), processMetadataFile(), processPackageFiles(), processScriptFiles(), processSourceFiles(), queryHeader(), rdLead(), rdSignature(), rdToken(), readFile(), readLine(), readLineFromOFI(), realDateFormat(), rpmalAllFileSatisfiesDepend(), rpmalAllSatisfiesDepend(), rpmCheckPassPhrase(), rpmcliImportPubkeys(), rpmcliInit(), rpmcliInstall(), rpmcliInstallCheck(), rpmcliInstallOrder(), rpmcliInstallRun(), rpmcliInstallSuggests(), rpmcliSign(), rpmdbAdd(), rpmdbCountPackages(), rpmdbFindByFile(), rpmdbGrowIterator(), rpmdbInitIterator(), rpmdbNew(), rpmdbNextIterator(), rpmdbRebuild(), rpmdbRemove(), rpmdsCompare(), rpmdsNotify(), rpmdsPipe(), rpmdsSysinfoFile(), rpmDumpMacroTable(), rpmErase(), rpmfcGenerateDependsHelper(), rpmGetFilesystemUsage(), rpmgiInitFilter(), rpmgiNext(), rpmgiOpen(), rpmInstallSource(), rpmInstallSourcePackage(), rpmlogMessage(), rpmmgBuffer(), rpmmgFile(), rpmmgNew(), rpmMkdirPath(), rpmProblemString(), rpmpsmStage(), rpmQueryVerify(), rpmReadHeader(), rpmReadPackageFile(), rpmReSign(), rpmRollback(), rpmShowProgress(), rpmShowRC(), rpmspecQuery(), rpmsxParse(), rpmTempFile(), rpmtsAddInstallElement(), rpmtsInitIterator(), rpmtsOpenDB(), rpmtsOpenSDB(), rpmtsOrder(), rpmtsRollback(), rpmtsRun(), rpmtsSolve(), rpmVerifySignature(), rpmVerifySignatures(), rpmWriteHeader(), runScript(), shescapeFormat(), showQueryPackage(), singleSprintf(), sql_busy_handler(), timeCheck(), triggertypeFormat(), unsatisfiedDepend(), urlFind(), urlFreeCache(), urlSplit(), urlStrerror(), verifyDependencies(), verifyDSASignature(), verifyHeader(), verifyMD5Signature(), verifyRSASignature(), verifySHA1Signature(), verifySizeSignature(), vmefail(), writeRPM(), xmlFormat(), XurlFree(), yamlFormat(), and zapRelation().

#define __progname   program_name

Definition at line 454 of file system.h.

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

#define bindtextdomain ( Domain,
Directory   ) 

Definition at line 493 of file system.h.

Referenced by rpmcliInit().

#define D_ ( Text   )     Text

#define dgettext ( DomainName,
Text   )     Text

Definition at line 499 of file system.h.

Referenced by i18nTag().

#define dirent   direct

Definition at line 199 of file system.h.

Referenced by ftpOpendir(), and fts_build().

#define EXIT_FAILURE   1

#define F_OK   0

Definition at line 185 of file system.h.

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

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

Definition at line 309 of file system.h.

#define FILE_RCSID ( id   ) 

Value:

static inline const char *rcsid(const char *p) { \
        return rcsid(p = id); \
}

Definition at line 718 of file system.h.

#define freecon ( _c   ) 

Definition at line 305 of file system.h.

Referenced by genCpioListAndHeader(), rpmfiBuildFSContexts(), and rpmfiBuildREContexts().

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

Definition at line 313 of file system.h.

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

Definition at line 307 of file system.h.

#define GETMNTENT_ONE   1

Definition at line 698 of file system.h.

#define GETMNTENT_TWO   0

Definition at line 699 of file system.h.

 
#define is_selinux_enabled (  )     (-1)

Definition at line 317 of file system.h.

Referenced by rpmtsCreate().

#define lchown   chown

Definition at line 661 of file system.h.

Referenced by Lchown().

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

Definition at line 308 of file system.h.

Referenced by rpmfiBuildFSContexts().

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

Definition at line 312 of file system.h.

Referenced by fsmStage().

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

Definition at line 92 of file system.h.

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

#define Makedev ( x,
 )     makedev((x),(y))

makedev() on QNX takes three parameters the additional one (first place) specifies the node for QNET as this applic is not QNET aware, we can set it to 'local node'

Definition at line 741 of file system.h.

Referenced by cpioHeaderRead(), and tarHeaderRead().

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

Definition at line 94 of file system.h.

#define matchpathcon ( _fn,
_fmode,
_s   )     (-1)

Definition at line 322 of file system.h.

Referenced by fsmMapFContext(), genCpioListAndHeader(), and rpmfiBuildREContexts().

 
#define matchpathcon_fini (  ) 

Definition at line 323 of file system.h.

Referenced by genCpioListAndHeader(), rpmcliInstall(), and rpmfiBuildREContexts().

#define matchpathcon_init ( _fn   )     (-1)

Definition at line 321 of file system.h.

Referenced by genCpioListAndHeader(), rpmcliInstall(), rpmfiBuildREContexts(), and rpmts_Run().

#define minor ( dev   )     ((dev) & 0xff)

Definition at line 93 of file system.h.

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

#define MOUNTED   "/etc/mnttab"

Definition at line 712 of file system.h.

Referenced by getFilesystemList().

#define N_ ( Text   )     Text

Definition at line 502 of file system.h.

Referenced by rpmProblemString().

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

Definition at line 200 of file system.h.

#define our_mntent   struct our_mntent

Definition at line 696 of file system.h.

#define R_OK   4

Definition at line 188 of file system.h.

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

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

Definition at line 319 of file system.h.

Referenced by runScript().

#define S_IFSOCK   (0xc000)

Definition at line 617 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 625 of file system.h.

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

#define security_check_context ( _c   )     (0)

Definition at line 315 of file system.h.

Referenced by rpmsxParse().

#define SEEK_CUR   1

Definition at line 181 of file system.h.

Referenced by rpmSingleHeaderFromFD().

#define SEEK_END   2

Definition at line 182 of file system.h.

#define SEEK_SET   0

Definition at line 180 of file system.h.

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

Definition at line 311 of file system.h.

#define setlocale ( Category,
Locale   ) 

Definition at line 484 of file system.h.

Referenced by rpmcliInit(), and rpmGlob().

#define setprogname ( pn   ) 

Value:

{ if ((__progname = strrchr(pn, '/')) != NULL) __progname++; \
    else __progname = pn;               \
  }

Definition at line 455 of file system.h.

Referenced by rpmcliInit().

#define SUPPORT_INITDB   1

Mark --initdb and --verifydb for destruction.

Definition at line 747 of file system.h.

#define SUPPORT_VERIFYDB   1

Definition at line 748 of file system.h.

#define textdomain ( Domain   ) 

Definition at line 495 of file system.h.

Referenced by rpmcliInit().

#define W_OK   2

Definition at line 187 of file system.h.

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

#define X_OK   1

Definition at line 186 of file system.h.

Referenced by rpmioAccess(), and unsatisfiedDepend().


Typedef Documentation

typedef char* security_context_t

Definition at line 303 of file system.h.


Function Documentation

char* alloca (  ) 

Referenced by addChangelogEntry(), addFileToArrayTag(), addFileToTag(), addOrAppendListEntry(), addReqProv(), addTE(), checkForDuplicates(), checkPackageSet(), compressFilelist(), dateToTimet(), db3open(), dbiFindByLabel(), depflagsFormat(), doDefine(), doFoo(), doIcon(), doLookup(), doOutput(), doShellEscape(), doUndefine(), ensureOlder(), expandMacro(), expandMacros(), expandT(), expandU(), fillOutMainPackage(), findEntry(), findErases(), findTag(), formatValue(), fpsCompare(), fsmStage(), ftpCommand(), ftpLogin(), ftpReq(), genCpioListAndHeader(), getSignid(), grabArgs(), handleInstInstalledFiles(), handleOneTrigger(), handlePreambleTag(), handleRmvdInstalledFiles(), hCopyTag(), hdr_subscript(), hdrKeyList(), headerAddI18NString(), headerCheck(), headerCopy(), headerCopyTags(), headerLoad(), headerMacrosLoad(), headerMacrosUnload(), headerMatchLocale(), headerMergeLegacySigs(), headerNEVRA(), headerRegenSigHeader(), headerSprintf(), hGetColor(), hLoadTID(), hSaveBlinks(), hSaveFlinks(), httpReq(), i18nTag(), IDTXglob(), IDTXload(), initSourceHeader(), intFormat(), isMemberInEntry(), labelCompare(), lookupPackage(), makeGPGSignature(), makeHDRSignature(), markReplacedFiles(), mireSkip(), packageBinaries(), packageSources(), parseForAttr(), parseForConfig(), parseForDev(), parseForLang(), parseForVerify(), parsePreamble(), parseScript(), parseSpec(), pgpGrabPkts(), pgpPrtPkt(), pgpPrtPkts(), pgpPubkeyFingerprint(), pgpReadPkts(), populateInstallHeader(), postPopulateInstallHeader(), printFileInfo(), printNewSpecfile(), processBinaryFiles(), processMetadataFile(), processPackageFiles(), processScriptFiles(), providePackageNVR(), rdSignature(), readFile(), relocateFileList(), rpmAddSignature(), rpmalAdd(), rpmalAllFileSatisfiesDepend(), rpmalAllSatisfiesDepend(), rpmalDel(), rpmcliImportPubkey(), rpmcliInstall(), rpmdbAdd(), rpmdbCountPackages(), rpmdbExportInfo(), rpmdbFindByFile(), rpmdbFindFpList(), rpmdbRemove(), rpmDefineMacro(), rpmdsCompare(), rpmdsNew(), rpmdsNSAdd(), rpmdsNVRMatchesDep(), rpmdsSysinfo(), rpmdsThis(), rpmfcGenerateDepends(), rpmfcGenerateScriptletDeps(), rpmfi_iternext(), rpmfi_MD5(), rpmfiBuildFNames(), rpmfiBuildFSContexts(), rpmfiBuildREContexts(), rpmfiNew(), rpmGenPath(), rpmGetFilesystemUsage(), rpmGetPath(), rpmHeadersIdentical(), rpmInstallSourcePackage(), rpmioMkpath(), rpmlibMarkers(), rpmlibNeedsFeature(), rpmLoadMacroFile(), rpmnsProbeSignature(), rpmps_ass_sub(), rpmpsmStage(), rpmQueryVerify(), rpmReadPackageFile(), rpmReSign(), rpmspecQuery(), rpmsqExecve(), rpmteChain(), rpmteColorDS(), rpmteNew(), rpmts_Rollback(), rpmtsAddInstallElement(), rpmtsCallback(), rpmtsFindPubkey(), rpmtsImportPubkey(), rpmtsInitIterator(), rpmtsOrder(), rpmtsRollback(), rpmtsSetRootDir(), rpmtsSolve(), rpmVerifyFile(), rpmVerifySignatures(), rpmVersionCompare(), runImmedTriggers(), runInstScript(), runScript(), setPathDefault(), skipFiles(), stashSt(), strntoul(), timeCheck(), triggercondsTag(), triggertypeTag(), unsatisfiedDepend(), urlFind(), 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 
)

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 20 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 31 of file rpmmalloc.c.

References vmefail().

Referenced by _tagCanonicalize(), addFile(), addSource(), addTE(), argvJoin(), argvSplit(), bin2hex(), copyEntry(), cpioHeaderRead(), dbinstanceTag(), dbt2set(), doAddSubtract(), doLookup(), doputenv(), dosetenv(), dupMacroEntry(), expandMacro(), expandMacroTable(), formatValue(), fpCacheCreate(), fsmFsPath(), fsmStage(), genCpioListAndHeader(), grabData(), headerAddI18NString(), headerAppendEntry(), headerCheck(), headerCopyLoad(), headerInit(), headerUnload(), hGetNVRA(), htAddEntry(), htCreate(), localeTag(), lzdReadOpen(), machAddEquiv(), main(), makeGPGSignature(), mireDup(), newOpenFileInfo(), newSl(), newSt(), newStringBuf(), parseForLang(), parseRCPOT(), pgpArmorWrap(), pgpPrtSig(), pgpPrtUserID(), printNewSpecfile(), pushMacro(), queryArgCallback(), rdSignature(), readLine(), relocateFileList(), rpmcliImportPubkey(), rpmdbInitIterator(), rpmdbRebuild(), rpmDigestFinal(), rpmdsDup(), rpmdsDupArgv(), rpmdsGetconf(), rpmdsMerge(), rpmdsNewDNEVR(), rpmdsSingle(), rpmdsThis(), rpmExpand(), rpmfd_Fopen(), rpmfiBuildFClasses(), rpmfiBuildFContexts(), rpmfiBuildFDeps(), rpmfiBuildFNames(), rpmfiBuildFSContexts(), rpmfiBuildREContexts(), rpmfiFN(), rpmfiNew(), rpmgiEscapeSpaces(), rpmGlob(), rpmheRealloc(), rpmInitMacros(), rpmInstallSourcePackage(), rpmioSlurp(), rpmProblemString(), rpmpsmStage(), rpmReadHeader(), rpmRebuildTargetVars(), rpmsxAdd(), rpmsxParse(), rpmsxSort(), rpmteChain(), rpmtsImportPubkey(), rpmtsRun(), runInstScript(), runScript(), set2dbt(), shescapeFormat(), showQueryPackage(), splitString(), sql_cget(), sql_step(), tarHeaderRead(), tarHeaderReadName(), triggercondsTag(), triggertypeTag(), urlFind(), valueMakeInteger(), valueMakeString(), vfs_parse_ls_lga(), vrpmlog(), writeLinkedFile(), and XurlNew().

void* xrealloc ( void *  ptr,
size_t  size 
)

char* xstrdup ( const char *  str  ) 

Definition at line 62 of file rpmmalloc.c.

References vmefail().

Referenced by addFile(), addSource(), addTE(), addTriggerIndex(), argvAdd(), argvAppend(), argvSplit(), armorFormat(), base64Format(), cpio_doio(), cpioHeaderRead(), dbiTagsInit(), depflagsFormat(), doLookup(), doPatch(), doSetupMacro(), doUntar(), dupAttrRec(), fdSetOpen(), fflagsFormat(), forceIncludeFile(), formatValue(), fsmMakeLinks(), fsmStage(), genSourceRpmName(), getFilesystemList(), getGidS(), getGname(), getGnameS(), getUidS(), getUname(), getUnameS(), headerCheck(), headerNEVRA(), headerReload(), headerSetOrigin(), headerSprintf(), i18nTag(), ignoreDep(), installArgCallback(), instprefixTag(), intFormat(), isPart(), localeTag(), machAddEquiv(), main(), mireDup(), parseChangelog(), parseCVOG(), parseExpressionBoolean(), parseExpressionString(), parseForSimple(), parseScript(), parseSpec(), permsFormat(), pgpsigFormat(), printNewSpecfile(), processPackageFiles(), processSourceFiles(), pushMacro(), rdLead(), rdSignature(), rdToken(), readLineFromOFI(), realDateFormat(), rpmalAdd(), rpmalAllFileSatisfiesDepend(), rpmcliAllArgCallback(), rpmcliConfigured(), rpmcliInit(), rpmcliInstall(), rpmcliQuery(), rpmdbRebuild(), rpmds_compare(), rpmds_iternext(), rpmds_Single(), rpmdsCompare(), rpmdsCpuinfo(), rpmdsELF(), rpmdsGetconf(), rpmdsLdconfig(), rpmdsNew(), rpmdsPipe(), rpmdsSysinfo(), rpmEVRparse(), rpmExpand(), 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(), rpmmgBuffer(), rpmmgFile(), rpmmgNew(), rpmPermsString(), rpmps_ass_sub(), rpmpsAppend(), rpmpsmStage(), rpmQueryVerify(), rpmReadHeader(), rpmRebuildTargetVars(), rpmSetMachine(), rpmts_Check(), rpmtsCheck(), rpmtsFindPubkey(), rpmtsSetCurrDir(), rpmtsSetRootDir(), rpmWriteHeader(), shescapeFormat(), sql_open(), sql_step(), stashSt(), triggercondsTag(), triggertypeFormat(), triggertypeTag(), unsatisfiedDepend(), urlFind(), urlSplit(), writeFile(), writeLinkedFile(), writeRPM(), xmlFormat(), and yamlFormat().


Variable Documentation

int errno

const char* program_name

Definition at line 7 of file poptALL.c.


Generated on Wed Nov 19 20:23:38 2008 for rpm by  doxygen 1.5.6