-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix grep string for check 1.4.11 and 1.4.12 #134
Conversation
check 1.4.11 and 1.4.22 FAIL even when permissions is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! Couple of small changes please
cfg/1.8/master.yaml
Outdated
tests: | ||
test_items: | ||
audit: ps -ef | grep $etcdbin | grep -- --data-dir | grep -v grep | sed 's%.*data-dir[= ]\([^ ]*\).*%\1%' | xargs stat -c %a | ||
test_items: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is missing tests:
?
cfg/1.8/master.yaml
Outdated
audit: ps -ef | grep $etcdbin | grep -v grep | sed 's%.*data-dir[= ]\([^ ]*\).*%\1%' | xargs stat -c %a | ||
tests: | ||
test_items: | ||
audit: ps -ef | grep $etcdbin | grep -- --data-dir | grep -v grep | sed 's%.*data-dir[= ]\([^ ]*\).*%\1%' | xargs stat -c %a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is any need for the grep -v grep step now that we are checking for --data-dir
cfg/1.8/master.yaml
Outdated
@@ -960,7 +959,7 @@ groups: | |||
|
|||
- id: 1.4.12 | |||
text: "Ensure that the etcd data directory ownership is set to etcd:etcd (Scored)" | |||
audit: ps -ef | grep $etcdbin | grep -v grep | sed 's%.*data-dir[= ]\(\S*\)%\1%' | xargs stat -c %U:%G | |||
audit: ps -ef | grep $etcdbin | grep -- --data-dir | grep -v grep | sed 's%.*data-dir[= ]\(\S*\)%\1%' | xargs stat -c %U:%G |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think grep -v grep is now unnecessary here too
added tests: for 1.4.11 and removed grep -v grep for both
Thanks for the correction. Added tests: for 1.4.11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
check 1.4.11 and 1.4.22 shows FAIL even when permissions is correct.