mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-19 08:42:33 +01:00
Merge pull request #153 from dhawal55/master
fix issue #152: Avoid picking early-docker by selecting newest docker daemon process
This commit is contained in:
commit
46ad0d7f06
1 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,7 @@ contains() {
|
||||||
get_command_line_args() {
|
get_command_line_args() {
|
||||||
PROC="$1"
|
PROC="$1"
|
||||||
|
|
||||||
for PID in $(pgrep -x -o "$PROC")
|
for PID in $(pgrep -f -n "$PROC")
|
||||||
do
|
do
|
||||||
tr "\0" " " < /proc/"$PID"/cmdline
|
tr "\0" " " < /proc/"$PID"/cmdline
|
||||||
done
|
done
|
||||||
|
@ -55,7 +55,7 @@ get_command_line_args() {
|
||||||
get_docker_cumulative_command_line_args() {
|
get_docker_cumulative_command_line_args() {
|
||||||
OPTION="$1"
|
OPTION="$1"
|
||||||
|
|
||||||
get_command_line_args docker |
|
get_command_line_args "docker daemon" |
|
||||||
# normalize known long options to their short versions
|
# normalize known long options to their short versions
|
||||||
sed \
|
sed \
|
||||||
-e 's/\-\-debug/-D/g' \
|
-e 's/\-\-debug/-D/g' \
|
||||||
|
|
Loading…
Reference in a new issue