~ubuntu-branches/ubuntu/precise/nagios-plugins/precise-proposed

« back to all changes in this revision

Viewing changes to debian/patches/11_check_disk_smb_NT_STATUS_ACCESS_DENIED.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-12-24 06:13:15 UTC
  • mfrom: (12.2.7 sid)
  • Revision ID: james.westby@ubuntu.com-20101224061315-5s3q73q1n1lthefm
Tags: 1.4.15-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - debian/control: keep on building with libradius1-dev to avoid pushing radiusclient-ng
    to main.
  - Don't depend on nagios-plugins-extra, we dont need qstat and fping in main.
  - debian/{control,rules}: add an enable hardened build for PIE.
    (Debian bug 542728).
  - Build with libmysqlclient-dev only.
  - debian/pluginconfig/nt.cfg: Fix syntax error. (LP: #595528)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 11_check_disk_smb_NT_STATUS_ACCESS_DENIED.dpatch by
 
3
## Matthias Eble <psychotrahe@users.sourceforge.net>
 
4
##
 
5
## From 3c67c9cb60a4681a29e509fccbb333e0f6234f54 Mon Sep 17 00:00:00 2001
 
6
## From: Matthias Eble <psychotrahe@users.sourceforge.net>
 
7
## Date: Sun, 28 Nov 2010 21:43:48 +0100
 
8
## Subject: [PATCH] check_disk_smb now handles NT_STATUS_ACCESS_DENIED properly
 
9
## (Debian #601696)
 
10
##
 
11
## DP: Handles NT_STATUS_ACCESS_DENIED properly (http://bugs.debian.org/601696)
 
12
 
 
13
@DPATCH@
 
14
 
 
15
diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl
 
16
index 4698700..6783543 100755
 
17
--- a/plugins-scripts/check_disk_smb.pl
 
18
+++ b/plugins-scripts/check_disk_smb.pl
 
19
@@ -239,7 +239,7 @@ if (/\s*(\d*) blocks of size (\d*)\. (\d*) blocks available/) {
 
20
        $answer = "Result from smbclient not suitable\n";
 
21
        $state = "UNKNOWN";
 
22
        foreach (@lines) {
 
23
-               if (/(Access denied|NT_STATUS_LOGON_FAILURE)/) {
 
24
+               if (/(Access denied|NT_STATUS_LOGON_FAILURE|NT_STATUS_ACCESS_DENIED)/) {
 
25
                        $answer = "Access Denied\n";
 
26
                        $state = "CRITICAL";
 
27
                        last;
 
28