lib/verify.c - Verify installed payload files from package metadata.
#include 'system.h'
#include 'psm.h'
#include 'rpmcli.h'
#include 'ugid.h'
#include 'misc.h'
#include 'debug.h'
#define S_ISDEV(m) (S_ISBLK((m)) || S_ISCHR((m)))
#define _verify(_RPMVERIFY_F, _C) ((verifyResult & _RPMVERIFY_F) ? _C : aok)
#define _verifylink(_RPMVERIFY_F, _C)
#define _verifyfile(_RPMVERIFY_F, _C)
int rpmVerifyFile (const char *root, Header h, int filenum, rpmVerifyAttrs *result, rpmVerifyAttrs omitMask)
int rpmVerifyScript (const char *rootDir, Header h, FD_t scriptFd)
Return exit code from running verify script from header.
int rpmVerifyDigest (Header h)
Check original header digest.
int verifyHeader (QVA_t qva, Header h)
Check file info from header against what's actually installed.
int verifyDependencies (rpmdb rpmdb, Header h)
Check installed package dependencies for problems.
int showVerifyPackage (QVA_t qva, rpmdb rpmdb, Header h)
int rpmVerify (QVA_t qva, rpmQVSources source, const char *arg)
Verify installed payload files from package metadata.
Value:
((verifyResult & RPMVERIFY_READFAIL) ? unknown : (verifyResult & _RPMVERIFY_F) ? _C : aok)
Value:
((verifyResult & RPMVERIFY_READLINKFAIL) ? unknown : (verifyResult & _RPMVERIFY_F) ? _C : aok)
Definition at line 20 of file verify.c.
Referenced by rpmVerifyFile().
Check original header digest.
Todo: Make digest check part of rpmdb iterator.
Parameters:
Returns: 0 on success (or unavailable), 1 on digest mismatch
Definition at line 305 of file verify.c.
References _free(), HFD_t, HGE_t, int_32, PGPHASHALGO_SHA1, RPMDIGEST_NONE, rpmDigestFinal(), rpmDigestInit(), rpmDigestUpdate(), RPMTAG_HEADERIMMUTABLE, RPMTAG_SHA1RHN, and rpmTagType.
Referenced by showVerifyPackage().
Return exit code from running verify script from header.
Todo: gnorpm/kpackage prevents static, should be using VERIFY_SCRIPT flag.
Parameters:
Returns: 0 on success
Definition at line 279 of file verify.c.
References _free(), fdLink, freeFi(), loadFi(), transactionFileInfo_s::magic, PSM_SCRIPT, psmStage(), RPMTAG_VERIFYSCRIPT, RPMTAG_VERIFYSCRIPTPROG, rpmtransCreateSet(), rpmtransFree(), rpmTransactionSet_s::scriptFd, TFIMAGIC, and xcalloc().
Referenced by showVerifyPackage().
Check installed package dependencies for problems.
Parameters:
Returns: 0 no problems, 1 problems found
Definition at line 458 of file verify.c.
References _, alloca(), headerNVR(), rpmDependencyConflict_s::needsFlags, rpmdepCheck(), rpmdepFreeConflicts(), RPMMESS_NORMAL, rpmMessage, RPMSENSE_EQUAL, RPMSENSE_GREATER, RPMSENSE_LESS, rpmtransAddPackage(), rpmtransCreateSet(), rpmtransFree(), and stpcpy().
Referenced by showVerifyPackage().
Check file info from header against what's actually installed.
Parameters:
Returns: 0 no problems, 1 problems found
Definition at line 351 of file verify.c.
References _, _free(), headerIsEntry(), HGE_t, int_32, rpmBuildFileList(), RPMFILE_CONFIG, RPMFILE_DOC, RPMFILE_GHOST, RPMFILE_LICENSE, RPMFILE_MISSINGOK, RPMFILE_README, rpmfileAttrs, rpmIsVerbose, RPMMESS_NORMAL, rpmMessage, RPMTAG_BASENAMES, RPMTAG_FILEFLAGS, RPMVERIFY_FILESIZE, RPMVERIFY_GROUP, RPMVERIFY_LINKTO, RPMVERIFY_MD5, RPMVERIFY_MODE, RPMVERIFY_MTIME, RPMVERIFY_RDEV, RPMVERIFY_USER, rpmVerifyAttrs, rpmVerifyFile(), and VERIFY_ATTRS.
Referenced by showVerifyPackage().
Generated automatically by Doxygen for rpm from the source code.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |