test: verify fsu ppid check

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-02-26 16:51:57 +09:00
parent 8e50293ab7
commit 5de28800ad

View File

@@ -95,6 +95,9 @@ print(denyOutput)
denyOutputVerbose = machine.fail("sudo -u untrusted -i fortify -v run &>/dev/stdout")
print(denyOutputVerbose)
# Fail direct fsu call:
print(machine.fail("sudo -u alice -i fsu"))
# Verify PrintBaseError behaviour:
if denyOutput != "fsu: uid 1001 is not in the fsurc file\n":
raise Exception(f"unexpected deny output:\n{denyOutput}")