]> git.ipfire.org Git - thirdparty/systemd.git/commit
rule-syntax-check: add support for escaped double quotes
authorFilipe Brandenburger <filbranden@google.com>
Tue, 27 Feb 2018 19:12:18 +0000 (11:12 -0800)
committerFilipe Brandenburger <filbranden@google.com>
Tue, 27 Feb 2018 19:15:42 +0000 (11:15 -0800)
commitd498347a01266fc77ad9086611495802096d00f6
tree31559e03eb2f694f55c0b8ff63d7c8779645f640
parent75a56cb63259505e568d0524461d446040ceba6c
rule-syntax-check: add support for escaped double quotes

Add support to backslash-escaped double quote inside a string.

Tested by modifying src/login/70-uaccess.rules to include:

  ACTION=="remove" it", GOTO="uaccess_end"

And had the rule checker complain about it:

  $ test/rule-syntax-check.py src/login/70-uaccess.rules
  # looking at src/login/70-uaccess.rules
  Invalid line src/login/70-uaccess.rules:10: ACTION=="remove" it", GOTO="uaccess_end"
    clause: ACTION=="remove" it"
test/rule-syntax-check.py