Commit 4c88c359 authored by Ad Schellevis's avatar Ad Schellevis

fix sshd reload on save in system admin

parent 5b9d5d45
...@@ -194,16 +194,13 @@ if ($_POST) { ...@@ -194,16 +194,13 @@ if ($_POST) {
else if (isset($config['system']['ssh']['port'])) else if (isset($config['system']['ssh']['port']))
unset($config['system']['ssh']['port']); unset($config['system']['ssh']['port']);
$sshd_permitrootlogin = $config['system']['ssh']['permitrootlogin']; if (!isset($_POST['sshdpermitrootlogin']) && isset($config['system']['ssh']['permitrootlogin']))
if ($_POST['sshdpermitrootlogin'])
$config['system']['ssh']['permitrootlogin'] = $_POST['sshdpermitrootlogin'];
else if (isset($config['system']['ssh']['permitrootlogin']))
unset($config['system']['ssh']['permitrootlogin']); unset($config['system']['ssh']['permitrootlogin']);
if (($sshd_enabled != $config['system']['enablesshd']) || if (($sshd_enabled != $config['system']['enablesshd']) ||
($sshd_keyonly != $config['system']['ssh']['sshdkeyonly']) || ($sshd_keyonly != $config['system']['ssh']['sshdkeyonly']) ||
($sshd_port != $config['system']['ssh']['port']) || ($sshd_port != $config['system']['ssh']['port']) ||
($sshd_permitrootlogin != $config['system']['ssh']['permitrootlogin'])) { ($pconfig['system']['ssh']['permitrootlogin'] != isset($config['system']['ssh']['permitrootlogin'])) ) {
$restart_sshd = true; $restart_sshd = true;
} }
...@@ -234,7 +231,7 @@ if ($_POST) { ...@@ -234,7 +231,7 @@ if ($_POST) {
write_config(); write_config();
$retval = filter_configure(); $retval = filter_configure();
$savemsg = get_std_save_message($retval); $savemsg = get_std_save_message($retval);
if ($restart_webgui) if ($restart_webgui)
$savemsg .= sprintf("<br />" . gettext("One moment...redirecting to %s in 20 seconds."),$url); $savemsg .= sprintf("<br />" . gettext("One moment...redirecting to %s in 20 seconds."),$url);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment