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;
|
||
|
}
|
||
|
|