diff options
author | Jindrich Novy <jnovy@redhat.com> | 2009-02-27 14:34:39 +0100 |
---|---|---|
committer | Jindrich Novy <jnovy@redhat.com> | 2009-02-27 14:34:39 +0100 |
commit | 7acdfded4a82e86a673418c3953aa6bf8106d313 (patch) | |
tree | 55dbba3fc4e91f2aa0a5622b0b5890e24b2ff3b6 /lib | |
parent | 299a7af7a8acc0fa4979d71dfaebe87658ee0c1d (diff) | |
download | rpm-7acdfded4a82e86a673418c3953aa6bf8106d313.tar.gz rpm-7acdfded4a82e86a673418c3953aa6bf8106d313.tar.bz2 rpm-7acdfded4a82e86a673418c3953aa6bf8106d313.zip |
Add md5->filedigest aliases (rhbz#487597)
- add %verify(nofiledigest) as %verify(nomd5) file attribute alias
- reference digests as digests not checksums
- make old md5 related symbols obsolete and use newer reference
- update man page accordingly
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cpio.c | 4 | ||||
-rw-r--r-- | lib/cpio.h | 65 | ||||
-rw-r--r-- | lib/fsm.c | 10 | ||||
-rw-r--r-- | lib/fsm.h | 4 | ||||
-rw-r--r-- | lib/poptI.c | 10 | ||||
-rw-r--r-- | lib/poptQV.c | 10 | ||||
-rw-r--r-- | lib/rpmcli.h | 2 | ||||
-rw-r--r-- | lib/rpmds.c | 2 | ||||
-rw-r--r-- | lib/rpmfi_internal.h | 4 | ||||
-rw-r--r-- | lib/rpmtag.h | 2 | ||||
-rw-r--r-- | lib/rpmts.h | 1 | ||||
-rw-r--r-- | lib/rpmvf.h | 8 | ||||
-rw-r--r-- | lib/verify.c | 26 |
13 files changed, 77 insertions, 71 deletions
diff --git a/lib/cpio.c b/lib/cpio.c index d4265d3b7..df35dedfb 100644 --- a/lib/cpio.c +++ b/lib/cpio.c @@ -102,7 +102,7 @@ int cpioHeaderWrite(FSM_t fsm, struct stat * st) dev = minor(st->st_rdev); SET_NUM_FIELD(hdr->rdevMinor, dev, field); len = strlen(fsm->path) + 1; SET_NUM_FIELD(hdr->namesize, len, field); - memcpy(hdr->checksum, "00000000", 8); + memcpy(hdr->digest, "00000000", 8); memcpy(fsm->rdbuf + PHYS_HDR_SIZE, fsm->path, len); /* XXX DWRITE uses rdnb for I/O length. */ @@ -214,7 +214,7 @@ const char * cpioStrerror(int rc) case CPIOERR_HDR_SIZE: s = _("Header size too big"); break; case CPIOERR_UNKNOWN_FILETYPE: s = _("Unknown file type"); break; case CPIOERR_MISSING_HARDLINK: s = _("Missing hard link(s)"); break; - case CPIOERR_MD5SUM_MISMATCH: s = _("MD5 sum mismatch"); break; + case CPIOERR_DIGEST_MISMATCH: s = _("Digest mismatch"); break; case CPIOERR_INTERNAL: s = _("Internal error"); break; case CPIOERR_UNMAPPED_FILE: s = _("Archive file not in header"); break; case CPIOERR_ENOENT: s = strerror(ENOENT); break; diff --git a/lib/cpio.h b/lib/cpio.h index fc6e92c61..d99e4123b 100644 --- a/lib/cpio.h +++ b/lib/cpio.h @@ -22,38 +22,37 @@ /** \ingroup payload */ enum cpioErrorReturns { - CPIOERR_BAD_MAGIC = (2 ), - CPIOERR_BAD_HEADER = (3 ), - CPIOERR_OPEN_FAILED = (4 | CPIOERR_CHECK_ERRNO), - CPIOERR_CHMOD_FAILED = (5 | CPIOERR_CHECK_ERRNO), - CPIOERR_CHOWN_FAILED = (6 | CPIOERR_CHECK_ERRNO), - CPIOERR_WRITE_FAILED = (7 | CPIOERR_CHECK_ERRNO), - CPIOERR_UTIME_FAILED = (8 | CPIOERR_CHECK_ERRNO), - CPIOERR_UNLINK_FAILED = (9 | CPIOERR_CHECK_ERRNO), - - CPIOERR_RENAME_FAILED = (10 | CPIOERR_CHECK_ERRNO), - CPIOERR_SYMLINK_FAILED = (11 | CPIOERR_CHECK_ERRNO), - CPIOERR_STAT_FAILED = (12 | CPIOERR_CHECK_ERRNO), - CPIOERR_LSTAT_FAILED = (13 | CPIOERR_CHECK_ERRNO), - CPIOERR_MKDIR_FAILED = (14 | CPIOERR_CHECK_ERRNO), - CPIOERR_RMDIR_FAILED = (15 | CPIOERR_CHECK_ERRNO), - CPIOERR_MKNOD_FAILED = (16 | CPIOERR_CHECK_ERRNO), - CPIOERR_MKFIFO_FAILED = (17 | CPIOERR_CHECK_ERRNO), - CPIOERR_LINK_FAILED = (18 | CPIOERR_CHECK_ERRNO), - CPIOERR_READLINK_FAILED = (19 | CPIOERR_CHECK_ERRNO), - CPIOERR_READ_FAILED = (20 | CPIOERR_CHECK_ERRNO), - CPIOERR_COPY_FAILED = (21 | CPIOERR_CHECK_ERRNO), - CPIOERR_LSETFCON_FAILED = (22 | CPIOERR_CHECK_ERRNO), - CPIOERR_HDR_SIZE = (23 ), - CPIOERR_HDR_TRAILER = (24 ), - CPIOERR_UNKNOWN_FILETYPE= (25 ), - CPIOERR_MISSING_HARDLINK= (26 ), - CPIOERR_MD5SUM_MISMATCH = (27 ), - CPIOERR_INTERNAL = (28 ), - CPIOERR_UNMAPPED_FILE = (29 ), - CPIOERR_ENOENT = (30 ), - CPIOERR_ENOTEMPTY = (31 ), - CPIOERR_SETCAP_FAILED = (32 | CPIOERR_CHECK_ERRNO), + CPIOERR_BAD_MAGIC = 2, + CPIOERR_BAD_HEADER = 3, + CPIOERR_OPEN_FAILED = 4 | CPIOERR_CHECK_ERRNO, + CPIOERR_CHMOD_FAILED = 5 | CPIOERR_CHECK_ERRNO, + CPIOERR_CHOWN_FAILED = 6 | CPIOERR_CHECK_ERRNO, + CPIOERR_WRITE_FAILED = 7 | CPIOERR_CHECK_ERRNO, + CPIOERR_UTIME_FAILED = 8 | CPIOERR_CHECK_ERRNO, + CPIOERR_UNLINK_FAILED = 9 | CPIOERR_CHECK_ERRNO, + CPIOERR_RENAME_FAILED = 10 | CPIOERR_CHECK_ERRNO, + CPIOERR_SYMLINK_FAILED = 11 | CPIOERR_CHECK_ERRNO, + CPIOERR_STAT_FAILED = 12 | CPIOERR_CHECK_ERRNO, + CPIOERR_LSTAT_FAILED = 13 | CPIOERR_CHECK_ERRNO, + CPIOERR_MKDIR_FAILED = 14 | CPIOERR_CHECK_ERRNO, + CPIOERR_RMDIR_FAILED = 15 | CPIOERR_CHECK_ERRNO, + CPIOERR_MKNOD_FAILED = 16 | CPIOERR_CHECK_ERRNO, + CPIOERR_MKFIFO_FAILED = 17 | CPIOERR_CHECK_ERRNO, + CPIOERR_LINK_FAILED = 18 | CPIOERR_CHECK_ERRNO, + CPIOERR_READLINK_FAILED = 19 | CPIOERR_CHECK_ERRNO, + CPIOERR_READ_FAILED = 20 | CPIOERR_CHECK_ERRNO, + CPIOERR_COPY_FAILED = 21 | CPIOERR_CHECK_ERRNO, + CPIOERR_LSETFCON_FAILED = 22 | CPIOERR_CHECK_ERRNO, + CPIOERR_HDR_SIZE = 23, + CPIOERR_HDR_TRAILER = 24, + CPIOERR_UNKNOWN_FILETYPE= 25, + CPIOERR_MISSING_HARDLINK= 26, + CPIOERR_DIGEST_MISMATCH = 27, + CPIOERR_INTERNAL = 28, + CPIOERR_UNMAPPED_FILE = 29, + CPIOERR_ENOENT = 30, + CPIOERR_ENOTEMPTY = 31, + CPIOERR_SETCAP_FAILED = 32 | CPIOERR_CHECK_ERRNO, }; /* @@ -84,7 +83,7 @@ struct cpioCrcPhysicalHeader { char rdevMajor[8]; char rdevMinor[8]; char namesize[8]; - char checksum[8]; /* ignored !! */ + char digest[8]; /* ignored !! */ }; #define PHYS_HDR_SIZE 110 /* Don't depend on sizeof(struct) */ @@ -780,9 +780,9 @@ static int fsmMapAttrs(FSM_t fsm) { rpmts ts = fsmGetTs(fsm); /* - * Set file checksum (if not disabled). + * Set file digest (if not disabled). */ - if (ts != NULL && !(rpmtsFlags(ts) & RPMTRANS_FLAG_NOMD5)) { + if (ts != NULL && !(rpmtsFlags(ts) & RPMTRANS_FLAG_NOFILEDIGEST)) { fsm->digest = rpmfiFDigestIndex(fi, i, NULL, NULL); } else { fsm->digest = NULL; @@ -836,16 +836,16 @@ static int expandRegular(FSM_t fsm) fdFiniDigest(fsm->wfd, fsm->digestalgo, &digest, NULL, asAscii); if (digest == NULL) { - rc = CPIOERR_MD5SUM_MISMATCH; + rc = CPIOERR_DIGEST_MISMATCH; goto exit; } if (fsm->digest != NULL) { size_t diglen = rpmDigestLength(fsm->digestalgo); if (memcmp(digest, fsm->digest, diglen)) - rc = CPIOERR_MD5SUM_MISMATCH; + rc = CPIOERR_DIGEST_MISMATCH; } else { - rc = CPIOERR_MD5SUM_MISMATCH; + rc = CPIOERR_DIGEST_MISMATCH; } digest = _free(digest); } @@ -152,10 +152,10 @@ struct fsm_s { cpioMapFlags mapFlags; /*!< Bit(s) to control mapping. */ const char * dirName; /*!< File directory name. */ const char * baseName; /*!< File base name. */ - const unsigned char * digest; /*!< Binary checksum (NULL disables). */ + const unsigned char * digest; /*!< Binary digest (NULL disables). */ security_context_t fcontext;/*!< File security context (NULL disables). */ cap_t fcaps; /*!< File capabilities */ - pgpHashAlgo digestalgo; /*!< File checksum algorithm */ + pgpHashAlgo digestalgo; /*!< File digest algorithm */ unsigned fflags; /*!< File flags. */ rpmFileAction action; /*!< File disposition. */ diff --git a/lib/poptI.c b/lib/poptI.c index 35ffeba9d..77dd14e4f 100644 --- a/lib/poptI.c +++ b/lib/poptI.c @@ -92,8 +92,8 @@ static void installArgCallback( poptContext con, ia->noDeps = 1; break; - case RPMCLI_POPT_NOMD5: - ia->transFlags |= RPMTRANS_FLAG_NOMD5; + case RPMCLI_POPT_NOFILEDIGEST: + ia->transFlags |= RPMTRANS_FLAG_NOFILEDIGEST; break; case RPMCLI_POPT_NOCONTEXTS: @@ -199,8 +199,10 @@ struct poptOption rpmInstallPoptTable[] = { &rpmIArgs.transFlags, RPMTRANS_FLAG_NODOCS, N_("do not install documentation"), NULL}, - { "nomd5", '\0', 0, NULL, RPMCLI_POPT_NOMD5, - N_("don't verify MD5 digest of files"), NULL }, + { "nomd5", '\0', 0, NULL, RPMCLI_POPT_NOFILEDIGEST, + N_("don't verify digest of files"), NULL }, + { "nofiledigest", '\0', 0, NULL, RPMCLI_POPT_NOFILEDIGEST, + N_("don't verify digest of files"), NULL }, { "nocontexts", '\0',0, NULL, RPMCLI_POPT_NOCONTEXTS, N_("don't install file security contexts"), NULL}, diff --git a/lib/poptQV.c b/lib/poptQV.c index 44730fd97..b54c915f4 100644 --- a/lib/poptQV.c +++ b/lib/poptQV.c @@ -201,8 +201,8 @@ static void queryArgCallback(poptContext con, qva->qva_flags |= VERIFY_DEPS; break; - case RPMCLI_POPT_NOMD5: - qva->qva_flags |= VERIFY_MD5; + case RPMCLI_POPT_NOFILEDIGEST: + qva->qva_flags |= VERIFY_FILEDIGEST; break; case RPMCLI_POPT_NOCONTEXTS: @@ -272,8 +272,10 @@ struct poptOption rpmVerifyPoptTable[] = { /* Duplicate file verify flags from packages into command line options. */ /** @todo Add --nomd5 alias to rpmpopt, eliminate. */ - { "nomd5", '\0', POPT_BIT_SET, &rpmQVKArgs.qva_flags, VERIFY_MD5, - N_("don't verify MD5 digest of files"), NULL }, + { "nomd5", '\0', POPT_BIT_SET, &rpmQVKArgs.qva_flags, VERIFY_FILEDIGEST, + N_("don't verify digest of files"), NULL }, + { "nofiledigest", '\0', POPT_BIT_SET, &rpmQVKArgs.qva_flags, VERIFY_FILEDIGEST, + N_("don't verify digest of files"), NULL }, { "nosize", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &rpmQVKArgs.qva_flags, VERIFY_SIZE, N_("don't verify size of files"), NULL }, diff --git a/lib/rpmcli.h b/lib/rpmcli.h index 37125bffa..4b52e0a03 100644 --- a/lib/rpmcli.h +++ b/lib/rpmcli.h @@ -70,6 +70,7 @@ rpmcliFini(poptContext optCon); #define RPMCLI_POPT_NODEPS -1025 #define RPMCLI_POPT_FORCE -1026 #define RPMCLI_POPT_NOMD5 -1027 +#define RPMCLI_POPT_NOFILEDIGEST -1027 /* same as obsolete RPMCLI_POPT_NOMD5 */ #define RPMCLI_POPT_NOSCRIPTS -1028 #define RPMCLI_POPT_NOSIGNATURE -1029 #define RPMCLI_POPT_NODIGEST -1030 @@ -109,6 +110,7 @@ typedef enum rpmQVSources_e { typedef enum rpmQueryFlags_e { QUERY_FOR_DEFAULT = 0, /*!< */ QUERY_MD5 = (1 << 0), /*!< from --nomd5 */ + QUERY_FILEDIGEST = (1 << 0), /*!< from --nofiledigest, same as --nomd5 */ QUERY_SIZE = (1 << 1), /*!< from --nosize */ QUERY_LINKTO = (1 << 2), /*!< from --nolink */ QUERY_USER = (1 << 3), /*!< from --nouser) */ diff --git a/lib/rpmds.c b/lib/rpmds.c index bc829f4f7..bdc865f39 100644 --- a/lib/rpmds.c +++ b/lib/rpmds.c @@ -998,7 +998,7 @@ static const struct rpmlibProvides_s rpmlibProvides[] = { #endif { "rpmlib(FileDigests)", "4.6.0-1", ( RPMSENSE_EQUAL), - N_("file checksum digest algorithm is per package configurable") }, + N_("file digest algorithm is per package configurable") }, #ifdef WITH_CAP { "rpmlib(FileCaps)", "4.6.1-1", ( RPMSENSE_EQUAL), diff --git a/lib/rpmfi_internal.h b/lib/rpmfi_internal.h index c918defc4..950aebf8b 100644 --- a/lib/rpmfi_internal.h +++ b/lib/rpmfi_internal.h @@ -78,8 +78,8 @@ struct rpmfi_s { /*-----------------------------*/ struct fingerPrint_s * fps; /*!< File fingerprint(s). */ - pgpHashAlgo digestalgo; /*!< File checksum algorithm */ - unsigned char * digests; /*!< File checksums in binary. */ + pgpHashAlgo digestalgo; /*!< File digest algorithm */ + unsigned char * digests; /*!< File digests in binary. */ char * fn; /*!< File name buffer. */ diff --git a/lib/rpmtag.h b/lib/rpmtag.h index b056e308e..53cd07b4f 100644 --- a/lib/rpmtag.h +++ b/lib/rpmtag.h @@ -281,7 +281,7 @@ typedef enum rpmTag_e { RPMTAG_LONGFILESIZES = 5008, /* l[] */ RPMTAG_LONGSIZE = 5009, /* l */ RPMTAG_FILECAPS = 5010, /* s[] */ - RPMTAG_FILEDIGESTALGO = 5011, /* i file checksum algorithm */ + RPMTAG_FILEDIGESTALGO = 5011, /* i file digest algorithm */ RPMTAG_FIRSTFREE_TAG /*!< internal */ } rpmTag; diff --git a/lib/rpmts.h b/lib/rpmts.h index 598223bbf..215b28e89 100644 --- a/lib/rpmts.h +++ b/lib/rpmts.h @@ -57,6 +57,7 @@ typedef enum rpmtransFlags_e { RPMTRANS_FLAG_APPLYONLY = (1 << 25), RPMTRANS_FLAG_NOMD5 = (1 << 27), /*!< from --nomd5 */ + RPMTRANS_FLAG_NOFILEDIGEST = (1 << 27), /*!< from --nofiledigest (alias to --nomd5) */ RPMTRANS_FLAG_NOSUGGEST = (1 << 28), /*!< from --nosuggest */ RPMTRANS_FLAG_ADDINDEPS = (1 << 29), /*!< from --aid */ RPMTRANS_FLAG_NOCONFIGS = (1 << 30), /*!< from --noconfigs */ diff --git a/lib/rpmvf.h b/lib/rpmvf.h index 55c7e9c97..023c1be53 100644 --- a/lib/rpmvf.h +++ b/lib/rpmvf.h @@ -16,7 +16,7 @@ extern "C" { */ typedef enum rpmVerifyAttrs_e { RPMVERIFY_NONE = 0, /*!< */ - RPMVERIFY_MD5 = (1 << 0), /*!< from %verify(md5) */ + RPMVERIFY_FILEDIGEST= (1 << 0), /*!< from %verify(md5) or %verify(filedigest) */ RPMVERIFY_FILESIZE = (1 << 1), /*!< from %verify(size) */ RPMVERIFY_LINKTO = (1 << 2), /*!< from %verify(link) */ RPMVERIFY_USER = (1 << 3), /*!< from %verify(user) */ @@ -43,7 +43,7 @@ typedef enum rpmVerifyAttrs_e { */ typedef enum rpmVerifyFlags_e { VERIFY_DEFAULT = 0, /*!< */ - VERIFY_MD5 = (1 << 0), /*!< from --nomd5 */ + VERIFY_FILEDIGEST = (1 << 0), /*!< from --nomd5 or --nofiledigest */ VERIFY_SIZE = (1 << 1), /*!< from --nosize */ VERIFY_LINKTO = (1 << 2), /*!< from --nolinkto */ VERIFY_USER = (1 << 3), /*!< from --nouser */ @@ -70,14 +70,14 @@ typedef enum rpmVerifyFlags_e { } rpmVerifyFlags; #define VERIFY_ATTRS \ - ( VERIFY_MD5 | VERIFY_SIZE | VERIFY_LINKTO | VERIFY_USER | VERIFY_GROUP | \ + ( VERIFY_FILEDIGEST | VERIFY_SIZE | VERIFY_LINKTO | VERIFY_USER | VERIFY_GROUP | \ VERIFY_MTIME | VERIFY_MODE | VERIFY_RDEV | VERIFY_CONTEXTS | VERIFY_CAPS ) #define VERIFY_ALL \ ( VERIFY_ATTRS | VERIFY_FILES | VERIFY_DEPS | VERIFY_SCRIPT | VERIFY_DIGEST |\ VERIFY_SIGNATURE | VERIFY_HDRCHK ) /** \ingroup rpmvf - * Verify file attributes (including MD5 sum). + * Verify file attributes (including digest). * @todo gnorpm and python bindings prevent this from being static. * @param ts transaction set * @param fi file info (with linked header and current file index) diff --git a/lib/verify.c b/lib/verify.c index b8acf715f..65fafda05 100644 --- a/lib/verify.c +++ b/lib/verify.c @@ -81,23 +81,23 @@ int rpmVerifyFile(const rpmts ts, const rpmfi fi, * Not all attributes of non-regular files can be verified. */ if (S_ISDIR(sb.st_mode)) - flags &= ~(RPMVERIFY_MD5 | RPMVERIFY_FILESIZE | RPMVERIFY_MTIME | + flags &= ~(RPMVERIFY_FILEDIGEST | RPMVERIFY_FILESIZE | RPMVERIFY_MTIME | RPMVERIFY_LINKTO | RPMVERIFY_CAPS); else if (S_ISLNK(sb.st_mode)) { - flags &= ~(RPMVERIFY_MD5 | RPMVERIFY_FILESIZE | RPMVERIFY_MTIME | + flags &= ~(RPMVERIFY_FILEDIGEST | RPMVERIFY_FILESIZE | RPMVERIFY_MTIME | RPMVERIFY_MODE | RPMVERIFY_CAPS); #if CHOWN_FOLLOWS_SYMLINK flags &= ~(RPMVERIFY_USER | RPMVERIFY_GROUP); #endif } else if (S_ISFIFO(sb.st_mode)) - flags &= ~(RPMVERIFY_MD5 | RPMVERIFY_FILESIZE | RPMVERIFY_MTIME | + flags &= ~(RPMVERIFY_FILEDIGEST | RPMVERIFY_FILESIZE | RPMVERIFY_MTIME | RPMVERIFY_LINKTO | RPMVERIFY_CAPS); else if (S_ISCHR(sb.st_mode)) - flags &= ~(RPMVERIFY_MD5 | RPMVERIFY_FILESIZE | RPMVERIFY_MTIME | + flags &= ~(RPMVERIFY_FILEDIGEST | RPMVERIFY_FILESIZE | RPMVERIFY_MTIME | RPMVERIFY_LINKTO | RPMVERIFY_CAPS); else if (S_ISBLK(sb.st_mode)) - flags &= ~(RPMVERIFY_MD5 | RPMVERIFY_FILESIZE | RPMVERIFY_MTIME | + flags &= ~(RPMVERIFY_FILEDIGEST | RPMVERIFY_FILESIZE | RPMVERIFY_MTIME | RPMVERIFY_LINKTO | RPMVERIFY_CAPS); else flags &= ~(RPMVERIFY_LINKTO); @@ -106,7 +106,7 @@ int rpmVerifyFile(const rpmts ts, const rpmfi fi, * Content checks of %ghost files are meaningless. */ if (fileAttrs & RPMFILE_GHOST) - flags &= ~(RPMVERIFY_MD5 | RPMVERIFY_FILESIZE | RPMVERIFY_MTIME | + flags &= ~(RPMVERIFY_FILEDIGEST | RPMVERIFY_FILESIZE | RPMVERIFY_MTIME | RPMVERIFY_LINKTO); /* @@ -115,7 +115,7 @@ int rpmVerifyFile(const rpmts ts, const rpmfi fi, flags &= ~(omitMask | RPMVERIFY_FAILURES); - if (flags & RPMVERIFY_MD5) { + if (flags & RPMVERIFY_FILEDIGEST) { const unsigned char *digest; pgpHashAlgo algo; size_t diglen; @@ -128,12 +128,12 @@ int rpmVerifyFile(const rpmts ts, const rpmfi fi, rc = rpmDoDigest(algo, fn, 0, fdigest, &fsize); sb.st_size = fsize; if (rc) { - *res |= (RPMVERIFY_READFAIL|RPMVERIFY_MD5); + *res |= (RPMVERIFY_READFAIL|RPMVERIFY_FILEDIGEST); } else if (memcmp(fdigest, digest, diglen)) { - *res |= RPMVERIFY_MD5; + *res |= RPMVERIFY_FILEDIGEST; } } else { - *res |= RPMVERIFY_MD5; + *res |= RPMVERIFY_FILEDIGEST; } } @@ -343,7 +343,7 @@ static int verifyHeader(QVA_t qva, const rpmts ts, Header h) ec = rc; } } else if (verifyResult || rpmIsVerbose()) { - const char * size, * MD5, * link, * mtime, * mode; + const char * size, * filedigest, * link, * mtime, * mode; const char * group, * user, * rdev, *caps; static const char *const aok = "."; static const char *const unknown = "?"; @@ -359,7 +359,7 @@ static int verifyHeader(QVA_t qva, const rpmts ts, Header h) ((verifyResult & RPMVERIFY_READFAIL) ? unknown : \ (verifyResult & _RPMVERIFY_F) ? _C : aok) - MD5 = _verifyfile(RPMVERIFY_MD5, "5"); + filedigest = _verifyfile(RPMVERIFY_FILEDIGEST, "5"); size = _verify(RPMVERIFY_FILESIZE, "S"); link = _verifylink(RPMVERIFY_LINKTO, "L"); mtime = _verify(RPMVERIFY_MTIME, "T"); @@ -374,7 +374,7 @@ static int verifyHeader(QVA_t qva, const rpmts ts, Header h) #undef _verify rasprintf(&buf, "%s%s%s%s%s%s%s%s%s %c %s", - size, mode, MD5, rdev, link, user, group, mtime, caps, + size, mode, filedigest, rdev, link, user, group, mtime, caps, ((fileAttrs & RPMFILE_CONFIG) ? 'c' : (fileAttrs & RPMFILE_DOC) ? 'd' : (fileAttrs & RPMFILE_GHOST) ? 'g' : |