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