rule(macro bin_dir_mkdir): correct condition to catch mkdirat case

Since the dir's path is found:
-  in `evt.arg[1]` for `mkdir`
-  but in `evt.arg[2]` for `mkdirat`
switch to `evt.arg.path` to catch both.
That ensures `Mkdir binary dirs` works properly.

Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
This commit is contained in:
Leonardo Grasso 2020-06-04 10:33:24 +02:00 committed by poiana
parent 3bfd94fefd
commit 74ca02d199

View File

@ -80,10 +80,10 @@
- macro: bin_dir_mkdir - macro: bin_dir_mkdir
condition: > condition: >
(evt.arg[1] startswith /bin/ or (evt.arg.path startswith /bin/ or
evt.arg[1] startswith /sbin/ or evt.arg.path startswith /sbin/ or
evt.arg[1] startswith /usr/bin/ or evt.arg.path startswith /usr/bin/ or
evt.arg[1] startswith /usr/sbin/) evt.arg.path startswith /usr/sbin/)
- macro: bin_dir_rename - macro: bin_dir_rename
condition: > condition: >