aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_radius.c
diff options
context:
space:
mode:
authorGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2014-06-22 21:43:38 +0200
committerGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2014-06-22 21:43:38 +0200
commit7979837c0d337e11354935fbf5a82c329c18841f (patch)
treed2371b4082ee755c9c8389e0aab2b6cd239e917a /plugins/check_radius.c
parent0170bc48d17dbda24f681a24844fc0bbedad8477 (diff)
downloadmonitoring-plugins-7979837c0d337e11354935fbf5a82c329c18841f.tar.gz
check_radius.c: Add newline to die() calls
Our die() function doesn't append a newline character to the message.
Diffstat (limited to 'plugins/check_radius.c')
-rw-r--r--plugins/check_radius.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/plugins/check_radius.c b/plugins/check_radius.c
index 9394d26d..b2943475 100644
--- a/plugins/check_radius.c
+++ b/plugins/check_radius.c
@@ -169,7 +169,7 @@ main (int argc, char **argv)
str = strdup ("dictionary");
if ((config_file && my_rc_read_config (config_file)) ||
my_rc_read_dictionary (my_rc_conf_str (str)))
- die (STATE_UNKNOWN, _("Config file error"));
+ die (STATE_UNKNOWN, _("Config file error\n"));
service = PW_AUTHENTICATE_ONLY;
@@ -178,24 +178,24 @@ main (int argc, char **argv)
my_rc_avpair_add (&data.send_pairs, PW_USER_NAME, username, 0) &&
my_rc_avpair_add (&data.send_pairs, PW_USER_PASSWORD, password, 0)
))
- die (STATE_UNKNOWN, _("Out of Memory?"));
+ die (STATE_UNKNOWN, _("Out of Memory?\n"));
if (nasid != NULL) {
if (!(my_rc_avpair_add (&data.send_pairs, PW_NAS_IDENTIFIER, nasid, 0)))
- die (STATE_UNKNOWN, _("Invalid NAS-Identifier"));
+ die (STATE_UNKNOWN, _("Invalid NAS-Identifier\n"));
}
if (nasipaddress != NULL) {
if (rc_good_ipaddr (nasipaddress))
- die (STATE_UNKNOWN, _("Invalid NAS-IP-Address"));
+ die (STATE_UNKNOWN, _("Invalid NAS-IP-Address\n"));
if ((client_id = rc_get_ipaddr(nasipaddress)) == 0)
- die (STATE_UNKNOWN, _("Invalid NAS-IP-Address"));
+ die (STATE_UNKNOWN, _("Invalid NAS-IP-Address\n"));
} else {
if ((client_id = my_rc_own_ipaddress ()) == 0)
- die (STATE_UNKNOWN, _("Can't find local IP for NAS-IP-Address"));
+ die (STATE_UNKNOWN, _("Can't find local IP for NAS-IP-Address\n"));
}
if (my_rc_avpair_add (&(data.send_pairs), PW_NAS_IP_ADDRESS, &client_id, 0) == NULL)
- die (STATE_UNKNOWN, _("Invalid NAS-IP-Address"));
+ die (STATE_UNKNOWN, _("Invalid NAS-IP-Address\n"));
my_rc_buildreq (&data, PW_ACCESS_REQUEST, server, port, (int)timeout_interval,
retries);
@@ -206,19 +206,19 @@ main (int argc, char **argv)
rc_avpair_free (data.receive_pairs);
if (result == TIMEOUT_RC)
- die (STATE_CRITICAL, _("Timeout"));
+ die (STATE_CRITICAL, _("Timeout\n"));
if (result == ERROR_RC)
- die (STATE_CRITICAL, _("Auth Error"));
+ die (STATE_CRITICAL, _("Auth Error\n"));
if (result == REJECT_RC)
- die (STATE_WARNING, _("Auth Failed"));
+ die (STATE_WARNING, _("Auth Failed\n"));
if (result == BADRESP_RC)
- die (STATE_WARNING, _("Bad Response"));
+ die (STATE_WARNING, _("Bad Response\n"));
if (expect && !strstr (msg, expect))
- die (STATE_WARNING, "%s", msg);
+ die (STATE_WARNING, "%s\n", msg);
if (result == OK_RC)
- die (STATE_OK, _("Auth OK"));
+ die (STATE_OK, _("Auth OK\n"));
(void)snprintf(msg, sizeof(msg), _("Unexpected result code %d"), result);
- die (STATE_UNKNOWN, "%s", msg);
+ die (STATE_UNKNOWN, "%s\n", msg);
}