00001 #ifndef _RPMVF_H
00002 #define _RPMVF_H
00003
00008 #include <rpm/rpmtypes.h>
00009
00010 #ifdef __cplusplus
00011 extern "C" {
00012 #endif
00013
00017 typedef enum rpmVerifyAttrs_e {
00018 RPMVERIFY_NONE = 0,
00019 RPMVERIFY_MD5 = (1 << 0),
00020 RPMVERIFY_FILESIZE = (1 << 1),
00021 RPMVERIFY_LINKTO = (1 << 2),
00022 RPMVERIFY_USER = (1 << 3),
00023 RPMVERIFY_GROUP = (1 << 4),
00024 RPMVERIFY_MTIME = (1 << 5),
00025 RPMVERIFY_MODE = (1 << 6),
00026 RPMVERIFY_RDEV = (1 << 7),
00027
00028 RPMVERIFY_CONTEXTS = (1 << 15),
00029
00030
00031 RPMVERIFY_READLINKFAIL= (1 << 28),
00032 RPMVERIFY_READFAIL = (1 << 29),
00033 RPMVERIFY_LSTATFAIL = (1 << 30),
00034 RPMVERIFY_LGETFILECONFAIL = (1 << 31)
00035 } rpmVerifyAttrs;
00036 #define RPMVERIFY_ALL ~(RPMVERIFY_NONE)
00037 #define RPMVERIFY_FAILURES \
00038 (RPMVERIFY_LSTATFAIL|RPMVERIFY_READFAIL|RPMVERIFY_READLINKFAIL|RPMVERIFY_LGETFILECONFAIL)
00039
00043 typedef enum rpmVerifyFlags_e {
00044 VERIFY_DEFAULT = 0,
00045 VERIFY_MD5 = (1 << 0),
00046 VERIFY_SIZE = (1 << 1),
00047 VERIFY_LINKTO = (1 << 2),
00048 VERIFY_USER = (1 << 3),
00049 VERIFY_GROUP = (1 << 4),
00050 VERIFY_MTIME = (1 << 5),
00051 VERIFY_MODE = (1 << 6),
00052 VERIFY_RDEV = (1 << 7),
00053
00054 VERIFY_CONTEXTS = (1 << 15),
00055 VERIFY_FILES = (1 << 16),
00056 VERIFY_DEPS = (1 << 17),
00057 VERIFY_SCRIPT = (1 << 18),
00058 VERIFY_DIGEST = (1 << 19),
00059 VERIFY_SIGNATURE = (1 << 20),
00060 VERIFY_PATCHES = (1 << 21),
00061 VERIFY_HDRCHK = (1 << 22),
00062 VERIFY_FOR_LIST = (1 << 23),
00063 VERIFY_FOR_STATE = (1 << 24),
00064 VERIFY_FOR_DOCS = (1 << 25),
00065 VERIFY_FOR_CONFIG = (1 << 26),
00066 VERIFY_FOR_DUMPFILES= (1 << 27)
00067
00068 } rpmVerifyFlags;
00069
00070 #define VERIFY_ATTRS \
00071 ( VERIFY_MD5 | VERIFY_SIZE | VERIFY_LINKTO | VERIFY_USER | VERIFY_GROUP | \
00072 VERIFY_MTIME | VERIFY_MODE | VERIFY_RDEV | VERIFY_CONTEXTS )
00073 #define VERIFY_ALL \
00074 ( VERIFY_ATTRS | VERIFY_FILES | VERIFY_DEPS | VERIFY_SCRIPT | VERIFY_DIGEST |\
00075 VERIFY_SIGNATURE | VERIFY_HDRCHK )
00076
00086 int rpmVerifyFile(const rpmts ts, rpmfi fi,
00087 rpmVerifyAttrs * res, rpmVerifyAttrs omitMask);
00088
00089
00090 #ifdef __cplusplus
00091 }
00092 #endif
00093
00094 #endif