Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow parsing of options with equal sign #587

Merged
merged 1 commit into from
Nov 30, 2018

Conversation

emildragu
Copy link
Contributor

Options in sshd_config cand be speciffied using space, tab or equal sign.
They all have the same effect.

@@ -68,7 +68,7 @@ module Sshd =

let eol = del /[ \t]*\n/ "\n"

let sep = Util.del_ws_spc
let sep = del /[ \t=]+/ " "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually allows == as well, but I guess that's fine.

Copy link
Member

@raphink raphink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the CI fails because your change introduces an ambiguity:

$ augparse -I lenses/ lenses/tests/test_sshd.aug 
Syntax error in lens definition
lenses/sshd.aug:93.3-.56:Failed to compile accept_env
lenses/sshd.aug:86.13-.32:exception: ambiguous concatenation
      First regexp: /[ \t=]+/
      Second regexp: /(([^"' \t\n]+))|((")([^"' \t\n]+)("))|((')([^"' \t\n]+)('))/
      ' =A' can be split into
      ' |=|=A'

     and
      ' =|=|A'

    First lens: lenses/sshd.aug:86.13-.25:
    Second lens: lenses/quote.aug:159.2-.41:

lenses/tests/test_sshd.aug:8.7-.15:Could not load module Sshd for Sshd.lns
lenses/tests/test_sshd.aug:8.7-.15:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:21.7-.15:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:27.7-.15:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:27.7-.15:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:34.7-.15:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:37.7-.15:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:41.7-.15:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:54.7-.15:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:67.7-.15:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:67.7-.15:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:80.7-.15:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:80.7-.15:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:95.5-.13:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:118.5-.13:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:136.5-.13:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:144.5-.13:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:152.5-.13:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:152.5-.13:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:156.5-.13:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:156.5-.13:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:160.5-.13:Undefined variable Sshd.lns
lenses/tests/test_sshd.aug:160.5-.13:Undefined variable Sshd.lns

Four more defintions must be patched to fix this:

  • bare in array_entry
  • value in subsystemvalue
  • value in list
  • value in condition_entry

@emildragu
Copy link
Contributor Author

I saw that CI failed and fixed by modified the commit, but probably CI did not trigger again: 1717f0e . Shall I create a new commit fixing this?

@raphink
Copy link
Member

raphink commented Nov 1, 2018

@emildragu yes I saw the fix. However it only fixes one occurrence, there's 4 more problems to fix (listed in my previous comment).

Options in sshd_config cand be speciffied using space, tab or equal sign.
They all have the same effect.
@lutter
Copy link
Member

lutter commented Nov 29, 2018

It seems the typecheck errors have all been addressed now.

@raphink
Copy link
Member

raphink commented Nov 30, 2018

LGTM

@raphink raphink merged commit 11f4546 into hercules-team:master Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants