test: adapt to the new capsh format
Since libcap v2.29 the format of cap_to_text() has been changed which makes certain `test-execute` subtest fail. Let's remove the offending part of the output (dropped capabilities) to make it compatible with both the old and the new libcap.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
f2394ddb08
commit
9569e38503
@@ -3,5 +3,6 @@ Description=Test CAP_SYS_MODULE for ProtectKernelModules=yes
|
||||
|
||||
[Service]
|
||||
ProtectKernelModules=yes
|
||||
ExecStart=/bin/sh -x -c '! capsh --print | grep cap_sys_module'
|
||||
# sed: remove dropped capabilities (cap_xxx-[epi]) from the output
|
||||
ExecStart=/bin/sh -x -c '! capsh --print | sed -r "s/[^ ]+?\-[epi]+//g" | grep cap_sys_module'
|
||||
Type=oneshot
|
||||
|
||||
Reference in New Issue
Block a user