Module: check_mk
Branch: master
Commit: 16b0955947f72aabc17ae330c59a468e80e4e284
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=16b0955947f72a…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Dec 18 12:03:29 2017 +0100
5456 FIX mk_oracle, mk_oracle.aix: Fixed excluding all sections for any SID which contains
invalid characters in the related variable name
Change-Id: I2e362d4c70796913e6d443fe3a0c8d724642e1ff
---
.werks/5456 | 11 +++++++++++
agents/plugins/mk_oracle | 14 +++++++++-----
agents/plugins/mk_oracle.aix | 14 +++++++++-----
3 files changed, 29 insertions(+), 10 deletions(-)
diff --git a/.werks/5456 b/.werks/5456
new file mode 100644
index 0000000..57f46bd
--- /dev/null
+++ b/.werks/5456
@@ -0,0 +1,11 @@
+Title: mk_oracle, mk_oracle.aix: Fixed excluding all sections for any SID which contains
invalid characters in the related variable name
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i2
+Date: 1513594845
+
+
diff --git a/agents/plugins/mk_oracle b/agents/plugins/mk_oracle
index c06679b..26f658b 100755
--- a/agents/plugins/mk_oracle
+++ b/agents/plugins/mk_oracle
@@ -1297,12 +1297,16 @@ do
if [ "$SKIP" ] ; then continue ; fi
fi
- # Handle explicit exclusion of instances
EXCLUDE=EXCLUDE_$SID
- EXCLUDE=${!EXCLUDE}
- # SID filtered totally?
- if [ "$EXCLUDE" = "ALL" ]; then
- continue
+ if [[ "$EXCLUDE" =~ ^[a-zA-Z][a-zA-Z0-9_]*$ ]]
+ then
+ # Handle explicit exclusion of instances
+ # but not for +ASM
+ EXCLUDE=${!EXCLUDE}
+ # SID filtered totally?
+ if [ "$EXCLUDE" = "ALL" ]; then
+ continue
+ fi
fi
get_oraversion $SID
diff --git a/agents/plugins/mk_oracle.aix b/agents/plugins/mk_oracle.aix
index 74ebdc2..5c60e7a 100755
--- a/agents/plugins/mk_oracle.aix
+++ b/agents/plugins/mk_oracle.aix
@@ -1093,12 +1093,16 @@ do
if [ "$SKIP" ] ; then continue ; fi
fi
- # Handle explicit exclusion of instances
EXCLUDE=EXCLUDE_$SID
- EXCLUDE=${!EXCLUDE}
- # SID filtered totally?
- if [ "$EXCLUDE" = "ALL" ]; then
- continue
+ if [[ "$EXCLUDE" =~ ^[a-zA-Z][a-zA-Z0-9_]*$ ]]
+ then
+ # Handle explicit exclusion of instances
+ # but not for +ASM
+ EXCLUDE=${!EXCLUDE}
+ # SID filtered totally?
+ if [ "$EXCLUDE" = "ALL" ]; then
+ continue
+ fi
fi
if [ ${SID:0:1} = '+' ] ; then