Ver código fonte

Make check_disk_smb accept spaces in share names (#990948, #1370031, Debian #601699)

Matthias Eble 15 anos atrás
pai
commit
0892c4ac28
2 arquivos alterados com 2 adições e 1 exclusões
  1. 1 0
      NEWS
  2. 1 1
      plugins-scripts/check_disk_smb.pl

+ 1 - 0
NEWS

@@ -3,6 +3,7 @@ This file documents the major additions and syntax changes between releases.
 ...
 	ENHANCEMENTS
 	check_nt UPTIME accepts warning/critical thresholds (Ryan Kelly)
+	check_disk_smb now allows spaces in share names (#990948, #1370031, Debian #601699)
 
 	FIXES
 	check_snmp now attempts to convert string responses into a double value. If the full string is a value, 

+ 1 - 1
plugins-scripts/check_disk_smb.pl

@@ -67,7 +67,7 @@ my $host = $1 if ($opt_H =~ /^([-_.A-Za-z0-9 ]+\$?)$/);
 ($host) || usage("Invalid host: $opt_H\n");
 
 ($opt_s) || ($opt_s = shift @ARGV) || usage("Share volume not specified\n");
-my $share = $1 if ($opt_s =~ /^([-_.A-Za-z0-9]+\$?)$/);
+my $share = $1 if ($opt_s =~ /^([-_.A-Za-z0-9 ]+\$?)$/);
 ($share) || usage("Invalid share: $opt_s\n");
 
 defined($opt_u) || ($opt_u = shift @ARGV) || ($opt_u = "guest");