Code

Fix Debian bug #425129: SMB guest mode won't work
authorHolger Weiss <holger@zedat.fu-berlin.de>
Sun, 11 Apr 2010 07:39:24 +0000 (09:39 +0200)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Sun, 11 Apr 2010 07:39:24 +0000 (09:39 +0200)
| The check_disk_smb plugin purports to support guest users, but it
| doesn't work out, because it doesn't specify the -N command line
| option to smbclient when no password is specified, making smbclient
| stop and ask.

[ http://bugs.debian.org/425129 ]

(Fixed by Josip Rodin, forwarded by Jan Wagner.)

NEWS
THANKS.in
plugins-scripts/check_disk_smb.pl

diff --git a/NEWS b/NEWS
index 0d05019eea535bffdf273bbc5d6d54519988d159..5827db694941ab46b9cb2d7414751dc0b5850016 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ This file documents the major additions and syntax changes between releases.
        Fix compilation with GCC 2.96 (Konstantin Khomoutov - #2977105)
        Fix regression introduced in #1867716 where partially valid performance strings would not be printed anymore
        Fix regression in check_http ssl checks on some servers - make SNI an option
        Fix compilation with GCC 2.96 (Konstantin Khomoutov - #2977105)
        Fix regression introduced in #1867716 where partially valid performance strings would not be printed anymore
        Fix regression in check_http ssl checks on some servers - make SNI an option
+       Fix guest mode support in check_disk_smb
        WARNINGS
        Updated developer documentation to say that performance labels should not have an equals sign or
        single quote in the label
        WARNINGS
        Updated developer documentation to say that performance labels should not have an equals sign or
        single quote in the label
index 16036222db4383f9506a5c018f86af62e790e395..ee75f33a006fd88475ebfae091a5e4e65458c111 100644 (file)
--- a/THANKS.in
+++ b/THANKS.in
@@ -260,3 +260,4 @@ Marcel Kuiper
 Bryan Irvine
 Jimmy Bergman
 Konstantin Khomoutov
 Bryan Irvine
 Jimmy Bergman
 Konstantin Khomoutov
+Josip Rodin
index 985fa961ddd8b2a5b2fe93c2509b17242119c5ef..022fa505ceabe4913e102e6cd1b6696dbdd322a5 100755 (executable)
@@ -78,6 +78,7 @@ my $user = $1 if ($opt_u =~ /^([-_.A-Za-z0-9\\]+)$/);
 
 ($opt_p) || ($opt_p = shift) || ($opt_p = "");
 my $pass = $1 if ($opt_p =~ /(.*)/);
 
 ($opt_p) || ($opt_p = shift) || ($opt_p = "");
 my $pass = $1 if ($opt_p =~ /(.*)/);
+$pass = "-N" if ($opt_p eq "");
 
 ($opt_w) || ($opt_w = shift) || ($opt_w = 85);
 my $warn = $1 if ($opt_w =~ /^([0-9]{1,2}\%?|100\%?|[0-9]+[kMG])$/);
 
 ($opt_w) || ($opt_w = shift) || ($opt_w = 85);
 my $warn = $1 if ($opt_w =~ /^([0-9]{1,2}\%?|100\%?|[0-9]+[kMG])$/);