aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]security/scripts/check_security_root.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/scripts/check_security_root.sh b/security/scripts/check_security_root.sh
index f5b55c3..5b614d4 100644..100755
--- a/security/scripts/check_security_root.sh
+++ b/security/scripts/check_security_root.sh
@@ -55,7 +55,7 @@ code=0
for pod in `kubectl get pod -n $K8S_NAMESPACE| grep "Running" | grep -v functest | grep -v integration | awk '{print $1}'` ;do
list=`kubectl top pod $pod --containers -n onap |grep -v "POD"|awk '{print $1":"$2}'`;
for po in $list; do
- contname=`echo $po|cut -d':' -f2`;uid=`kubectl exec $pod --container $contname -n $K8S_NAMESPACE id|sed -r "s/^uid=(.*) gid.*$/\1/"`;echo "POD: $pod container: $contname uid: $uid";
+ contname=`echo $po|cut -d':' -f2`;uid=`kubectl exec $pod --container $contname -n $K8S_NAMESPACE -- id|sed -r "s/^uid=(.*) gid.*$/\1/"`;echo "POD: $pod container: $contname uid: $uid";
done;
done | grep root > $FILTERED_PODS_LIST