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 <john.johansen@canonical.com>
(cherry picked from commit a1978fb1b2)
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
John Johansen 2020-09-01 03:10:01 -07:00
parent b3ab839ae5
commit 532d52309e

View file

@ -492,9 +492,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;