mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
![]() Most `tests/regression/apparmor/*.sh` scripts contain . $bin/prologue.inc This will explode if one of the parent directories contains a space. Minimized reproducer: ``` # cat test.sh pwd=`dirname $0` pwd=`cd $pwd ; /bin/pwd` bin=$pwd echo "pwd: $bin" . $bin/prologue.inc # ./test.sh pwd: /tmp/foo bar ./test.sh: line 9: /tmp/foo: No such file or directory ``` Notice that test.sh tries to source `/tmp/foo` instead of `/tmp/foo bar/prologue.inc`. The fix is to quote the prologue.inc path: . "$bin/prologue.inc" While on it, also fix other uses of $bin - directly and indirectly - by quoting them. MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1418 Approved-by: Ryan Lee <rlee287@yahoo.com> Approved-by: John Johansen <john@jjmx.net> Merged-by: John Johansen <john@jjmx.net> |
||
---|---|---|
.. | ||
bin | ||
regression | ||
stress | ||
checkstyle2junit.xslt | ||
Makefile |