mirror of
https://github.com/librenms/librenms.git
synced 2024-09-25 04:19:07 +00:00
ldap tls support
git-svn-id: http://www.observium.org/svn/observer/trunk@2880 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
parent
3ea756ae1b
commit
ee1517e38b
@ -2,6 +2,14 @@
|
||||
|
||||
$ds = @ldap_connect($config['auth_ldap_server'],$config['auth_ldap_port']);
|
||||
|
||||
if ($config['auth_ldap_starttls'] && ($config['auth_ldap_starttls'] == 'optional' || $config['auth_ldap_starttls'] == 'require')) {
|
||||
$tls = ldap_start_tls($ds);
|
||||
if ($config['auth_ldap_starttls'] == 'require' && $tls == FALSE) {
|
||||
echo("<h2>Fatal error: LDAP TLS required but not successfully negotiated:" . ldap_error($ds) . "</h2>");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
function authenticate($username,$password)
|
||||
{
|
||||
global $config, $ds;
|
||||
|
@ -94,9 +94,9 @@ foreach (dbFetchRows("SELECT * FROM `bgpPeers` WHERE `device_id` = ? ORDER BY `b
|
||||
unset($peerhost);
|
||||
}
|
||||
|
||||
if ($peerhost)
|
||||
if (is_array($peerhost))
|
||||
{
|
||||
$peername = generate_device_link($peerhost);
|
||||
#$peername = generate_device_link($peerhost);
|
||||
$peername = generate_device_link($peerhost) ." ". generate_port_link($peerhost);
|
||||
$peer_url = "device/device=" . $peer['device_id'] . "/tab=routing/proto=bgp/view=updates/";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user