mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 00:25:06 +02:00
fixes and cleanups
git-svn-id: http://www.observium.org/svn/observer/trunk@3018 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -27,7 +27,7 @@ function authenticate($username,$password)
|
||||
return 0;
|
||||
}
|
||||
|
||||
function passwordscanchange()
|
||||
function passwordscanchange($username = "")
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -42,7 +42,7 @@ function auth_usermanagement()
|
||||
return 1;
|
||||
}
|
||||
|
||||
function adduser($username, $password, $level, $email = "", $realname = "")
|
||||
function adduser($username, $password, $level, $email = "", $realname = "", $can_modify_passwd = '1')
|
||||
{
|
||||
return dbInsert(array('username' => $username, 'password' => $password, 'level' => $level, 'email' => $email, 'realname' => $realname), 'users');
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ function authenticate($username,$password)
|
||||
return 0;
|
||||
}
|
||||
|
||||
function passwordscanchange()
|
||||
function passwordscanchange($username = "")
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -62,7 +62,7 @@ function auth_usermanagement()
|
||||
return 0;
|
||||
}
|
||||
|
||||
function adduser($username, $password, $level, $email = "", $realname = "")
|
||||
function adduser($username, $password, $level, $email = "", $realname = "", $can_modify_passwd = '1')
|
||||
{
|
||||
# Not supported
|
||||
return 0;
|
||||
|
||||
@@ -24,7 +24,7 @@ function authenticate($username,$password)
|
||||
return 0;
|
||||
}
|
||||
|
||||
function passwordscanchange($username="")
|
||||
function passwordscanchange($username = "")
|
||||
{
|
||||
/*
|
||||
* By default allow the password to be modified, unless the existing
|
||||
|
||||
@@ -23,7 +23,7 @@ if ($device['os'] != "Snom")
|
||||
$snmpstring .= " IP-MIB::".$oid.".0";
|
||||
}
|
||||
|
||||
$data = snmp_get_multi($device, $snmpstring, NULL, "IP-MIB");
|
||||
$data = snmp_get_multi($device, $snmpstring, "-OQUs", "IP-MIB");
|
||||
|
||||
$rrdupdate = "N";
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ if ($device['os'] != "Snom")
|
||||
$snmpstring .= " tcpHCInSegs.0";
|
||||
$snmpstring .= " tcpHCOutSegs.0";
|
||||
|
||||
$data = snmp_get_multi($device, $snmpstring, NULL, "TCP-MIB");
|
||||
$data = snmp_get_multi($device, $snmpstring, "-OQUs", "TCP-MIB");
|
||||
|
||||
$rrdupdate = "N";
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ if ($device['os'] != "Snom")
|
||||
$snmpstring .= " UDP-MIB::".$oid.".0";
|
||||
}
|
||||
|
||||
$data = snmp_get_multi($device, $snmpstring, NULL, "UDP-MIB");
|
||||
$data = snmp_get_multi($device, $snmpstring, "-OQUs", "UDP-MIB");
|
||||
|
||||
$rrdupdate = "N";
|
||||
|
||||
|
||||
@@ -14,8 +14,6 @@ function snmp_get_multi($device, $oids, $options = "-OQUs", $mib = NULL, $mibdir
|
||||
{
|
||||
global $debug,$config,$runtime_stats,$mibs_loaded;
|
||||
|
||||
if (!$options) { $options = "-OQUs"; }
|
||||
|
||||
if (is_numeric($device['timeout']) && $device['timeout'] > 0)
|
||||
{
|
||||
$timeout = $device['timeout'];
|
||||
@@ -133,7 +131,6 @@ function snmp_walk($device, $oid, $options = NULL, $mib = NULL, $mibdir = NULL)
|
||||
$device['transport'] = "udp";
|
||||
}
|
||||
|
||||
// php has no bulkwalk functionality, so use binary for this.
|
||||
if ($device['snmpver'] == 'v1' || $config['os'][$device['os']]['nobulk'])
|
||||
{
|
||||
$snmpcommand = $config['snmpwalk'];
|
||||
|
||||
Reference in New Issue
Block a user