test-execute: use CAP_CHOWN instead of CAP_NET_ADMIN
CAP_NET_ADMIN is somtrimes dropped by container runtime. This changes to use CAP_CHOWN instead of CAP_NET_ADMIN, as it is less likely to be dropped.
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
Description=Test for AmbientCapabilities
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000003000"'
|
||||
ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000002001"'
|
||||
Type=oneshot
|
||||
User=nfsnobody
|
||||
AmbientCapabilities=CAP_NET_ADMIN
|
||||
AmbientCapabilities=CAP_CHOWN
|
||||
AmbientCapabilities=CAP_NET_RAW
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
Description=Test for AmbientCapabilities
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000003000"'
|
||||
ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000002001"'
|
||||
Type=oneshot
|
||||
User=nobody
|
||||
AmbientCapabilities=CAP_NET_ADMIN
|
||||
AmbientCapabilities=CAP_CHOWN
|
||||
AmbientCapabilities=CAP_NET_RAW
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
Description=Test for AmbientCapabilities (daemon)
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000003000"'
|
||||
ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000002001"'
|
||||
Type=oneshot
|
||||
User=daemon
|
||||
AmbientCapabilities=CAP_NET_ADMIN
|
||||
AmbientCapabilities=CAP_CHOWN
|
||||
AmbientCapabilities=CAP_NET_RAW
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Description=Test for AmbientCapabilities
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000003000"'
|
||||
ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000002001"'
|
||||
Type=oneshot
|
||||
User=nfsnobody
|
||||
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW
|
||||
AmbientCapabilities=CAP_CHOWN CAP_NET_RAW
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Description=Test for AmbientCapabilities
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000003000"'
|
||||
ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000002001"'
|
||||
Type=oneshot
|
||||
User=nobody
|
||||
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW
|
||||
AmbientCapabilities=CAP_CHOWN CAP_NET_RAW
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Description=Test for AmbientCapabilities (daemon)
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000003000"'
|
||||
ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000002001"'
|
||||
Type=oneshot
|
||||
User=daemon
|
||||
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW
|
||||
AmbientCapabilities=CAP_CHOWN CAP_NET_RAW
|
||||
|
||||
Reference in New Issue
Block a user