We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa722c1 commit 9233b3dCopy full SHA for 9233b3d
tests/integration/exec.bats
@@ -125,10 +125,25 @@ function teardown() {
125
126
runc exec --user 1000:1000 test_busybox id
127
[ "$status" -eq 0 ]
128
-
129
[[ "${output}" == "uid=1000 gid=1000"* ]]
130
}
131
+# https://github.com/opencontainers/runc/issues/3674.
132
+@test "runc exec --user vs /dev/null ownership" {
133
+ requires root
134
+
135
+ runc run -d --console-socket "$CONSOLE_SOCKET" test_busybox
136
+ [ "$status" -eq 0 ]
137
138
+ ls -l /dev/null
139
+ __runc exec -d --user 1000:1000 test_busybox id </dev/null
140
141
+ UG=$(stat -c %u:%g /dev/null)
142
143
+ # Host's /dev/null must be owned by root.
144
+ [ "$UG" = "0:0" ]
145
+}
146
147
@test "runc exec --additional-gids" {
148
requires root
149
0 commit comments