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

Finalise regression fix #70 (755 & InSpec test) #71

Open
myii opened this issue Nov 26, 2020 · 0 comments
Open

Finalise regression fix #70 (755 & InSpec test) #71

myii opened this issue Nov 26, 2020 · 0 comments

Comments

@myii
Copy link
Member

myii commented Nov 26, 2020

CC: @kmosher @jynolen @daks.

#70 was merged quickly due to a regression but it appears that the directory mode should have been set to 755:

@daks Mentioned an InSpec test that could also be added:

#70 (comment)

Not sure why I set it to 440 but in fact on Debian 9 or 10 it's 755 so no problem for me to merge this PR as soon as possible.

One improvement could be to add a basic test on this directory mode, here https://github.com/saltstack-formulas/sudoers-formula/blob/master/test/integration/default/controls/config.rb, with something like

  describe directory('/etc/sudoers.d/') do
    it { should be_owned_by 'root' }
    it { should be_grouped_into 'root' }
    its('mode') { should cmp '0755' }
  end

A better one (but I'm not sure I know how to run it) would be to set some NOPASSWD sudo rules and try to use it.

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

No branches or pull requests

1 participant