Skip to content

Commit e4100a4

Browse files
authored
fixed grep string for 1.4.11 and 1.4.22
check 1.4.11 and 1.4.22 FAIL even when permissions is correct.
1 parent b502d09 commit e4100a4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cfg/1.8/master.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -942,9 +942,8 @@ groups:
942942

943943
- id: 1.4.11
944944
text: "Ensure that the etcd data directory permissions are set to 700 or more restrictive (Scored)"
945-
audit: ps -ef | grep $etcdbin | grep -v grep | sed 's%.*data-dir[= ]\([^ ]*\).*%\1%' | xargs stat -c %a
946-
tests:
947-
test_items:
945+
audit: ps -ef | grep $etcdbin | grep -- --data-dir | grep -v grep | sed 's%.*data-dir[= ]\([^ ]*\).*%\1%' | xargs stat -c %a
946+
test_items:
948947
- flag: "700"
949948
compare:
950949
op: eq
@@ -960,7 +959,7 @@ groups:
960959

961960
- id: 1.4.12
962961
text: "Ensure that the etcd data directory ownership is set to etcd:etcd (Scored)"
963-
audit: ps -ef | grep $etcdbin | grep -v grep | sed 's%.*data-dir[= ]\(\S*\)%\1%' | xargs stat -c %U:%G
962+
audit: ps -ef | grep $etcdbin | grep -- --data-dir | grep -v grep | sed 's%.*data-dir[= ]\(\S*\)%\1%' | xargs stat -c %U:%G
964963
tests:
965964
test_items:
966965
- flag: "etcd:etcd"

0 commit comments

Comments
 (0)