In my aide
config file, I am getting an 'Error in selective regexp' error with a macro like
@@define BDIRS {ABC,ABD}
used as follows
/backup/@@{BDIRS}$ ...
/backup/{ABC,ABD}$ ... <<< this also errors out
The reason I want to use a regexp is that I would like exact same rules be applied to both directories.
Is the regexp or macro definition wrong? Is there a better way to check the top sub-directory?
# uname -a
Linux devserver 3.12.62-60.62-default #1 SMP Thu Aug 4 09:06:08 UTC 2016 (b0e5a26) x86_64 x86_64 x86_64 GNU/Linux
# aide -v
Aide 0.15.1
AIDE is using PCRE (Perl Compatible Regular Expressions), not BASH brace expansions as you tried to use. This syntax should do the job for you:
/backup/(ABC|ABD)$
Online tester: https://regex101.com/r/SDJbjE/1