Project

General

Profile

Download (19.8 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/* $Id$ */
3
/*
4
	system_advanced_admin.php
5
	part of pfSense
6
	Copyright (C) 2005-2010 Scott Ullrich
7
	Copyright (C) 2008 Shrew Soft Inc
8
	Copyright (C) 2013-2015 Electric Sheep Fencing, LP
9

    
10
	originally part of m0n0wall (http://m0n0.ch/wall)
11
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
12
	All rights reserved.
13

    
14
	Redistribution and use in source and binary forms, with or without
15
	modification, are permitted provided that the following conditions are met:
16

    
17
	1. Redistributions of source code must retain the above copyright notice,
18
	   this list of conditions and the following disclaimer.
19

    
20
	2. Redistributions in binary form must reproduce the above copyright
21
	   notice, this list of conditions and the following disclaimer in the
22
	   documentation and/or other materials provided with the distribution.
23

    
24
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
25
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
26
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
28
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
	POSSIBILITY OF SUCH DAMAGE.
34
*/
35
/*
36
	pfSense_BUILDER_BINARIES:	/usr/bin/killall
37
	pfSense_MODULE:	system
38
*/
39

    
40
##|+PRIV
41
##|*IDENT=page-system-advanced-admin
42
##|*NAME=System: Advanced: Admin Access Page
43
##|*DESCR=Allow access to the 'System: Advanced: Admin Access' page.
44
##|*MATCH=system_advanced_admin.php*
45
##|-PRIV
46

    
47
require("guiconfig.inc");
48
require_once("functions.inc");
49
require_once("filter.inc");
50
require_once("shaper.inc");
51

    
52
$pconfig['webguiproto'] = $config['system']['webgui']['protocol'];
53
$pconfig['webguiport'] = $config['system']['webgui']['port'];
54
$pconfig['max_procs'] = ($config['system']['webgui']['max_procs']) ? $config['system']['webgui']['max_procs'] : 2;
55
$pconfig['ssl-certref'] = $config['system']['webgui']['ssl-certref'];
56
$pconfig['disablehttpredirect'] = isset($config['system']['webgui']['disablehttpredirect']);
57
$pconfig['disableconsolemenu'] = isset($config['system']['disableconsolemenu']);
58
$pconfig['noantilockout'] = isset($config['system']['webgui']['noantilockout']);
59
$pconfig['nodnsrebindcheck'] = isset($config['system']['webgui']['nodnsrebindcheck']);
60
$pconfig['nohttpreferercheck'] = isset($config['system']['webgui']['nohttpreferercheck']);
61
$pconfig['beast_protection'] = isset($config['system']['webgui']['beast_protection']);
62
$pconfig['pagenamefirst'] = isset($config['system']['webgui']['pagenamefirst']);
63
$pconfig['loginautocomplete'] = isset($config['system']['webgui']['loginautocomplete']);
64
$pconfig['althostnames'] = $config['system']['webgui']['althostnames'];
65
$pconfig['enableserial'] = $config['system']['enableserial'];
66
$pconfig['serialspeed'] = $config['system']['serialspeed'];
67
$pconfig['primaryconsole'] = $config['system']['primaryconsole'];
68
$pconfig['enablesshd'] = $config['system']['enablesshd'];
69
$pconfig['sshport'] = $config['system']['ssh']['port'];
70
$pconfig['sshdkeyonly'] = isset($config['system']['ssh']['sshdkeyonly']);
71
$pconfig['quietlogin'] = isset($config['system']['webgui']['quietlogin']);
72

    
73
$a_cert =& $config['cert'];
74

    
75
$certs_available = false;
76
if (is_array($a_cert) && count($a_cert))
77
	$certs_available = true;
78

    
79
if (!$pconfig['webguiproto'] || !$certs_available)
80
	$pconfig['webguiproto'] = "http";
81

    
82
if ($_POST) {
83

    
84
	unset($input_errors);
85
	$pconfig = $_POST;
86

    
87
	/* input validation */
88
	if ($_POST['tcp-port'])
89
		if(!is_port($_POST['tcp-port']))
90
			$input_errors[] = gettext("You must specify a valid webConfigurator port number");
91

    
92
	if ($_POST['max-processes'])
93
		if(!is_numericint($_POST['max-processes']) || ($_POST['max-processes'] < 1) || ($_POST['max-processes'] > 500))
94
			$input_errors[] = gettext("Max Processes must be a number 1 or greater");
95

    
96
	if ($_POST['alternate-hostnames']) {
97
		$althosts = explode(" ", $_POST['alternate-hostnames']);
98
		foreach ($althosts as $ah)
99
			if (!is_hostname($ah))
100
				$input_errors[] = sprintf(gettext("Alternate hostname %s is not a valid hostname."),htmlspecialchars($ah));
101
	}
102

    
103
	if ($_POST['ssh-port'])
104
		if(!is_port($_POST['ssh-port']))
105
			$input_errors[] = gettext("You must specify a valid port number");
106

    
107
	if($_POST['authentication-method'] == "yes")
108
		$config['system']['ssh']['sshdkeyonly'] = "enabled";
109
	else if (isset($config['system']['ssh']['sshdkeyonly']))
110
		unset($config['system']['ssh']['sshdkeyonly']);
111

    
112
	ob_flush();
113
	flush();
114

    
115
	if (!$input_errors) {
116

    
117
		if (update_if_changed("webgui protocol", $config['system']['webgui']['protocol'], $_POST['protocol']))
118
			$restart_webgui = true;
119
		if (update_if_changed("webgui port", $config['system']['webgui']['port'], $_POST['tcp-port']))
120
			$restart_webgui = true;
121
		if (update_if_changed("webgui certificate", $config['system']['webgui']['ssl-certref'], $_POST['ssl-certificate']))
122
			$restart_webgui = true;
123
		if (update_if_changed("webgui max processes", $config['system']['webgui']['max_procs'], $_POST['max-processes']))
124
			$restart_webgui = true;
125

    
126
		if ($_POST['webgui-redirect'] == "yes") {
127
			$config['system']['webgui']['disablehttpredirect'] = true;
128
			$restart_webgui = true;
129
		} else {
130
			unset($config['system']['webgui']['disablehttpredirect']);
131
			$restart_webgui = true;
132
		}
133
		if ($_POST['webgui-login-messages'] == "yes") {
134
			$config['system']['webgui']['quietlogin'] = true;
135
		} else {
136
			unset($config['system']['webgui']['quietlogin']);
137
		}
138

    
139
		if($_POST['console-menu'] == "yes")
140
			$config['system']['disableconsolemenu'] = true;
141
		else
142
			unset($config['system']['disableconsolemenu']);
143

    
144
		if ($_POST['anti-lockout'] == "yes")
145
			$config['system']['webgui']['noantilockout'] = true;
146
		else
147
			unset($config['system']['webgui']['noantilockout']);
148

    
149
		if ($_POST['serial-terminal'] == "yes" || $g['enableserial_force'])
150
			$config['system']['enableserial'] = true;
151
		else
152
			unset($config['system']['enableserial']);
153

    
154
		if (is_numericint($_POST['serial-speed']))
155
			$config['system']['serialspeed'] = $_POST['serial-speed'];
156
		else
157
			unset($config['system']['serialspeed']);
158

    
159
		if ($_POST['primary-console'])
160
			$config['system']['primaryconsole'] = $_POST['primary-console'];
161
		else
162
			unset($config['system']['primaryconsole']);
163

    
164
		if ($_POST['dns-rebind-check'] == "yes")
165
			$config['system']['webgui']['nodnsrebindcheck'] = true;
166
		else
167
			unset($config['system']['webgui']['nodnsrebindcheck']);
168

    
169
		if ($_POST['browser-http_referer-enforcement'] == "yes")
170
			$config['system']['webgui']['nohttpreferercheck'] = true;
171
		else
172
			unset($config['system']['webgui']['nohttpreferercheck']);
173

    
174
		if ($_POST['beast-attack-protection'] == "yes")
175
			$config['system']['webgui']['beast_protection'] = true;
176
		else
177
			unset($config['system']['webgui']['beast_protection']);
178

    
179
		if ($_POST['browser-tab-text'] == "yes")
180
			$config['system']['webgui']['pagenamefirst'] = true;
181
		else
182
			unset($config['system']['webgui']['pagenamefirst']);
183

    
184
		if ($_POST['webgui-login-autocomplete'] == "yes")
185
			$config['system']['webgui']['loginautocomplete'] = true;
186
		else
187
			unset($config['system']['webgui']['loginautocomplete']);
188

    
189
		if ($_POST['alternate-hostnames'])
190
			$config['system']['webgui']['althostnames'] = $_POST['alternate-hostnames'];
191
		else
192
			unset($config['system']['webgui']['althostnames']);
193

    
194
		$sshd_enabled = $config['system']['enablesshd'];
195
		if($_POST['secure-shell-server'])
196
			$config['system']['enablesshd'] = "enabled";
197
		else
198
			unset($config['system']['enablesshd']);
199

    
200
		$sshd_keyonly = isset($config['system']['sshdkeyonly']);
201
		if ($_POST['authentication-method'])
202
			$config['system']['sshdkeyonly'] = true;
203
		else
204
			unset($config['system']['sshdkeyonly']);
205

    
206
		$sshd_port = $config['system']['ssh']['port'];
207
		if ($_POST['ssh-port'])
208
			$config['system']['ssh']['port'] = $_POST['ssh-port'];
209
		else if (isset($config['system']['ssh']['port']))
210
			unset($config['system']['ssh']['port']);
211

    
212
		if (($sshd_enabled != $config['system']['enablesshd']) ||
213
			($sshd_keyonly != $config['system']['sshdkeyonly']) ||
214
			($sshd_port != $config['system']['ssh']['port']))
215
			$restart_sshd = true;
216

    
217
		if ($restart_webgui) {
218
			global $_SERVER;
219
			$http_host_port = explode("]", $_SERVER['HTTP_HOST']);
220
			/* IPv6 address check */
221
			if(strstr($_SERVER['HTTP_HOST'], "]")) {
222
				if(count($http_host_port) > 1) {
223
					array_pop($http_host_port);
224
					$host = str_replace(array("[", "]"), "", implode(":", $http_host_port));
225
					$host = "[{$host}]";
226
				} else {
227
					$host = str_replace(array("[", "]"), "", implode(":", $http_host_port));
228
					$host = "[{$host}]";
229
				}
230
			} else {
231
				list($host) = explode(":", $_SERVER['HTTP_HOST']);
232
			}
233
			$prot = $config['system']['webgui']['protocol'];
234
			$port = $config['system']['webgui']['port'];
235
			if ($port)
236
				$url = "{$prot}://{$host}:{$port}/system_advanced_admin.php";
237
			else
238
				$url = "{$prot}://{$host}/system_advanced_admin.php";
239
		}
240

    
241
		write_config();
242

    
243
		$retval = filter_configure();
244
		$savemsg = get_std_save_message($retval);
245

    
246
		if ($restart_webgui)
247
			$savemsg .= sprintf("<br />" . gettext("One moment...redirecting to %s in 20 seconds."),$url);
248

    
249
		conf_mount_rw();
250
		setup_serial_port();
251
		// Restart DNS in case dns rebinding toggled
252
		if (isset($config['dnsmasq']['enable']))
253
			services_dnsmasq_configure();
254
		elseif (isset($config['unbound']['enable']))
255
			services_unbound_configure();
256
		conf_mount_ro();
257
	}
258
}
259

    
260
unset($hwcrypto);
261
$fd = @fopen("{$g['varlog_path']}/dmesg.boot", "r");
262
if ($fd) {
263
	while (!feof($fd)) {
264
		$dmesgl = fgets($fd);
265
		if (preg_match("/^hifn.: (.*?),/", $dmesgl, $matches)) {
266
				unset($pconfig['beast_protection']);
267
				$disable_beast_option = true;
268
				$hwcrypto = $matches[1];
269
			break;
270
		}
271
	}
272
	fclose($fd);
273
}
274

    
275
$pgtitle = array(gettext("System"),gettext("Advanced: Admin Access"));
276
include("head.inc");
277

    
278
if ($input_errors)
279
	print_input_errors($input_errors);
280
if ($savemsg)
281
	print_info_box($savemsg);
282

    
283
$tab_array = array();
284
$tab_array[] = array(gettext("Admin Access"), true, "system_advanced_admin.php");
285
$tab_array[] = array(gettext("Firewall / NAT"), false, "system_advanced_firewall.php");
286
$tab_array[] = array(gettext("Networking"), false, "system_advanced_network.php");
287
$tab_array[] = array(gettext("Miscellaneous"), false, "system_advanced_misc.php");
288
$tab_array[] = array(gettext("System Tunables"), false, "system_advanced_sysctl.php");
289
$tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
290
display_top_tabs($tab_array);
291

    
292
?><div id="container"><?php
293

    
294
require('classes/Form.class.php');
295
$form = new Form;
296
$section = new Form_Section('WebConfigurator');
297
$group = new Form_Group('Protocol');
298

    
299
$group->add(new Form_Checkbox(
300
	'protocol',
301
	'Protocol',
302
	'HTTP',
303
	($pconfig['webguiproto']=='http'),
304
	'http'
305
))->displayAsRadio()->setAttribute('data-toggle', 'disable')->setAttribute('data-target', '#ssl-certificate');
306

    
307
$group->add($input = new Form_Checkbox(
308
	'protocol',
309
	'Protocol',
310
	'HTTPS',
311
	($pconfig['webguiproto']=='https'),
312
	'https'
313
))->displayAsRadio()->setAttribute('data-toggle', 'disable')->setAttribute('data-target', '#ssl-certificate');
314

    
315
$section->add($group);
316

    
317
if (!$certs_available)
318
{
319
	$input->setAttribute('disabled', 'disabled');
320
	$input->setHelp('No Certificates have been defined. You must '.
321
	'<a href="system_certmanager.php">'. gettext("Create or Import").'</a> '.
322
	'a Certificate before SSL can be enabled.');
323
} else {
324
	$values = array();
325
	foreach($a_cert as $cert)
326
		$values[ $cert['refid'] ] = $cert['descr'];
327

    
328
	$section->addInput($input = new Form_Select(
329
		'ssl-certificate',
330
		'SSL Certificate',
331
		$pconfig['ssl-certref'],
332
		$values
333
	));
334

    
335
	if ($pconfig['webguiproto'] == 'http')
336
		$input->setAttribute('disabled');
337
}
338

    
339
$section->addInput(new Form_Input(
340
	'tcp-port',
341
	'TCP port',
342
	'number',
343
	$config['system']['webgui']['port'],
344
	['min' => 1, 'max' => 65535]
345
))->setHelp('Enter a custom port number for the webConfigurator '.
346
	'above if you want to override the default (80 for HTTP, 443 '.
347
	'for HTTPS). Changes will take effect immediately after save.');
348

    
349
$section->addInput(new Form_Input(
350
	'max-processes',
351
	'Max Processes',
352
	'number',
353
	$pconfig['max_procs']
354
))->setHelp('Enter the number of webConfigurator processes you '.
355
	'want to run. This defaults to 2. Increasing this will allow more '.
356
	'users/browsers to access the GUI concurrently.');
357

    
358
$section->addInput(new Form_Checkbox(
359
	'webgui-redirect',
360
	'WebGUI redirect',
361
	'Disable webConfigurator redirect rule',
362
	$pconfig['disablehttpredirect']
363
))->setHelp('When this is unchecked, access to the webConfigurator '.
364
	'is always permitted even on port 80, regardless of the listening port configured. '.
365
	'Check this box to disable this automatically added redirect rule.');
366

    
367
$section->addInput(new Form_Checkbox(
368
	'webgui-login-autocomplete',
369
	'WebGUI Login Autocomplete',
370
	'Enable webConfigurator login autocomplete',
371
	$pconfig['loginautocomplete']
372
))->setHelp('When this is checked, login credentials for the webConfigurator may '.
373
	'be saved by the browser. While convenient, some security standards require this '.
374
	'to be disabled. Check this box to enable autocomplete on the login form so that '.
375
	'browsers will prompt to save credentials (NOTE: Some browsers do not respect '.
376
	'this option).');
377

    
378
$section->addInput(new Form_Checkbox(
379
	'webgui-login-messages',
380
	'WebGUI login messages',
381
	'Disable logging of webConfigurator successful logins',
382
	$pconfig['quietlogin']
383
))->setHelp('When this is checked, successful logins to the webConfigurator will '.
384
	'not be logged.');
385

    
386
if ($config['interfaces']['lan'])
387
	$lockout_interface = "LAN";
388
else
389
	$lockout_interface = "WAN";
390

    
391
$section->addInput(new Form_Checkbox(
392
	'anti-lockout',
393
	'Anti-lockout',
394
	'Disable webConfigurator anti-lockout rule',
395
	$pconfig['noantilockout']
396
))->setHelp('When this is '.
397
	'unchecked, access to the webConfigurator on the %s interface is always '.
398
	'permitted, regardless of the user-defined firewall rule set. Check this box to '.
399
	'disable this automatically added rule, so access to the webConfigurator is '.
400
	'controlled by the user-defined firewall rules (ensure you have a firewall rule '.
401
	'in place that allows you in, or you will lock yourself out!)<em>Hint: the &quot;Set interface(s) IP address&quot; '.
402
	'option in the console menu resets this setting as well.</em>', [$lockout_interface]);
403

    
404
$section->addInput(new Form_Checkbox(
405
	'dns-rebind-check',
406
	'DNS Rebind Check',
407
	'Disable DNS Rebinding Checks',
408
	$pconfig['nodnsrebindcheck']
409
))->setHelp('When this is unchecked, your system is protected against<a '.
410
	'href=\"http://en.wikipedia.org/wiki/DNS_rebinding\">DNS Rebinding attacks</a>. '.
411
	'This blocks private IP responses from your configured DNS servers. Check this '.
412
	'box to disable this protection if it interferes with webConfigurator access or '.
413
	'name resolution in your environment.');
414

    
415
$section->addInput(new Form_Input(
416
	'alternate-hostnames',
417
	'Alternate Hostnames',
418
	'text',
419
	htmlspecialchars($pconfig['althostnames'])
420
))->setHelp('Alternate Hostnames for DNS Rebinding and HTTP_REFERER Checks. Here '.
421
	'you can specify alternate hostnames by which the router may be queried, to '.
422
	'bypass the DNS Rebinding Attack checks. Separate hostnames with spaces.');
423

    
424
$section->addInput(new Form_Checkbox(
425
	'browser-http_referer-enforcement',
426
	'Browser HTTP_REFERER enforcement',
427
	'Disable HTTP_REFERER enforcement check',
428
	$pconfig['nohttpreferercheck']
429
))->setHelp('When this is unchecked, access to the webConfigurator is protected '.
430
	'against HTTP_REFERER redirection attempts. Check this box to disable this '.
431
	'protection if you find that it interferes with webConfigurator access in certain '.
432
	'corner cases such as using external scripts to interact with this system. More '.
433
	'information on HTTP_REFERER is available from<a target="_blank" '.
434
	'href="http://en.wikipedia.org/wiki/HTTP_referrer">Wikipedia</a>.');
435

    
436
$section->addInput($input = new Form_Checkbox(
437
	'beast-attack-protection',
438
	'BEAST Attack Protection',
439
	'Mitigate the BEAST SSL Attack',
440
	$pconfig['beast_protection']
441
))->setHelp('When this is checked, the webConfigurator can mitigate BEAST SSL '.
442
	'attacks. This option is off by default because Hifn accelerators do NOT work '.
443
	'with this option, and the GUI will not function. It is possible that other '.
444
	'accelerators have a similar problem that is not yet known/documented. More '.
445
	'information on BEAST is available from <a target="_blank" '.
446
	'href="https://en.wikipedia.org/wiki/Transport_Layer_Security#BEAST_attack">Wikipedia</a>.');
447

    
448
if ($disable_beast_option)
449
{
450
	$input->setAttribute('disabled', 'disabled');
451
	$input->setHelp('This option has been automatically disabled because a conflicting '.
452
	'cryptographic accelerator card has been detected (%s).', [$hwcrypto]);
453
}
454

    
455
$section->addInput(new Form_Checkbox(
456
	'browser-tab-text',
457
	'Browser tab text',
458
	'Display page name first in browser tab',
459
	$pconfig['pagenamefirst']
460
))->setHelp('When this is unchecked, the browser tab shows the host name followed '.
461
	'by the current page. Check this box to display the current page followed by the '.
462
	'host name.');
463

    
464
$form->add($section);
465
$section = new Form_Section('Secure Shell');
466

    
467
$section->addInput(new Form_Checkbox(
468
	'secure-shell-server',
469
	'Secure Shell Server',
470
	'Enable Secure Shell',
471
	isset($pconfig['enablesshd'])
472
));
473

    
474
$section->addInput(new Form_Checkbox(
475
	'authentication-method',
476
	'Authentication Method',
477
	'Disable password login for Secure Shell (RSA/DSA key only)',
478
	$pconfig['sshdkeyonly']
479
))->setHelp('When enabled, authorized keys need to be configured for each<a '.
480
	'href="system_usermanager.php">user</a>that has been granted secure shell '.
481
	'access.');
482

    
483
$section->addInput(new Form_Input(
484
	'ssh-port',
485
	'SSH port',
486
	'number',
487
	$pconfig['sshport'],
488
	['min' => 1, 'max' => 65535, 'placeholder' => 22]
489
))->setHelp('Note: Leave this blank for the default of 22.');
490

    
491

    
492
if (!$g['enableserial_force'] && ($g['platform'] == "pfSense" || $g['platform'] == "cdrom" || file_exists("/etc/nano_use_vga.txt")))
493
{
494
	$form->add($section);
495
	$section = new Form_Section('Serial Communications');
496

    
497
	$section->addInput(new Form_Checkbox(
498
		'serial-terminal',
499
		'Serial Terminal',
500
		'Enables the first serial port with 115200/8/N/1 by default, or another speed selectable below.',
501
		isset($pconfig['enableserial'])
502
	))->setHelp('Note:  This will redirect the console output and messages to '.
503
		'the serial port. You can still access the console menu from the internal video '.
504
		'card/keyboard. A<b>null modem</b>serial cable or adapter is required to use the '.
505
		'serial console.');
506

    
507
	$section->addInput(new Form_Select(
508
		'serial-speed',
509
		'Serial Speed',
510
		$pconfig['serialspeed'],
511
		array(115200, 57600, 38400, 19200, 14400, 9600)
512
	))->setHelp('Allows selection of different speeds for the serial console port.');
513

    
514
	$section->addInput(new Form_Select(
515
		'primary-console',
516
		'Primary Console',
517
		$pconfig['primaryconsole'],
518
		array(
519
			'serial' => 'Serial Console',
520
			'video' => 'VGA Console',
521
		)
522
	))->setHelp('Select the preferred console if multiple consoles are present. '.
523
		'The preferred console will show pfSense boot script output. All consoles '.
524
		'display OS boot messages, console messages, and the console menu.');
525
}
526

    
527
$form->add($section);
528
$section = new Form_Section('Console Options');
529

    
530
$section->addInput(new Form_Checkbox(
531
	'console-menu',
532
	'Console menu',
533
	'Password protect the console menu',
534
	$pconfig['disableconsolemenu']
535
));
536

    
537
$form->add($section);
538
print $form;
539

    
540
include("foot.inc");
541

    
542
if ($restart_webgui)
543
	echo "<meta http-equiv=\"refresh\" content=\"20;url={$url}\" />";
544

    
545
if ($restart_sshd)
546
{
547
	killbyname("sshd");
548
	log_error(gettext("secure shell configuration has changed. Stopping sshd."));
549

    
550
	if ($config['system']['enablesshd']) {
551
		log_error(gettext("secure shell configuration has changed. Restarting sshd."));
552
		send_event("service restart sshd");
553
	}
554
}
555

    
556
if ($restart_webgui)
557
{
558
	ob_flush();
559
	flush();
560
	log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator."));
561
	send_event("service restart webgui");
562
}
(202-202/252)