summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/files.c23
-rw-r--r--doc/rpm.84
-rw-r--r--lib/cpio.c4
-rw-r--r--lib/cpio.h65
-rw-r--r--lib/fsm.c10
-rw-r--r--lib/fsm.h4
-rw-r--r--lib/poptI.c10
-rw-r--r--lib/poptQV.c10
-rw-r--r--lib/rpmcli.h2
-rw-r--r--lib/rpmds.c2
-rw-r--r--lib/rpmfi_internal.h4
-rw-r--r--lib/rpmtag.h2
-rw-r--r--lib/rpmts.h1
-rw-r--r--lib/rpmvf.h8
-rw-r--r--lib/verify.c26
-rw-r--r--python/rpmmodule.c1
-rw-r--r--rpmio/rpmfileutil.h4
-rw-r--r--rpmqv.c2
-rw-r--r--tools/debugedit.c2
19 files changed, 96 insertions, 88 deletions
diff --git a/build/files.c b/build/files.c
index 3484ef62c..2cf71d6d1 100644
--- a/build/files.c
+++ b/build/files.c
@@ -254,15 +254,16 @@ typedef const struct VFA {
/**
*/
static VFA_t const verifyAttrs[] = {
- { "md5", 0, RPMVERIFY_MD5 },
- { "size", 0, RPMVERIFY_FILESIZE },
- { "link", 0, RPMVERIFY_LINKTO },
- { "user", 0, RPMVERIFY_USER },
- { "group", 0, RPMVERIFY_GROUP },
- { "mtime", 0, RPMVERIFY_MTIME },
- { "mode", 0, RPMVERIFY_MODE },
- { "rdev", 0, RPMVERIFY_RDEV },
- { "caps", 0, RPMVERIFY_CAPS },
+ { "md5", 0, RPMVERIFY_FILEDIGEST },
+ { "filedigest", 0, RPMVERIFY_FILEDIGEST },
+ { "size", 0, RPMVERIFY_FILESIZE },
+ { "link", 0, RPMVERIFY_LINKTO },
+ { "user", 0, RPMVERIFY_USER },
+ { "group", 0, RPMVERIFY_GROUP },
+ { "mtime", 0, RPMVERIFY_MTIME },
+ { "mode", 0, RPMVERIFY_MODE },
+ { "rdev", 0, RPMVERIFY_RDEV },
+ { "caps", 0, RPMVERIFY_CAPS },
{ NULL, 0, 0 }
};
@@ -1044,7 +1045,7 @@ static void genCpioListAndHeader(FileList fl,
rpm_loff_t totalFileSize = 0;
/*
- * See if non-md5 file checksum algorithm is requested. If not
+ * See if non-md5 file digest algorithm is requested. If not
* specified, quietly assume md5. Otherwise check if supported type.
*/
digestalgo = rpmExpandNumeric(isSrc ? "%{_source_filedigest_algorithm}" :
@@ -1212,7 +1213,7 @@ static void genCpioListAndHeader(FileList fl,
headerPutString(h, RPMTAG_FILELINKTOS, buf);
if (flp->flags & RPMFILE_GHOST) {
- flp->verifyFlags &= ~(RPMVERIFY_MD5 | RPMVERIFY_FILESIZE |
+ flp->verifyFlags &= ~(RPMVERIFY_FILEDIGEST | RPMVERIFY_FILESIZE |
RPMVERIFY_LINKTO | RPMVERIFY_MTIME);
}
headerPutUint32(h, RPMTAG_FILEVERIFYFLAGS, &(flp->verifyFlags),1);
diff --git a/doc/rpm.8 b/doc/rpm.8
index 07754808c..d6d497322 100644
--- a/doc/rpm.8
+++ b/doc/rpm.8
@@ -89,7 +89,7 @@ rpm \- RPM Package Manager
[\fB--nodeps\fR] [\fB--nofiles\fR] [\fB--noscripts\fR]
[\fB--nodigest\fR] [\fB--nosignature\fR]
- [\fB--nolinkto\fR] [\fB--nomd5\fR] [\fB--nosize\fR] [\fB--nouser\fR]
+ [\fB--nolinkto\fR] [\fB--nofiledigest\fR] [\fB--nosize\fR] [\fB--nouser\fR]
[\fB--nogroup\fR] [\fB--nomtime\fR] [\fB--nomode\fR] [\fB--nordev\fR]
[\fB--nocaps\fR]
@@ -672,7 +672,7 @@ Don't verify package or header signatures when reading.
.TP
\fB--nolinkto\fR
.TP
-\fB--nomd5\fR
+\fB--nofiledigest\fR (formerly \fB--nomd5\fR)
.TP
\fB--nosize\fR
.TP
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) */
diff --git a/lib/fsm.c b/lib/fsm.c
index 160b99f27..b892b0397 100644
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -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);
}
diff --git a/lib/fsm.h b/lib/fsm.h
index a5991bb3b..3c819b489 100644
--- a/lib/fsm.h
+++ b/lib/fsm.h
@@ -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' :
diff --git a/python/rpmmodule.c b/python/rpmmodule.c
index bf1356d84..0e292d442 100644
--- a/python/rpmmodule.c
+++ b/python/rpmmodule.c
@@ -409,6 +409,7 @@ void init_rpm(void)
REGISTER_ENUM(RPMTRANS_FLAG_NOPOSTUN);
REGISTER_ENUM(RPMTRANS_FLAG_NOTRIGGERPOSTUN);
REGISTER_ENUM(RPMTRANS_FLAG_NOMD5);
+ REGISTER_ENUM(RPMTRANS_FLAG_NOFILEDIGEST);
REGISTER_ENUM(RPMTRANS_FLAG_NOSUGGEST);
REGISTER_ENUM(RPMTRANS_FLAG_ADDINDEPS);
REGISTER_ENUM(RPMTRANS_FLAG_NOCONFIGS);
diff --git a/rpmio/rpmfileutil.h b/rpmio/rpmfileutil.h
index 7f92cbc41..fd7a813ba 100644
--- a/rpmio/rpmfileutil.h
+++ b/rpmio/rpmfileutil.h
@@ -29,8 +29,8 @@ typedef enum rpmCompressedMagic_e {
* Calculate a file digest and size.
* @param algo digest algorithm
* @param fn file name
- * @param asAscii return checksum as ascii string?
- * @retval digest address of calculated checksum
+ * @param asAscii return digest as ascii string?
+ * @retval digest address of calculated digest
* @retval *fsizep file size pointer (or NULL)
* @return 0 on success, 1 on error
*/
diff --git a/rpmqv.c b/rpmqv.c
index 15fe2d855..0e1567167 100644
--- a/rpmqv.c
+++ b/rpmqv.c
@@ -784,7 +784,7 @@ int main(int argc, char *argv[])
#ifdef IAM_RPMK
case MODE_CHECKSIG:
{ rpmVerifyFlags verifyFlags =
- (VERIFY_MD5|VERIFY_DIGEST|VERIFY_SIGNATURE);
+ (VERIFY_FILEDIGEST|VERIFY_DIGEST|VERIFY_SIGNATURE);
verifyFlags &= ~ka->qva_flags;
ka->qva_flags = (rpmQueryFlags) verifyFlags;
diff --git a/tools/debugedit.c b/tools/debugedit.c
index f42b34a2a..dd307dd90 100644
--- a/tools/debugedit.c
+++ b/tools/debugedit.c
@@ -1396,7 +1396,7 @@ handle_build_id (DSO *dso, Elf_Data *build_id,
if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL)
{
bad:
- fprintf (stderr, "Failed to compute header checksum: %s\n",
+ fprintf (stderr, "Failed to compute header digest: %s\n",
elf_errmsg (elf_errno ()));
exit (1);
}