Blame SOURCES/BZ-1451817-docs-improve-payload-gpgcheck-opt.patch

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