summaryrefslogtreecommitdiffstats
path: root/plugins/check_radius.c
diff options
context:
space:
mode:
authorBenoit Mortier <opensides@users.sourceforge.net>2006-06-20 11:17:03 +0000
committerBenoit Mortier <opensides@users.sourceforge.net>2006-06-20 11:17:03 +0000
commitf2d66913f9451674bb7b6dec514cf2fdff9698bc (patch)
tree1f2d685ee02370308f319fabf88ee976b5abac8d /plugins/check_radius.c
parentf9394308c9c372bcf419a311c61ba420247ae613 (diff)
downloadmonitoring-plugins-f2d66913f9451674bb7b6dec514cf2fdff9698bc.tar.gz
cleaning help and usage + license
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1435 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_radius.c')
-rw-r--r--plugins/check_radius.c108
1 files changed, 59 insertions, 49 deletions
diff --git a/plugins/check_radius.c b/plugins/check_radius.c
index 07ee4c7f..8ee6dd4f 100644
--- a/plugins/check_radius.c
+++ b/plugins/check_radius.c
@@ -1,26 +1,39 @@
1/****************************************************************************** 1/******************************************************************************
2 2*
3 This program is free software; you can redistribute it and/or modify 3* Nagios check_radius plugin
4 it under the terms of the GNU General Public License as published by 4*
5 the Free Software Foundation; either version 2 of the License, or 5* License: GPL
6 (at your option) any later version. 6* Copyright (c) 1999-2006 nagios-plugins team
7 7*
8 This program is distributed in the hope that it will be useful, 8* Last Modified: $Date$
9 but WITHOUT ANY WARRANTY; without even the implied warranty of 9*
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10* Description:
11 GNU General Public License for more details. 11*
12 12* This file contains the check_radius plugin
13 You should have received a copy of the GNU General Public License 13*
14 along with this program; if not, write to the Free Software 14* License Information:
15 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 15*
16 16* This program is free software; you can redistribute it and/or modify
17 $Id$ 17* it under the terms of the GNU General Public License as published by
18 18* the Free Software Foundation; either version 2 of the License, or
19 ******************************************************************************/ 19* (at your option) any later version.
20*
21* This program is distributed in the hope that it will be useful,
22* but WITHOUT ANY WARRANTY; without even the implied warranty of
23* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24* GNU General Public License for more details.
25*
26* You should have received a copy of the GNU General Public License
27* along with this program; if not, write to the Free Software
28* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29*
30* $Id$
31*
32*******************************************************************************/
20 33
21const char *progname = "check_radius"; 34const char *progname = "check_radius";
22const char *revision = "$Revision$"; 35const char *revision = "$Revision$";
23const char *copyright = "2000-2003"; 36const char *copyright = "2000-2006";
24const char *email = "nagiosplug-devel@lists.sourceforge.net"; 37const char *email = "nagiosplug-devel@lists.sourceforge.net";
25 38
26#include "common.h" 39#include "common.h"
@@ -285,7 +298,9 @@ print_help (void)
285 printf ("Copyright (c) 1999 Robert August Vincent II\n"); 298 printf ("Copyright (c) 1999 Robert August Vincent II\n");
286 printf (COPYRIGHT, copyright, email); 299 printf (COPYRIGHT, copyright, email);
287 300
288 printf(_("Tests to see if a radius server is accepting connections.\n\n")); 301 printf("%s\n", _("Tests to see if a radius server is accepting connections."));
302
303 printf ("\n\n");
289 304
290 print_usage (); 305 print_usage ();
291 306
@@ -293,36 +308,31 @@ print_help (void)
293 308
294 printf (_(UT_HOST_PORT), 'P', myport); 309 printf (_(UT_HOST_PORT), 'P', myport);
295 310
296 printf (_("\ 311 printf (" %s\n", "-u, --username=STRING");
297 -u, --username=STRING\n\ 312 printf (" %s\n", _("The user to authenticate"));
298 The user to authenticate\n\ 313 printf (" %s\n", "-p, --password=STRING");
299 -p, --password=STRING\n\ 314 printf (" %s\n", _("Password for autentication (SECURITY RISK)"));
300 Password for autentication (SECURITY RISK)\n\ 315 printf (" %s\n", "-n, --nas-id=STRING");
301 -n, --nas-id=STRING\n\ 316 printf (" %s\n", _("NAS identifier"));
302 NAS identifier\n\ 317 printf (" %s\n", "-F, --filename=STRING");
303 -F, --filename=STRING\n\ 318 printf (" %s\n", _("Configuration file"));
304 Configuration file\n\ 319 printf (" %s\n", "-e, --expect=STRING");
305 -e, --expect=STRING\n\ 320 printf (" %s\n", _("Response string to expect from the server"));
306 Response string to expect from the server\n\ 321 printf (" %s\n", "-r, --retries=INTEGER");
307 -r, --retries=INTEGER\n\ 322 printf (" %s\n", _("Number of times to retry a failed connection"));
308 Number of times to retry a failed connection\n"));
309 323
310 printf (_(UT_TIMEOUT), timeout_interval); 324 printf (_(UT_TIMEOUT), timeout_interval);
311 325
312 printf (_("\n\ 326 printf ("%s\n", _("This plugin tests a radius server to see if it is accepting connections."));
313This plugin tests a radius server to see if it is accepting connections.\n\ 327 printf ("%s\n", _("The server to test must be specified in the invocation, as well as a user"));
314\n\ 328 printf ("%s\n", _("name and password. A configuration file may also be present. The format of"));
315The server to test must be specified in the invocation, as well as a user\n\ 329 printf ("%s\n", _("the configuration file is described in the radiusclient library sources."));
316name and password. A configuration file may also be present. The format of\n\ 330 printf ("%s\n", _("The password option presents a substantial security issue because the"));
317the configuration file is described in the radiusclient library sources.\n\n")); 331 printf ("%s\n", _("password can be determined by careful watching of the command line in"));
318 332 printf ("%s\n", _("a process listing. This risk is exacerbated because nagios will"));
319 printf (_("\ 333 printf ("%s\n", _("run the plugin at regular prdictable intervals. Please be sure that"));
320The password option presents a substantial security issue because the\n\ 334 printf ("%s\n", _("the password used does not allow access to sensitive system resources,"));
321password can be determined by careful watching of the command line in\n\ 335 printf ("%s\n", _("otherwise compormise could occur."));
322a process listing. This risk is exacerbated because nagios will\n\
323run the plugin at regular prdictable intervals. Please be sure that\n\
324the password used does not allow access to sensitive system resources,\n\
325otherwise compormise could occur.\n"));
326 336
327 printf (_(UT_SUPPORT)); 337 printf (_(UT_SUPPORT));
328} 338}
@@ -332,7 +342,7 @@ otherwise compormise could occur.\n"));
332void 342void
333print_usage (void) 343print_usage (void)
334{ 344{
335 printf ("\ 345 printf (_("Usage:"));
336Usage: %s -H host -F config_file -u username -p password [-n nas-id] [-P port]\n\ 346 printf ("%s -H host -F config_file -u username -p password [-n nas-id] [-P port]\n\
337 [-t timeout] [-r retries] [-e expect]\n", progname); 347 [-t timeout] [-r retries] [-e expect]\n", progname);
338} 348}