- 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 typedef 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 } rpmVerifyAttrs;
    00038 #define RPMVERIFY_ALL           ~(RPMVERIFY_NONE)
    00039 #define RPMVERIFY_FAILURES      \
    00040   (RPMVERIFY_LSTATFAIL|RPMVERIFY_READFAIL|RPMVERIFY_READLINKFAIL|RPMVERIFY_LGETFILECONFAIL)
    00041
    00045 typedef enum rpmVerifyFlags_e {
    00046     VERIFY_DEFAULT      = 0,
    00047     VERIFY_MD5          = (1 << 0),
    00048     VERIFY_FILEDIGEST   = (1 << 0),
    00049     VERIFY_SIZE         = (1 << 1),
    00050     VERIFY_LINKTO       = (1 << 2),
    00051     VERIFY_USER         = (1 << 3),
    00052     VERIFY_GROUP        = (1 << 4),
    00053     VERIFY_MTIME        = (1 << 5),
    00054     VERIFY_MODE         = (1 << 6),
    00055     VERIFY_RDEV         = (1 << 7),
    00056     VERIFY_CAPS         = (1 << 8),
    00057         /* bits 9-14 unused, reserved for rpmVerifyAttrs */
    00058     VERIFY_CONTEXTS     = (1 << 15),
    00059     VERIFY_FILES        = (1 << 16),
    00060     VERIFY_DEPS         = (1 << 17),
    00061     VERIFY_SCRIPT       = (1 << 18),
    00062     VERIFY_DIGEST       = (1 << 19),
    00063     VERIFY_SIGNATURE    = (1 << 20),
    00064     VERIFY_PATCHES      = (1 << 21),
    00065     VERIFY_HDRCHK       = (1 << 22),
    00066     VERIFY_FOR_LIST     = (1 << 23),
    00067     VERIFY_FOR_STATE    = (1 << 24),
    00068     VERIFY_FOR_DOCS     = (1 << 25),
    00069     VERIFY_FOR_CONFIG   = (1 << 26),
    00070     VERIFY_FOR_DUMPFILES= (1 << 27)
    00071         /* bits 28-31 used in rpmVerifyAttrs */
    00072 } rpmVerifyFlags;
    00073
    00074 #define VERIFY_ATTRS    \
    00075   ( VERIFY_FILEDIGEST | VERIFY_SIZE | VERIFY_LINKTO | VERIFY_USER | VERIFY_GROUP | \
    00076     VERIFY_MTIME | VERIFY_MODE | VERIFY_RDEV | VERIFY_CONTEXTS | VERIFY_CAPS )
    00077 #define VERIFY_ALL      \
    00078   ( VERIFY_ATTRS | VERIFY_FILES | VERIFY_DEPS | VERIFY_SCRIPT | VERIFY_DIGEST |\
    00079     VERIFY_SIGNATURE | VERIFY_HDRCHK )
    00080
    00090 int rpmVerifyFile(const rpmts ts, rpmfi fi,
    00091                 rpmVerifyAttrs * res, rpmVerifyAttrs omitMask);
    00092
    00093
    00094 #ifdef __cplusplus
    00095 }
    00096 #endif
    00097
    00098 #endif /* _RPMTYPES_H */