mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
Improve fix for issue 47 using prep -x -o
The use of `pgrep -x`was proposed by @rnelson0. `pgrep -x -o` should limit the result to the oldest exactly matching execution of a binary called `docker`. Signed-off-by: Joachim Lusiardi <joachim@lusiardi.de>
This commit is contained in:
parent
fae2639313
commit
2d29af704e
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ contains() {
|
|||
get_command_line_args() {
|
||||
PROC="$1"
|
||||
|
||||
for PID in `pgrep $PROC`
|
||||
for PID in `pgrep -x -o $PROC`
|
||||
do
|
||||
cat /proc/$PID/cmdline | tr "\0" " "
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue