isMasked() {
isMasked=$(systemctl is-enabled "$1")
if [[ "$isMasked" = "masked" ]]; then
exit 0
else
exit 1
fi
}
@test "Verify that whoopsie is masked" {
run isMasked whoopsie.service
[ "$status" -eq 0 ]
}
Ensure Whoopsie is masked
Description
Ensure that the whoopsie service is masked if it is required to be installed.
Rationale
Whoopsie collects the crash report generated by Apport and makes it possible
to send them to Canonical.
Audit
Remediation
shell
systemctl stop whoopsie.service
systemctl mask whoopsie.service