From a1978fb1b2f9c97ae6ea7efb752e3d25ac261830 Mon Sep 17 00:00:00 2001 From: John Johansen Date: Tue, 1 Sep 2020 03:10:01 -0700 Subject: [PATCH] parser: call filter slashes for mount conditionals The mnt_point and devices conditionals in mount rules are generally paths and should have slashes filtered after variable expansion. MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/607 Signed-off-by: John Johansen --- parser/mount.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/parser/mount.cc b/parser/mount.cc index cbf63f6b6..dcc6c2548 100644 --- a/parser/mount.cc +++ b/parser/mount.cc @@ -490,9 +490,11 @@ int mnt_rule::expand_variables(void) error = expand_entry_variables(&mnt_point); if (error) return error; + filter_slashes(mnt_point); error = expand_entry_variables(&device); if (error) return error; + filter_slashes(device); error = expand_entry_variables(&trans); if (error) return error;