Skip to content
Snippets Groups Projects
Commit 424a35c9 authored by Philip Withnall's avatar Philip Withnall
Browse files

apparmor: Do not rely on $HOME being set for AppArmor malicious tests

If an AppArmor malicious test is run as a systemd system job (using
`run-test-in-systemd --system`), $HOME will explicitly not be set, which
results in the program trying to read (null)/.bash_history, rather than
the expected /home/user/.bash_history.

Fix that by hard-coding it to use /home/user/.bash_history if $HOME is
not set. If the username changes in future, the tests should start
failing, which will allow us to update it again.

Bug-Apertis: https://bugs.apertis.org/show_bug.cgi?id=681



Reviewed-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
Signed-off-by: default avatarPhilip Withnall <philip.withnall@collabora.co.uk>
Differential Revision: https://phabricator.apertis.org/D2283
parent 6d8b4369
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment