Skip to content

Commit

Permalink
moved quoting below argument pattern match, so that the pattern match…
Browse files Browse the repository at this point in the history
… happens on the unquoted argument
  • Loading branch information
Bastian Reitemeier committed Apr 8, 2018
1 parent 79ce51c commit 9345df1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/execsnoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,14 @@ def print_event(cpu, data, size):
skip = True
if args.name and not re.search(bytes(args.name), event.comm):
skip = True
if args.line and not re.search(bytes(args.line),
b' '.join(argv[event.pid])):
skip = True
if args.quote:
argv[event.pid] = [
"\"" + arg.replace("\"", "\\\"") + "\""
for arg in argv[event.pid]
]
if args.line and not re.search(bytes(args.line),
b' '.join(argv[event.pid])):
skip = True

if not skip:
if args.timestamp:
Expand Down

0 comments on commit 9345df1

Please sign in to comment.