summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7433e4b)
raw | patch | inline | side by side (parent: 7433e4b)
author | Ton Voon <tonvoon@users.sourceforge.net> | |
Thu, 18 Mar 2004 20:31:52 +0000 (20:31 +0000) | ||
committer | Ton Voon <tonvoon@users.sourceforge.net> | |
Thu, 18 Mar 2004 20:31:52 +0000 (20:31 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@851 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_radius.c | patch | blob | history |
diff --git a/plugins/check_radius.c b/plugins/check_radius.c
index d56222f98cc0ea10d1fa071a8e6c683b19aae01d..ece17943205fd1d7a05c9430ed63643c426e7b2d 100644 (file)
--- a/plugins/check_radius.c
+++ b/plugins/check_radius.c
char *server = NULL;
char *username = NULL;
char *password = NULL;
+char *nasid = NULL;
char *expect = NULL;
char *config_file = NULL;
unsigned short port = PW_AUTH_UDP_PORT;
if (!(rc_avpair_add (&data.send_pairs, PW_SERVICE_TYPE, &service, 0) &&
rc_avpair_add (&data.send_pairs, PW_USER_NAME, username, 0) &&
- rc_avpair_add (&data.send_pairs, PW_USER_PASSWORD, password, 0)))
+ rc_avpair_add (&data.send_pairs, PW_USER_PASSWORD, password, 0) &&
+ (nasid==NULL || rc_avpair_add (&data.send_pairs, PW_NAS_IDENTIFIER, nasid, 0))))
die (STATE_UNKNOWN, _("Out of Memory?"));
/*
{"port", required_argument, 0, 'P'},
{"username", required_argument, 0, 'u'},
{"password", required_argument, 0, 'p'},
+ {"nas-id", required_argument, 0, 'n'},
{"filename", required_argument, 0, 'F'},
{"expect", required_argument, 0, 'e'},
{"retries", required_argument, 0, 'r'},
}
while (1) {
- c = getopt_long (argc, argv, "+hVvH:P:F:u:p:t:r:e:", longopts,
+ c = getopt_long (argc, argv, "+hVvH:P:F:u:p:n:t:r:e:", longopts,
&option);
if (c == -1 || c == EOF || c == 1)
case 'p': /* password */
password = optarg;
break;
+ case 'n': /* nas id */
+ nasid = optarg;
+ break;
case 'F': /* configuration file */
config_file = optarg;
break;
The user to authenticate\n\
-p, --password=STRING\n\
Password for autentication (SECURITY RISK)\n\
+ -n, --nas-id=STRING\n\
+ NAS identifier\n\
-F, --filename=STRING\n\
Configuration file\n\
-e, --expect=STRING\n\
print_usage (void)
{
printf ("\
-Usage: %s -H host -F config_file -u username -p password [-P port]\n\
+Usage: %s -H host -F config_file -u username -p password [-n nas-id] [-P port]\n\
[-t timeout] [-r retries] [-e expect]\n", progname);
printf (_(UT_HLP_VRS), progname, progname);
}