1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-02-26 21:54:16 +01:00

Add shortname failure checks for munin plugins.

This commit is contained in:
Jean Paul Galea 2015-09-08 14:47:34 +02:00
parent 21b795b852
commit b8e98e6049
3 changed files with 19 additions and 2 deletions

View File

@ -42,6 +42,14 @@ require_once 'ykval-common.php';
$urls = otp2ksmurls('ccccccccfnkjtvvijktfrvvginedlbvudjhjnggndtck', 16);
$shortnames = array_map('shortname', $urls);
foreach($shortnames as $shortname)
{
if ($shortname === FALSE)
{
echo "Cannot parse URL from ksm url list\n";
exit(1);
}
}
if ($argc == 2 && strcmp($argv[1], 'autoconf') == 0)
{

View File

@ -38,7 +38,16 @@ require_once 'ykval-config.php';
require_once 'ykval-db.php';
$urls = $baseParams['__YKVAL_SYNC_POOL__'];
$shortnames = array_map("shortname", $urls);
foreach($shortnames as $shortname)
{
if ($shortname === FALSE)
{
echo "Cannot parse URL from sync pool list\n";
exit(1);
}
}
if ($argc == 2 && strcmp($argv[1], "autoconf") == 0)
{

View File

@ -40,9 +40,9 @@ require_once 'ykval-common.php';
$urls = $baseParams['__YKVAL_SYNC_POOL__'];
$shortnames = array_map('shortname', $urls);
foreach($shortnames as $val)
foreach($shortnames as $shortname)
{
if ($val === FALSE)
if ($shortname === FALSE)
{
echo "Cannot parse URL from sync pool list\n";
exit(1);