7b6eaa99d4
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=c85e21a7ea9af7ce97598c7d3caa62e5
24 lines
678 B
Diff
24 lines
678 B
Diff
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;
|
|
}
|
|
|