make the kubelet cafile test posix compliant (#643)

pull/651/head
Kevin W Monroe 4 years ago committed by GitHub
parent 66692951c8
commit 2a325bd60d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -458,9 +458,7 @@ groups:
text: Ensure that the client certificate authorities file ownership is set to root:root (Scored)
audit: |
CAFILE=$(ps -ef | grep kubelet | grep -v apiserver | grep -- --client-ca-file= | awk -F '--client-ca-file=' '{print $2}' | awk '{print $1}')
if [[ -z $CAFILE ]]; then
CAFILE=$kubeletcafile
fi
if test -z $CAFILE; then CAFILE=$kubeletcafile; fi
if test -e $CAFILE; then stat -c %U:%G $CAFILE; fi
tests:
test_items:

@ -449,9 +449,7 @@ groups:
text: Ensure that the client certificate authorities file ownership is set to root:root (Scored)
audit: |
CAFILE=$(ps -ef | grep kubelet | grep -v apiserver | grep -- --client-ca-file= | awk -F '--client-ca-file=' '{print $2}' | awk '{print $1}')
if [[ -z $CAFILE ]]; then
CAFILE=$kubeletcafile
fi
if test -z $CAFILE; then CAFILE=$kubeletcafile; fi
if test -e $CAFILE; then stat -c %U:%G $CAFILE; fi
tests:
test_items:

@ -119,9 +119,7 @@ groups:
text: "Ensure that the client certificate authorities file ownership is set to root:root (Scored)"
audit: |
CAFILE=$(ps -ef | grep kubelet | grep -v apiserver | grep -- --client-ca-file= | awk -F '--client-ca-file=' '{print $2}' | awk '{print $1}')
if [[ -z $CAFILE ]]; then
CAFILE=$kubeletcafile
fi
if test -z $CAFILE; then CAFILE=$kubeletcafile; fi
if test -e $CAFILE; then stat -c %U:%G $CAFILE; fi
tests:
test_items:

Loading…
Cancel
Save