SHA256
6
0
forked from pool/rpm

- do not load keyring if signature checking is disabled [bnc#554552]

- fix nosource/nopatch srpm tag generation

OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=49
This commit is contained in:
2010-04-09 10:28:58 +00:00
committed by Git OBS Bridge
parent cc9e81ae5c
commit a907fe4ae3
4 changed files with 68 additions and 1 deletions

23
nosignature.diff Normal file
View File

@@ -0,0 +1,23 @@
Do not load keyring if signature checking is disabled.
--- ./lib/package.c.orig 2010-04-09 09:56:42.000000000 +0000
+++ ./lib/package.c 2010-04-09 09:57:50.000000000 +0000
@@ -760,12 +760,16 @@ exit:
rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
{
rpmRC rc;
- rpmKeyring keyring = rpmtsGetKeyring(ts, 1);
rpmVSFlags vsflags = rpmtsVSFlags(ts);
+ rpmKeyring keyring = 0;
+
+ if ((vsflags & _RPMVSF_NOSIGNATURES) != _RPMVSF_NOSIGNATURES)
+ keyring = rpmtsGetKeyring(ts, 1);
rc = rpmpkgRead(keyring, vsflags, fd, fn, hdrp);
- rpmKeyringFree(keyring);
+ if (keyring)
+ rpmKeyringFree(keyring);
return rc;
}