Package: augeas / 1.8.0-1+deb9u1

0003-Make-NRPE-lens-less-strict.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
From: Hilko Bengen <bengen@debian.org>
Date: Sat, 18 Mar 2017 21:06:52 +0100
Subject: Make NRPE lens less strict

---
 lenses/nrpe.aug            |  4 +++-
 lenses/tests/test_nrpe.aug | 13 +++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/lenses/nrpe.aug b/lenses/nrpe.aug
index c8b0fb4..dedacea 100644
--- a/lenses/nrpe.aug
+++ b/lenses/nrpe.aug
@@ -18,6 +18,8 @@ let eq = Sep.equal
 (* View: word *)
 let word = /[^=\n\t ]+/
 
+let words = word . ( / +/ . word )*
+
 (* View: item_re *)
 let item_re = /[^#=\n\t\/ ]+/ - (/command\[[^]\/\n]+\]/ | "include" | "include_dir")
 
@@ -41,7 +43,7 @@ let command =
 
      > allow_bash_command_substitution=0
 *)
-let item = [ key item_re . eq . store word . eol ]
+let item = [ key item_re . eq . store words . eol ]
 
 (* View: include
     An include entry.
diff --git a/lenses/tests/test_nrpe.aug b/lenses/tests/test_nrpe.aug
index 8bfe475..e86a241 100644
--- a/lenses/tests/test_nrpe.aug
+++ b/lenses/tests/test_nrpe.aug
@@ -34,6 +34,19 @@ module Test_nrpe =
     { }
 
 
+  (* Debian bug #749919 *)
+  let allowed_hosts_1 = "allowed_hosts=127.0.0.1\n"
+
+  test Nrpe.item get allowed_hosts_1 =
+    { "allowed_hosts" = "127.0.0.1" }
+
+
+  let allowed_hosts_2 = "allowed_hosts=127.0.0.1, 127.0.0.2\n"
+
+  test Nrpe.item get allowed_hosts_2 =
+    { "allowed_hosts" = "127.0.0.1, 127.0.0.2" }
+
+
   let lns = "
 #
 # server address: