[Pkg-nagios-devel] Bug#425129: check_disk_smb doesn't really do guest mode
Josip Rodin
joy at debbugs.entuzijast.net
Sat May 19 11:13:54 UTC 2007
Package: nagios-plugins-standard
Version: 1.4.5-1
Tags: patch
Hi,
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.
Because the $pass variable is passed on directly into the command line,
the patch is simple:
--- check_disk_smb~ 2007-05-19 13:11:59.000000000 +0200
+++ check_disk_smb 2007-05-19 13:12:08.000000000 +0200
@@ -79,6 +79,7 @@
($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])$/);
Please fix this. TIA.
--
2. That which causes joy or happiness.
More information about the Pkg-nagios-devel
mailing list