summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-12-07 00:43:23 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-12-07 00:43:23 +0000
commita42bf8cd3ccc4c60816fb35efd531270052393a0 (patch)
treee739c3484b7f3a0befe71b5e15d7ad690dda9b2f
parenta17d277cbeb3b55b9216b3ae401bf9ffeeaac014 (diff)
downloadpfsense-a42bf8cd3ccc4c60816fb35efd531270052393a0.zip
pfsense-a42bf8cd3ccc4c60816fb35efd531270052393a0.tar.gz
Require syscontact and syslocation fields
-rwxr-xr-xusr/local/www/services_snmp.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr/local/www/services_snmp.php b/usr/local/www/services_snmp.php
index e3b09eb..9f49e1f 100755
--- a/usr/local/www/services_snmp.php
+++ b/usr/local/www/services_snmp.php
@@ -76,6 +76,14 @@ if ($_POST) {
$reqdfields = explode(" ", "pollport");
$reqdfieldsn = explode(",", "Polling Port");
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
+
+ $reqdfields = explode(" ", "syscontact");
+ $reqdfieldsn = explode(",", "System contact");
+ do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
+
+ $reqdfields = explode(" ", "syslocation");
+ $reqdfieldsn = explode(",", "System location");
+ do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
}
if ($_POST['trapenable']) {
@@ -106,7 +114,7 @@ if ($_POST) {
if (!$input_errors) {
$config['snmpd']['enable'] = $_POST['enable'] ? true : false;
$config['snmpd']['pollport'] = $_POST['pollport'];
- $config['snmpd']['syslocation'] = $_POST['syslocation'];
+ $config['snmpd']['syslocation'] = $_POST['syslocation'];
$config['snmpd']['syscontact'] = $_POST['syscontact'];
$config['snmpd']['rocommunity'] = $_POST['rocommunity'];
/* disabled until some docs show up on what this does.
OpenPOWER on IntegriCloud