From 6cf155539824f56db48ea4e2715c387a2be53105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Mon, 6 Jan 2020 15:22:36 +0100 Subject: [PATCH] Revert "libxbps: verify repodata signatures even if rootdir is unset." This reverts commit be05118aa8adb9f2520c679c8649ce76eea28858. --- lib/verifysig.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/verifysig.c b/lib/verifysig.c index 7446a50a..58729a37 100644 --- a/lib/verifysig.c +++ b/lib/verifysig.c @@ -97,12 +97,7 @@ xbps_verify_signature(struct xbps_repo *repo, const char *sigfile, /* * Prepare repository RSA public key to verify fname signature. */ - /* XXX: xbps-rindex does not set rootdir, use cwd and fallback to defaults otherwise */ - rkeyfile = xbps_xasprintf("keys/%s.plist", hexfp); - if (access(rkeyfile, R_OK) == -1) { - free(rkeyfile); - rkeyfile = xbps_xasprintf("%s/keys/%s.plist", repo->xhp->metadir, hexfp); - } + rkeyfile = xbps_xasprintf("%s/keys/%s.plist", repo->xhp->metadir, hexfp); repokeyd = xbps_plist_dictionary_from_file(repo->xhp, rkeyfile); if (xbps_object_type(repokeyd) != XBPS_TYPE_DICTIONARY) { xbps_dbg_printf(repo->xhp, "cannot read rkey data at %s: %s\n",