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

Fix issue when xinetd.conf does not end in newline #2040

Merged
merged 1 commit into from Aug 2, 2017

Conversation

kareiva
Copy link
Contributor

@kareiva kareiva commented Aug 1, 2017

Add a newline symbol to the end of the parsed input.

Sample hexdump of xinetd.conf when deployed by the xinetd cookbook:

$ hexdump -C /var/chef/cache/cookbooks/xinetd/templates/default/xinetd.conf.erb | tail -2
000000b0  72 20 2f 65 74 63 2f 78  69 6e 65 74 64 2e 64     |r /etc/xinetd.d|
000000bf

@trickyearlobe trickyearlobe requested review from arlimus and adamleff and removed request for arlimus and adamleff August 1, 2017 17:42
Add a newline symbol to the end of the parsed input.

Sample hexdump of a file deployed by xinetd cookbook:

$ hexdump -C /var/chef/cache/cookbooks/xinetd/templates/default/xinetd.conf.erb | tail -2
000000b0  72 20 2f 65 74 63 2f 78  69 6e 65 74 64 2e 64     |r /etc/xinetd.d|
000000bf

Signed-off-by: Simonas Kareiva <simonas@5grupe.lt>
Copy link
Contributor

@arlimus arlimus 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 for contributing @kareiva !!

I will add the test that would have caught this issue right after and reference it with your PR.

Copy link
Contributor

@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 for contribution @kareiva

@chris-rock chris-rock merged commit da75f26 into inspec:master Aug 2, 2017
arlimus added a commit that referenced this pull request Aug 2, 2017
The fix is already provided here: #2040

This PR only adds a unit test to catch it
arlimus added a commit that referenced this pull request Aug 2, 2017
The fix is already provided here: #2040

This PR only adds a unit test to catch it

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
chris-rock pushed a commit that referenced this pull request Aug 2, 2017
The fix is already provided here: #2040

This PR only adds a unit test to catch it

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
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.

None yet

3 participants