mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-01 14:55:10 +00:00
parser: Fix expansion of variables in unix rules addr= conditional
The parser is not treating unix addr as a path and filtering slashes after variable expansion. This can lead to errors where @{foo}=/a/ unix bind addr=@{foo}/bar, will always fail because addr is being matched as /a//bar instead of /a/bar. MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/607 Fixes: https://bugs.launchpad.net/apparmor/+bug/1856738 Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
@@ -47,7 +47,7 @@ enum error_type {
|
||||
* that's a distinct namespace in linux) and trailing slashes.
|
||||
* NOTE: modifies in place the contents of the path argument */
|
||||
|
||||
static void filter_slashes(char *path)
|
||||
void filter_slashes(char *path)
|
||||
{
|
||||
char *sptr, *dptr;
|
||||
BOOL seen_slash = 0;
|
||||
|
Reference in New Issue
Block a user