tests: add dbus-hardening and hideProcessInformation
This commit is contained in:
parent
0248e6493f
commit
6a8e29e016
@ -51,6 +51,13 @@ assert_matches("curl -L localhost/store", "tshirt")
|
|||||||
machine.wait_until_succeeds(log_has_string("bitcoind-import-banlist", "Importing node banlist"))
|
machine.wait_until_succeeds(log_has_string("bitcoind-import-banlist", "Importing node banlist"))
|
||||||
assert_no_failure("bitcoind-import-banlist")
|
assert_no_failure("bitcoind-import-banlist")
|
||||||
|
|
||||||
|
# test that `systemctl status` can't leak credentials
|
||||||
|
assert_matches(
|
||||||
|
"sudo -u electrs systemctl status clightning 2>&1 >/dev/null",
|
||||||
|
"Failed to dump process list for 'clightning.service', ignoring: Access denied",
|
||||||
|
)
|
||||||
|
machine.succeed("grep -Fq hidepid=2 /proc/mounts")
|
||||||
|
|
||||||
### Additional tests
|
### Additional tests
|
||||||
|
|
||||||
# Current time in µs
|
# Current time in µs
|
||||||
|
@ -113,6 +113,13 @@ assert_matches_exactly(
|
|||||||
# test that netns-exec can not be executed by users that are not operator
|
# test that netns-exec can not be executed by users that are not operator
|
||||||
machine.fail("sudo -u clightning netns-exec nb-bitcoind ip a")
|
machine.fail("sudo -u clightning netns-exec nb-bitcoind ip a")
|
||||||
|
|
||||||
|
# test that `systemctl status` can't leak credentials
|
||||||
|
assert_matches(
|
||||||
|
"sudo -u electrs systemctl status clightning 2>&1 >/dev/null",
|
||||||
|
"Failed to dump process list for 'clightning.service', ignoring: Access denied",
|
||||||
|
)
|
||||||
|
machine.succeed("grep -Fq hidepid=2 /proc/mounts")
|
||||||
|
|
||||||
### Additional tests
|
### Additional tests
|
||||||
|
|
||||||
# Current time in µs
|
# Current time in µs
|
||||||
|
Loading…
Reference in New Issue
Block a user