rpmvf.h
Go to the documentation of this file.
#ifndef _RPMVF_H
#define _RPMVF_H
#include <rpm/rpmtypes.h>
#ifdef __cplusplus
extern "C" {
#endif
enum rpmVerifyAttrs_e {
RPMVERIFY_NONE = 0,
RPMVERIFY_MD5 = (1 << 0),
RPMVERIFY_FILEDIGEST= (1 << 0),
RPMVERIFY_FILESIZE = (1 << 1),
RPMVERIFY_LINKTO = (1 << 2),
RPMVERIFY_USER = (1 << 3),
RPMVERIFY_GROUP = (1 << 4),
RPMVERIFY_MTIME = (1 << 5),
RPMVERIFY_MODE = (1 << 6),
RPMVERIFY_RDEV = (1 << 7),
RPMVERIFY_CAPS = (1 << 8),
/* bits 9-14 unused, reserved for rpmVerifyAttrs */
RPMVERIFY_CONTEXTS = (1 << 15),
/* bits 16-22 used in rpmVerifyFlags */
/* bits 23-27 used in rpmQueryFlags */
RPMVERIFY_READLINKFAIL= (1 << 28),
RPMVERIFY_READFAIL = (1 << 29),
RPMVERIFY_LSTATFAIL = (1 << 30),
RPMVERIFY_LGETFILECONFAIL = (1 << 31)
};
typedef rpmFlags rpmVerifyAttrs;
#define RPMVERIFY_ALL ~(RPMVERIFY_NONE)
#define RPMVERIFY_FAILURES \
(RPMVERIFY_LSTATFAIL|RPMVERIFY_READFAIL|RPMVERIFY_READLINKFAIL|RPMVERIFY_LGETFILECONFAIL)
enum rpmVerifyFlags_e {
VERIFY_DEFAULT = 0,
VERIFY_MD5 = (1 << 0),
VERIFY_FILEDIGEST = (1 << 0),
VERIFY_SIZE = (1 << 1),
VERIFY_LINKTO = (1 << 2),
VERIFY_USER = (1 << 3),
VERIFY_GROUP = (1 << 4),
VERIFY_MTIME = (1 << 5),
VERIFY_MODE = (1 << 6),
VERIFY_RDEV = (1 << 7),
VERIFY_CAPS = (1 << 8),
/* bits 9-14 unused, reserved for rpmVerifyAttrs */
VERIFY_CONTEXTS = (1 << 15),
VERIFY_FILES = (1 << 16),
VERIFY_DEPS = (1 << 17),
VERIFY_SCRIPT = (1 << 18),
VERIFY_DIGEST = (1 << 19),
VERIFY_SIGNATURE = (1 << 20),
VERIFY_PATCHES = (1 << 21),
VERIFY_HDRCHK = (1 << 22),
VERIFY_FOR_LIST = (1 << 23),
VERIFY_FOR_STATE = (1 << 24),
VERIFY_FOR_DOCS = (1 << 25),
VERIFY_FOR_CONFIG = (1 << 26),
VERIFY_FOR_DUMPFILES= (1 << 27)
/* bits 28-31 used in rpmVerifyAttrs */
};
typedef rpmFlags rpmVerifyFlags;
#define VERIFY_ATTRS \
( VERIFY_FILEDIGEST | VERIFY_SIZE | VERIFY_LINKTO | VERIFY_USER | VERIFY_GROUP | \
VERIFY_MTIME | VERIFY_MODE | VERIFY_RDEV | VERIFY_CONTEXTS | VERIFY_CAPS )
#define VERIFY_ALL \
( VERIFY_ATTRS | VERIFY_FILES | VERIFY_DEPS | VERIFY_SCRIPT | VERIFY_DIGEST |\
VERIFY_SIGNATURE | VERIFY_HDRCHK )
int rpmVerifyFile(const rpmts ts, rpmfi fi,
rpmVerifyAttrs * res, rpmVerifyAttrs omitMask);
#ifdef __cplusplus
}
#endif
#endif /* _RPMTYPES_H */
VERIFY_DEPS
Definition: rpmvf.h:63
VERIFY_LINKTO
Definition: rpmvf.h:53
VERIFY_MD5
Definition: rpmvf.h:50
VERIFY_RDEV
Definition: rpmvf.h:58
VERIFY_GROUP
Definition: rpmvf.h:55
rpmVerifyAttrs
rpmFlags rpmVerifyAttrs
Definition: rpmvf.h:39
rpmVerifyFlags
rpmFlags rpmVerifyFlags
Definition: rpmvf.h:77
RPMVERIFY_LINKTO
Definition: rpmvf.h:22
RPMVERIFY_GROUP
Definition: rpmvf.h:24
RPMVERIFY_NONE
Definition: rpmvf.h:18
VERIFY_MODE
Definition: rpmvf.h:57
VERIFY_CAPS
Definition: rpmvf.h:59
VERIFY_FOR_CONFIG
Definition: rpmvf.h:72
RPMVERIFY_MD5
Definition: rpmvf.h:19
RPMVERIFY_MTIME
Definition: rpmvf.h:25
rpmfi
struct rpmfi_s * rpmfi
Definition: rpmtypes.h:66
RPMVERIFY_FILEDIGEST
Definition: rpmvf.h:20
rpmVerifyFlags_e
rpmVerifyFlags_e
Bit(s) to control rpmVerify() operation.
Definition: rpmvf.h:48
RPMVERIFY_CAPS
Definition: rpmvf.h:28
VERIFY_SIGNATURE
Definition: rpmvf.h:66
VERIFY_CONTEXTS
Definition: rpmvf.h:61
VERIFY_USER
Definition: rpmvf.h:54
RPMVERIFY_FILESIZE
Definition: rpmvf.h:21
RPMVERIFY_LGETFILECONFAIL
Definition: rpmvf.h:36
VERIFY_FOR_DUMPFILES
Definition: rpmvf.h:73
VERIFY_SCRIPT
Definition: rpmvf.h:64
VERIFY_DIGEST
Definition: rpmvf.h:65
VERIFY_FILEDIGEST
Definition: rpmvf.h:51
rpmFlags
uint32_t rpmFlags
Definition: rpmtypes.h:42
RPMVERIFY_MODE
Definition: rpmvf.h:26
rpmVerifyFile
int rpmVerifyFile(const rpmts ts, rpmfi fi, rpmVerifyAttrs *res, rpmVerifyAttrs omitMask)
Verify file attributes (including digest).
RPMVERIFY_RDEV
Definition: rpmvf.h:27
VERIFY_SIZE
Definition: rpmvf.h:52
VERIFY_DEFAULT
Definition: rpmvf.h:49
VERIFY_FOR_DOCS
Definition: rpmvf.h:71
VERIFY_MTIME
Definition: rpmvf.h:56
VERIFY_PATCHES
Definition: rpmvf.h:67
rpmts
struct rpmts_s * rpmts
The main types involved in transaction manipulation.
Definition: rpmtypes.h:63
RPMVERIFY_LSTATFAIL
Definition: rpmvf.h:35
RPMVERIFY_READFAIL
Definition: rpmvf.h:34
VERIFY_FOR_LIST
Definition: rpmvf.h:69
RPMVERIFY_READLINKFAIL
Definition: rpmvf.h:33
VERIFY_FOR_STATE
Definition: rpmvf.h:70
rpmVerifyAttrs_e
rpmVerifyAttrs_e
Bit(s) for rpmVerifyFile() attributes and result.
Definition: rpmvf.h:17
VERIFY_HDRCHK
Definition: rpmvf.h:68
RPMVERIFY_CONTEXTS
Definition: rpmvf.h:30
RPMVERIFY_USER
Definition: rpmvf.h:23
VERIFY_FILES
Definition: rpmvf.h:62