From e5b5e29c3b2a4b76ad412c9a2d55273701505e4c Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 7 Feb 2014 10:41:41 -0200 Subject: Add support for signed PBI, help ticket #3365: - Add an option to allow user to accept unsigned packages - The only missing part is public key, that needs to be added to /var/db/pbi/keys/pfSense.ssl --- etc/inc/pkg-utils.inc | 6 +++++- usr/local/www/system_advanced_misc.php | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index 4ffcb84..ef2b17e 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -563,7 +563,11 @@ function pkg_fetch_recursive($pkgname, $filename, $dependlevel = 0, $base_url = $pkgaddout = ""; - exec("/usr/local/sbin/pbi_add " . $pkgstaging . " -f -v --no-checksig " . escapeshellarg($fetchto) . " 2>&1", $pkgaddout); + $no_checksig = ""; + if (isset($config['system']['pkg_nochecksig'])) + $no_checksig = "--no-checksig"; + + exec("/usr/local/sbin/pbi_add " . $pkgstaging . " -f -v {$no_checksig} " . escapeshellarg($fetchto) . " 2>&1", $pkgaddout); pkg_debug($pkgname . " " . print_r($pkgaddout, true) . "\npbi_add successfully completed.\n"); setup_library_paths(); exec("/usr/local/sbin/pbi_info " . escapeshellarg(preg_replace('/\.pbi$/','',$filename)) . " | /usr/bin/awk '/Prefix/ {print $2}'",$pbidir); diff --git a/usr/local/www/system_advanced_misc.php b/usr/local/www/system_advanced_misc.php index b5f6498..0d00453 100644 --- a/usr/local/www/system_advanced_misc.php +++ b/usr/local/www/system_advanced_misc.php @@ -74,6 +74,7 @@ $pconfig['use_mfs_tmpvar'] = isset($config['system']['use_mfs_tmpvar']); $pconfig['use_mfs_tmp_size'] = $config['system']['use_mfs_tmp_size']; $pconfig['use_mfs_var_size'] = $config['system']['use_mfs_var_size']; $pconfig['noinstalllanspd'] = $config['system']['noinstalllanspd']; +$pconfig['pkg_nochecksig'] = $config['system']['pkg_nochecksig']; $pconfig['powerd_ac_mode'] = "hadp"; if (!empty($config['system']['powerd_ac_mode'])) @@ -188,6 +189,11 @@ if ($_POST) { unset($config['system']['noinstalllanspd']); } + if($_POST['pkg_nochecksig'] == "yes") + $config['system']['pkg_nochecksig'] = true; + else + unset($config['system']['pkg_nochecksig']); + if($_POST['maxmss_enable'] == "yes") { $config['system']['maxmss_enable'] = true; $config['system']['maxmss'] = $_POST['maxmss']; @@ -699,6 +705,18 @@ function tmpvar_checked(obj) { + + + + + + onclick="tmpvar_checked(this)" /> +
+ + + + +   " /> -- cgit v1.1