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

- File List
- Globals

# rpmvf.h

Go to the documentation of this file.

    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 enum rpmVerifyAttrs_e {
    00018     RPMVERIFY_NONE      = 0,
    00019     RPMVERIFY_MD5       = (1 << 0),
    00020     RPMVERIFY_FILEDIGEST= (1 << 0),
    00021     RPMVERIFY_FILESIZE  = (1 << 1),
    00022     RPMVERIFY_LINKTO    = (1 << 2),
    00023     RPMVERIFY_USER      = (1 << 3),
    00024     RPMVERIFY_GROUP     = (1 << 4),
    00025     RPMVERIFY_MTIME     = (1 << 5),
    00026     RPMVERIFY_MODE      = (1 << 6),
    00027     RPMVERIFY_RDEV      = (1 << 7),
    00028     RPMVERIFY_CAPS      = (1 << 8),
    00029         /* bits 9-14 unused, reserved for rpmVerifyAttrs */
    00030     RPMVERIFY_CONTEXTS  = (1 << 15),
    00031         /* bits 16-22 used in rpmVerifyFlags */
    00032         /* bits 23-27 used in rpmQueryFlags */
    00033     RPMVERIFY_READLINKFAIL= (1 << 28),
    00034     RPMVERIFY_READFAIL  = (1 << 29),
    00035     RPMVERIFY_LSTATFAIL = (1 << 30),
    00036     RPMVERIFY_LGETFILECONFAIL   = (1 << 31)
    00037 };
    00038
    00039 typedef rpmFlags rpmVerifyAttrs;
    00040
    00041 #define RPMVERIFY_ALL           ~(RPMVERIFY_NONE)
    00042 #define RPMVERIFY_FAILURES      \
    00043   (RPMVERIFY_LSTATFAIL|RPMVERIFY_READFAIL|RPMVERIFY_READLINKFAIL|RPMVERIFY_LGETFILECONFAIL)
    00044
    00048 enum rpmVerifyFlags_e {
    00049     VERIFY_DEFAULT      = 0,
    00050     VERIFY_MD5          = (1 << 0),
    00051     VERIFY_FILEDIGEST   = (1 << 0),
    00052     VERIFY_SIZE         = (1 << 1),
    00053     VERIFY_LINKTO       = (1 << 2),
    00054     VERIFY_USER         = (1 << 3),
    00055     VERIFY_GROUP        = (1 << 4),
    00056     VERIFY_MTIME        = (1 << 5),
    00057     VERIFY_MODE         = (1 << 6),
    00058     VERIFY_RDEV         = (1 << 7),
    00059     VERIFY_CAPS         = (1 << 8),
    00060         /* bits 9-14 unused, reserved for rpmVerifyAttrs */
    00061     VERIFY_CONTEXTS     = (1 << 15),
    00062     VERIFY_FILES        = (1 << 16),
    00063     VERIFY_DEPS         = (1 << 17),
    00064     VERIFY_SCRIPT       = (1 << 18),
    00065     VERIFY_DIGEST       = (1 << 19),
    00066     VERIFY_SIGNATURE    = (1 << 20),
    00067     VERIFY_PATCHES      = (1 << 21),
    00068     VERIFY_HDRCHK       = (1 << 22),
    00069     VERIFY_FOR_LIST     = (1 << 23),
    00070     VERIFY_FOR_STATE    = (1 << 24),
    00071     VERIFY_FOR_DOCS     = (1 << 25),
    00072     VERIFY_FOR_CONFIG   = (1 << 26),
    00073     VERIFY_FOR_DUMPFILES= (1 << 27)
    00074         /* bits 28-31 used in rpmVerifyAttrs */
    00075 };
    00076
    00077 typedef rpmFlags rpmVerifyFlags;
    00078
    00079 #define VERIFY_ATTRS    \
    00080   ( VERIFY_FILEDIGEST | VERIFY_SIZE | VERIFY_LINKTO | VERIFY_USER | VERIFY_GROUP | \
    00081     VERIFY_MTIME | VERIFY_MODE | VERIFY_RDEV | VERIFY_CONTEXTS | VERIFY_CAPS )
    00082 #define VERIFY_ALL      \
    00083   ( VERIFY_ATTRS | VERIFY_FILES | VERIFY_DEPS | VERIFY_SCRIPT | VERIFY_DIGEST |\
    00084     VERIFY_SIGNATURE | VERIFY_HDRCHK )
    00085
    00095 int rpmVerifyFile(const rpmts ts, rpmfi fi,
    00096                 rpmVerifyAttrs * res, rpmVerifyAttrs omitMask);
    00097
    00098
    00099 #ifdef __cplusplus
    00100 }
    00101 #endif
    00102
    00103 #endif /* _RPMTYPES_H */