rpm: rpmvf.h Source File

rpm 4.11.1-rc1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

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