From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/199141-is_hostname.diff | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 web/attachments/199141-is_hostname.diff (limited to 'web/attachments/199141-is_hostname.diff') diff --git a/web/attachments/199141-is_hostname.diff b/web/attachments/199141-is_hostname.diff new file mode 100644 index 0000000..8d6e498 --- /dev/null +++ b/web/attachments/199141-is_hostname.diff @@ -0,0 +1,16 @@ +Index: plugins-scripts/utils.pm.in +=================================================================== +RCS file: /cvsroot/nagiosplug/nagiosplug/plugins-scripts/utils.pm.in,v +retrieving revision 1.9 +diff -u -r1.9 utils.pm.in +--- plugins-scripts/utils.pm.in 19 Oct 2006 18:44:53 -0000 1.9 ++++ plugins-scripts/utils.pm.in 20 Oct 2006 15:57:37 -0000 +@@ -76,7 +76,7 @@ + + sub is_hostname { + my $host1 = shift; +- if ($host1 && $host1 =~ m/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)$/) { ++ if ($host1 && $host1 =~ m/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z0-9][-a-zA-Z0-9]+(\.[a-zA-Z0-9][-a-zA-Z0-9]+)*)$/) { + return 1; + }else{ + return 0; -- cgit v1.2.3-74-g34f1