aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-11-26 08:18:08 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-11-26 08:18:08 -0200
commita2103cc238bc568016d4ed931bd5ec52ca103fc8 (patch)
tree68d073a81533339d3851848fec710df51024fdf4
parentd8be770071ed43e219b59b1fb53496515852e0be (diff)
downloadpfsense-packages-a2103cc238bc568016d4ed931bd5ec52ca103fc8.tar.gz
pfsense-packages-a2103cc238bc568016d4ed931bd5ec52ca103fc8.tar.bz2
pfsense-packages-a2103cc238bc568016d4ed931bd5ec52ca103fc8.zip
Stop trying to be smart patching /etc/sshd, stock version already consider /etc/sshd_extra. It fixes #3959
-rw-r--r--config/sshdcond/sshdcond.inc22
-rw-r--r--pkg_config.10.xml2
-rw-r--r--pkg_config.8.xml2
-rw-r--r--pkg_config.8.xml.amd642
4 files changed, 4 insertions, 24 deletions
diff --git a/config/sshdcond/sshdcond.inc b/config/sshdcond/sshdcond.inc
index 84e98fe3..7ff911c1 100644
--- a/config/sshdcond/sshdcond.inc
+++ b/config/sshdcond/sshdcond.inc
@@ -37,27 +37,7 @@ require_once("config.inc");
require_once("util.inc");
function restart_sshd() {
- // backup /etc/sshd before any change
- $etc_sshd="/etc/sshd";
- $pfsense_version=preg_replace("/\s/","",file_get_contents("/etc/version"));
- if (!file_exists('/root/'.$pfsense_version.'.sshd.backup')) {
- copy ($etc_sshd,'/root/'.$pfsense_version.'.sshd.backup');
- }
-
- #patch /etc/sshd if need
- $sshd_file=file($etc_sshd);
- $sshd_new_file="";
- foreach ($sshd_file as $line) {
- if (preg_match('/sshconf .= "Port/',$line)) {
- $sshd_new_file.= $line;
- $sshd_new_file.= "\t".'if(file_exists("/etc/ssh/sshd_extra")) {$sshconf.=file_get_contents("/etc/ssh/sshd_extra");}'."\n";
- }
- elseif(!preg_match('/sshd_extra/',$line)) {
- $sshd_new_file.= $line;
- }
- }
- file_put_contents($etc_sshd,$sshd_new_file,LOCK_EX);
- mwexec_bg($etc_sshd);
+ mwexec_bg("/etc/sshd");
}
function sshdcond_custom_php_install_command() {
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index 2decacb6..c1215bcf 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -1219,7 +1219,7 @@
<descr><![CDATA[Allows to define SSH overrides for users,groups,hosts and addresses using Match in a convenient way.<br />
This package acts as an access list frontend for ssh connections]]></descr>
<category>Enhancements</category>
- <version>1.0</version>
+ <version>1.0.1</version>
<status>Beta</status>
<required_version>2.2</required_version>
<config_file>https://packages.pfsense.org/packages/config/sshdcond/sshdcond.xml</config_file>
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index 9ee9ab4b..7ef4fc0a 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -1575,7 +1575,7 @@
<descr><![CDATA[Allows to define SSH overrides for users,groups,hosts and addresses using Match in a convenient way.<br />
This package acts as an access list frontend for ssh connections]]></descr>
<category>Enhancements</category>
- <version>1.0</version>
+ <version>1.0.1</version>
<status>Beta</status>
<required_version>2.0</required_version>
<config_file>https://packages.pfsense.org/packages/config/sshdcond/sshdcond.xml</config_file>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index a1efb462..a3fe70c3 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -1562,7 +1562,7 @@
<descr><![CDATA[Allows to define SSH overrides for users,groups,hosts and addresses using Match in a convenient way.<br />
This package acts as an access list frontend for ssh connections]]></descr>
<category>Enhancements</category>
- <version>1.0</version>
+ <version>1.0.1</version>
<status>Beta</status>
<required_version>2.0</required_version>
<config_file>https://packages.pfsense.org/packages/config/sshdcond/sshdcond.xml</config_file>