mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-28 21:07:56 +00:00
regression tests/prologue: adjust sed to not use ~ as regex separators
prologue.inc:settest() in same cases invokes a sed command that uses '~' as a pattern separator, on things that can contain filesystem paths. However, in the debian/ubuntu world, '~' can be used in version strings, particularly for pre-release versions, and when this happens and the version is embedded in the path, the sed command breaks because of the extraneous separator. Fix this by using '#' as a separator, which has the benefit of being considered a comment if accidentally interpreted by a shell. Signed-off-by: Steve Beattie <steve.beattie@canonical.com> Acked-by: Christian Boltz <apparmor@cboltz.de> MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/599 (cherry picked from commit efc6590409846114f729618a5ff011ab0f836342) Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
aecc9e1cb6
commit
a07de3f095
@ -578,7 +578,7 @@ settest()
|
||||
elif [ $# -eq 2 ]
|
||||
then
|
||||
test=$bin/$1
|
||||
testexec=`echo $2 | sed "s~{}~$test~"`
|
||||
testexec=`echo $2 | sed "s#{}#$test#"`
|
||||
else
|
||||
fatalerror "settest, illegal usage"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user