test: add tests to ensure that the capabilities are properly set
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=Test for CapabilityBoundingSet
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -c 'c=$(capsh --print | grep "Bounding set " | grep "cap_chown"); echo $c; exit $(test -z $c)'
|
||||
CapabilityBoundingSet=~CAP_CHOWN
|
||||
@@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Test for CapabilityBoundingSet
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -c 'c=$(capsh --print | grep "Bounding set " | cut -f 2 -d "="); echo $c; exit $(test $c = "cap_chown,cap_fowner,cap_kill")'
|
||||
CapabilityBoundingSet=CAP_FOWNER
|
||||
CapabilityBoundingSet=CAP_KILL CAP_CHOWN
|
||||
@@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Test for CapabilityBoundingSet
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -c 'c=$(capsh --print | grep "Bounding set " | cut -f 2 -d "="); echo $c; exit $(test -z $c)'
|
||||
CapabilityBoundingSet=CAP_FOWNER CAP_KILL
|
||||
CapabilityBoundingSet=
|
||||
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=Test for CapabilityBoundingSet
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -c 'c=$(capsh --print | grep "Bounding set " | cut -f 2 -d "="); echo $c; exit $(test $c = "cap_fowner,cap_kill")'
|
||||
CapabilityBoundingSet=CAP_FOWNER CAP_KILL
|
||||
Reference in New Issue
Block a user