Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominic Cleal <dcleal@redhat.com>2015-12-10 17:37:58 +0300
committerDominic Cleal <dcleal@redhat.com>2015-12-10 17:37:58 +0300
commit6b4031331192c86910714b38ff49454602ff4784 (patch)
tree5fddc85de23c9770cf51e5eb1554a2043cc7bce7 /letsencrypt-apache
parent5804d033363d0005134c2298c5c6da1013ad1e3f (diff)
Merge Augeas lens fix for partially quoted arguments
From https://github.com/hercules-team/augeas/commit/50fb756580477e9195946133ec2f0d1f0f6786c7 Closes: #1724
Diffstat (limited to 'letsencrypt-apache')
-rw-r--r--letsencrypt-apache/letsencrypt_apache/augeas_lens/httpd.aug11
1 files changed, 9 insertions, 2 deletions
diff --git a/letsencrypt-apache/letsencrypt_apache/augeas_lens/httpd.aug b/letsencrypt-apache/letsencrypt_apache/augeas_lens/httpd.aug
index 0669896a0..732ba5468 100644
--- a/letsencrypt-apache/letsencrypt_apache/augeas_lens/httpd.aug
+++ b/letsencrypt-apache/letsencrypt_apache/augeas_lens/httpd.aug
@@ -68,6 +68,9 @@ let cl = /\\\\\n/
let dquot =
let no_dquot = /[^"\\\r\n]/
in /"/ . (no_dquot|cdot|cl)* . /"/
+let dquot_msg =
+ let no_dquot = /([^ \t"\\\r\n]|[^"\\\r\n]+[^ \t"\\\r\n])/
+ in /"/ . (no_dquot|cdot|cl)*
let squot =
let no_squot = /[^'\\\r\n]/
in /'/ . (no_squot|cdot|cl)* . /'/
@@ -78,6 +81,8 @@ let comp = /[<>=]?=/
*****************************************************************)
let arg_dir = [ label "arg" . store (char_arg_dir+|dquot|squot) ]
+(* message argument starts with " but ends at EOL *)
+let arg_dir_msg = [ label "arg" . store dquot_msg ]
let arg_sec = [ label "arg" . store (char_arg_sec+|comp|dquot|squot) ]
let arg_wl = [ label "arg" . store (char_arg_wl+|dquot|squot) ]
@@ -90,8 +95,10 @@ let arg_wordlist =
let argv (l:lens) = l . (sep_spc . l)*
-let directive = [ indent . label "directive" . store word .
- (sep_spc . argv (arg_dir|arg_wordlist))? . eol ]
+let directive =
+ (* arg_dir_msg may be the last or only argument *)
+ let dir_args = (argv (arg_dir|arg_wordlist) . (sep_spc . arg_dir_msg)?) | arg_dir_msg
+ in [ indent . label "directive" . store word . (sep_spc . dir_args)? . eol ]
let section (body:lens) =
(* opt_eol includes empty lines *)