aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-03-05 11:13:00 +0000
committerThierry Vignaud <tv@mandriva.org>2009-03-05 11:13:00 +0000
commit7fca3339aa7c6e98b1e805811590c30e3b2160d1 (patch)
tree2bd0b234e1b44161612568b33d367f41ef865251 /URPM.xs
parent23eb7d26bcb2d276bca4ba1220c29048f78d0b8b (diff)
downloadperl-URPM-7fca3339aa7c6e98b1e805811590c30e3b2160d1.tar
perl-URPM-7fca3339aa7c6e98b1e805811590c30e3b2160d1.tar.gz
perl-URPM-7fca3339aa7c6e98b1e805811590c30e3b2160d1.tar.bz2
perl-URPM-7fca3339aa7c6e98b1e805811590c30e3b2160d1.tar.xz
perl-URPM-7fca3339aa7c6e98b1e805811590c30e3b2160d1.zip
(verify_signature) make checking urpmi signatures works in chrooted environments
(especially important for installer where there's no rpmdb in / (really /var/lib/rpm) and thus no keys to check against)
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs5
1 files changed, 3 insertions, 2 deletions
diff --git a/URPM.xs b/URPM.xs
index cfbfad1..2269cd7 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -3728,8 +3728,9 @@ Urpm_verify_rpm(filename, ...)
RETVAL
char *
-Urpm_verify_signature(filename)
+Urpm_verify_signature(filename, prefix="/")
char *filename
+ char *prefix
PREINIT:
rpmts ts = NULL;
char result[1024];
@@ -3743,7 +3744,7 @@ Urpm_verify_signature(filename)
} else {
read_config_files(0);
ts = rpmtsCreate();
- rpmtsSetRootDir(ts, "/");
+ rpmtsSetRootDir(ts, prefix);
rpmtsOpenDB(ts, O_RDONLY);
rpmtsSetVSFlags(ts, RPMVSF_DEFAULT);
rc = rpmReadPackageFile(ts, fd, filename, &h);