|
|
102e92 |
diff -up yum-3.4.3/docs/yum.conf.5.orig yum-3.4.3/docs/yum.conf.5
|
|
|
102e92 |
--- yum-3.4.3/docs/yum.conf.5.orig 2017-10-26 11:13:52.013324456 +0200
|
|
|
102e92 |
+++ yum-3.4.3/docs/yum.conf.5 2017-10-26 11:15:37.733858789 +0200
|
|
|
102e92 |
@@ -106,28 +106,34 @@ default for all repositories. The defaul
|
|
|
102e92 |
|
|
|
102e92 |
.IP
|
|
|
102e92 |
\fBpayload_gpgcheck\fR
|
|
|
102e92 |
-Either `1' or `0'. This tells yum whether or not it should also perform a GPG
|
|
|
102e92 |
-signature check on the payload (part of a package holding the actual files that
|
|
|
102e92 |
-comprise the package).
|
|
|
102e92 |
-
|
|
|
102e92 |
-By default, yum only performs GPG signature checks on package headers.
|
|
|
102e92 |
-Thus, if the payload data has been tampered with or corrupted, yum will fail in
|
|
|
102e92 |
-the middle of the transaction due to an RPM unpacking error, after some
|
|
|
102e92 |
-unverified scriptlets might have already run, and possibly leave the package in
|
|
|
102e92 |
-question partly installed.
|
|
|
102e92 |
-
|
|
|
102e92 |
-To prevent all of that, you can enable this option to extend the signature
|
|
|
102e92 |
-check to also include the payload, so that yum can avoid running the
|
|
|
102e92 |
-transaction in case of payload corruption.
|
|
|
102e92 |
-This slightly improves security, however at the expense of significantly
|
|
|
102e92 |
-increased transaction time, so you may want to only use this option when
|
|
|
102e92 |
-package corruption is a concern.
|
|
|
102e92 |
+Either `1' or `0'. This tells yum whether or not it should perform a v3
|
|
|
102e92 |
+signature check on packages when \fBgpgcheck\fR (or \fBlocalpkg_gpgcheck\fR for
|
|
|
102e92 |
+local packages) is enabled.
|
|
|
102e92 |
+
|
|
|
102e92 |
+There are two types of GPG signatures generated by rpm: v3 (on header+payload)
|
|
|
102e92 |
+and v4 (on header only). When rpm signs a package, it creates both types. Yum
|
|
|
102e92 |
+can verify any of them before the transaction, depending on which options are
|
|
|
102e92 |
+set. When \fBgpgcheck\fR is enabled and this option is disabled, yum will
|
|
|
102e92 |
+verify v4 signatures only. When both \fBgpgcheck\fR and this option are
|
|
|
102e92 |
+enabled, yum will verify both v4 and v3 signatures (equivalent to running "rpm
|
|
|
102e92 |
+\-\-checksig"). The same rules apply to local packages and the
|
|
|
102e92 |
+\fBlocalpkg_gpgcheck\fR option accordingly.
|
|
|
102e92 |
+
|
|
|
102e92 |
+Since the header contains sha256 digests of individual files in the payload (a
|
|
|
102e92 |
+gzip-compressed cpio archive of files used in the package), verifying the
|
|
|
102e92 |
+header signature (v4) is sufficient to ensure authenticity and integrity of the
|
|
|
102e92 |
+whole package. After rpm unpacks the payload, it moves the files to their
|
|
|
102e92 |
+destination paths one by one after they pass the digest check. If a file
|
|
|
102e92 |
+doesn't pass, it won't be moved and the transaction will abort. However,
|
|
|
102e92 |
+because no rollback is done in such a case, the package may end up in the
|
|
|
102e92 |
+partially installed state.
|
|
|
102e92 |
+
|
|
|
102e92 |
+By verifying v3 signatures, yum will detect payload tamper before the
|
|
|
102e92 |
+transaction. While this will slightly increase processing time for big
|
|
|
102e92 |
+transactions and/or packages, it will prevent such broken installs and enhance
|
|
|
102e92 |
+security.
|
|
|
102e92 |
|
|
|
102e92 |
-For this option to have effect, make sure to also enable gpgcheck (or
|
|
|
102e92 |
-localpkg_gpgcheck for local packages).
|
|
|
102e92 |
-
|
|
|
102e92 |
-When this option is set in the [main] section it sets the default for all
|
|
|
102e92 |
-repositories. The default is `0'.
|
|
|
102e92 |
+The default is `0'.
|
|
|
102e92 |
|
|
|
102e92 |
.IP
|
|
|
102e92 |
\fBskip_broken\fR
|
|
|
102e92 |
diff -up yum-3.4.3/rpmUtils/miscutils.py.orig yum-3.4.3/rpmUtils/miscutils.py
|
|
|
102e92 |
--- yum-3.4.3/rpmUtils/miscutils.py.orig 2017-10-26 11:13:49.637334921 +0200
|
|
|
102e92 |
+++ yum-3.4.3/rpmUtils/miscutils.py 2017-10-26 11:15:43.141834969 +0200
|
|
|
102e92 |
@@ -61,8 +61,8 @@ def compareVerOnly(v1, v2):
|
|
|
102e92 |
def checkSig(ts, package, payload=False):
|
|
|
102e92 |
"""Takes a transaction set and a package, check it's sigs.
|
|
|
102e92 |
|
|
|
102e92 |
- By default, only RPMv4 sigs (header-only) will be verified (faster). By
|
|
|
102e92 |
- setting payload to True, RPMv3 sigs (header+payload) will also be verified
|
|
|
102e92 |
+ By default, only v4 sigs (header-only) will be verified (faster). By
|
|
|
102e92 |
+ setting payload to True, v3 sigs (header+payload) will also be verified
|
|
|
102e92 |
(slower).
|
|
|
102e92 |
|
|
|
102e92 |
return 0 if they are all fine
|