aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2019-11-01 12:25:09 -0400
committerBryn M. Reeves <bmr@redhat.com>2019-11-01 12:30:46 -0400
commit05f3d5bda8f548459fabcd38f2d087d6ecef98a2 (patch)
treee560b415bf91eb6dcd06d8dc0b699e56b43be0c9 /tests
parentaeeebf126fc9fdb0fd8c3b01418bef742bce78c3 (diff)
downloadsos-05f3d5bda8f548459fabcd38f2d087d6ecef98a2.tar.gz
[kernel] remove trailing directory globs in forbidden paths
Since the forbidden path test now uses an exact match the trailing globs ("/some/directory/path/to/exclude/*") used to exclude trace related directories from collection lead to a failure to properly blacklist these files: The glob is expanded, for e.g.: "/sys/kernel/debug/tracing/per_cpu/*" Expands to unclude a 'cpuN' sub-directory for each CPU present on the machine. These expanded paths are then added to the forbidden paths list for the plugin: /sys/kernel/debug/tracing/per_cpu/cpu0 /sys/kernel/debug/tracing/per_cpu/cpu1 ... When an attempt is made to collect the entire "per_cpu" directory a check is made for the full "/sys/kernel/debug/tracing/per_cpu" path against each entry in the forbidden paths list. Since this is a prefix of the actual paths stored no match is returned and the collection is permitted. Remove the trailing globs from these directory paths and prevent any collection of the directories they reference by the plugin. Related: #1842 Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions