[Nagiosplug-devel] check_disk_smb and administrative shares.

Nicky.Ayoub at Microchip.com Nicky.Ayoub at Microchip.com
Wed Aug 14 08:08:02 CEST 2002


Hello,

I made a simple modification fro check_disk_smb to allow testing
administrative shares. Basically,
I added an optional '$' at the end of the pattern match for opt_s. Since I
am new to nagios and it's
plugins, I was wondering if anyone can explain any detrimental
ramifications due to this change
(other than possibly exposing an administrative logon).

Thanks,
Nicky

*** check_disk_smb2.pl  Wed Aug 14 07:36:49 2002
--- check_disk_smb.pl   Sun May 26 18:55:41 2002
***************
*** 66,72 ****
  ($host) || usage("Invalid host: $opt_H\n");

  ($opt_s) || ($opt_s = shift) || usage("Share volume not specified\n");
! my $share = $1 if ($opt_s =~ /([-_.A-Za-z0-9]+\$?)/);
  ($share) || usage("Invalid share: $opt_s\n");

  ($opt_u) || ($opt_u = shift) || ($opt_u = "guest");
--- 66,72 ----
  ($host) || usage("Invalid host: $opt_H\n");

  ($opt_s) || ($opt_s = shift) || usage("Share volume not specified\n");
! my $share = $1 if ($opt_s =~ /([-_.A-Za-z0-9]+)/);
  ($share) || usage("Invalid share: $opt_s\n");

  ($opt_u) || ($opt_u = shift) || ($opt_u = "guest");


--
Nick Ayoub
Nicky.Ayoub at Microchip.Com, Nicky.Ayoub.Pager at Microchip.Com
Marcom - IDE Systems, TEL  480-792-7275, FAX  480-792-4150
Microchip  Technology, 2355 W. Chandler Blvd., Chandler AZ 85224-6199
http://www.microchip.com







More information about the Devel mailing list