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

Add mode to su-binary task. Fix #38 #39

Merged
merged 2 commits into from
Sep 1, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ install:

script:
- ansible-playbook --syntax-check spec/travis.yml
- ansible-playbook --sudo -v --diff spec/travis.yml --skip-tags "sysctl"
- ansible-playbook --sudo -v --diff spec/travis.yml --skip-tags "sysctl" --extra-vars "os_security_users_allow=change_user"
4 changes: 2 additions & 2 deletions roles/ansible-os-hardening/tasks/minimize_access.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
file: dest='/etc/shadow' owner=root group=root mode=0600

- name: change su-binary to only be accessible to user and group root
file: dest='/bin/su' owner=root group=root mode
when: security_users_allow|default(None) != None
file: dest='/bin/su' owner=root group=root mode=0750
Copy link
Member

Choose a reason for hiding this comment

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

May use YAML syntax to make such problems more obvious? E.g:

- file:
    dest: '/bin/su'
    owner: 'root'

Copy link
Member Author

Choose a reason for hiding this comment

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

I think, ansible should throw an error when a key is provided without a value. I'd rather not change the whole syntax because I like it that way.

This does throw an error. Altough we should test it correctly!;)
I'll change the tests and leave the syntax like it is.

when: os_security_users_allow != None