test: add test to make sure that CAP_SYS_RAWIO was removed on PrivateDevices=yes

This commit is contained in:
Djalal Harouni
2016-10-12 13:47:59 +02:00
parent 2cd0a73547
commit 625d8769fa
3 changed files with 16 additions and 0 deletions
@@ -0,0 +1,7 @@
[Unit]
Description=Test CAP_SYS_RAWIO capability for PrivateDevices=no
[Service]
PrivateDevices=no
ExecStart=/bin/sh -x -c 'capsh --print | grep cap_sys_rawio'
Type=oneshot
@@ -0,0 +1,7 @@
[Unit]
Description=Test CAP_SYS_RAWIO capability for PrivateDevices=yes
[Service]
PrivateDevices=yes
ExecStart=/bin/sh -x -c '! capsh --print | grep cap_sys_rawio'
Type=oneshot