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

Avoid failing on EL 6 family and OpenSuse Leap 42 #109

Merged
merged 1 commit into from
Aug 1, 2018

Conversation

artem-sidorenko
Copy link
Member

With command it fails for whatever reason, with bash resource
it works just fine:

  ×  sshd-48: Server: DH primes (1 failed)
     ✔  Command: `test $(awk '$5 < 2047 && $5 ~ /^[0-9]+$/ { print $5 }'
/etc/ssh/moduli | uniq | wc -c) -eq 0` exit_status should eq 0
     ✔  Command: `test $(awk '$5 < 2047 && $5 ~ /^[0-9]+$/ { print $5 }'
/etc/ssh/moduli | uniq | wc -c) -eq 0` stdout should eq ""
     ×  Command: `test $(awk '$5 < 2047 && $5 ~ /^[0-9]+$/ { print $5 }'
/etc/ssh/moduli | uniq | wc -c) -eq 0` stderr should eq ""

     expected: ""
          got: "awk: cmd. line:1: fatal: cannot open file
`/etc/ssh/moduli' for reading (Permission denied)\n"

     (compared using ==)

     Diff:
     @@ -1 +1,2 @@
     +awk: cmd. line:1: fatal: cannot open file `/etc/ssh/moduli' for
reading (Permission denied)

Signed-off-by: Artem Sidorenko artem@posteo.de

With command it fails for whatever reason, with bash resource
it works just fine:

```bash
  ×  sshd-48: Server: DH primes (1 failed)
     ✔  Command: `test $(awk '$5 < 2047 && $5 ~ /^[0-9]+$/ { print $5 }'
/etc/ssh/moduli | uniq | wc -c) -eq 0` exit_status should eq 0
     ✔  Command: `test $(awk '$5 < 2047 && $5 ~ /^[0-9]+$/ { print $5 }'
/etc/ssh/moduli | uniq | wc -c) -eq 0` stdout should eq ""
     ×  Command: `test $(awk '$5 < 2047 && $5 ~ /^[0-9]+$/ { print $5 }'
/etc/ssh/moduli | uniq | wc -c) -eq 0` stderr should eq ""

     expected: ""
          got: "awk: cmd. line:1: fatal: cannot open file
`/etc/ssh/moduli' for reading (Permission denied)\n"

     (compared using ==)

     Diff:
     @@ -1 +1,2 @@
     +awk: cmd. line:1: fatal: cannot open file `/etc/ssh/moduli' for
reading (Permission denied)
```

Signed-off-by: Artem Sidorenko <artem@posteo.de>
Copy link
Member

@chris-rock chris-rock left a comment

Choose a reason for hiding this comment

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

Thank you @artem-sidorenko

@chris-rock chris-rock merged commit d396c76 into dev-sec:master Aug 1, 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.

2 participants