mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
93bbc76ee5
While testing #24510 I noticed that 32 bit syscalls were incorrectly being blocked and we did not have a test for this, so adding one. This is only tested on amd64 as it is the only architecture that reliably supports 32 bit code execution, others only do sometimes. There is no 32 bit libc in the buildpack-deps so we cannot build 32 bit C code easily so use the simplest assembly program which just calls the exit syscall. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
11 lines
331 B
Docker
11 lines
331 B
Docker
FROM buildpack-deps:jessie
|
|
|
|
COPY . /usr/src/
|
|
|
|
WORKDIR /usr/src/
|
|
|
|
RUN gcc -g -Wall -static userns.c -o /usr/bin/userns-test \
|
|
&& gcc -g -Wall -static ns.c -o /usr/bin/ns-test \
|
|
&& gcc -g -Wall -static acct.c -o /usr/bin/acct-test
|
|
|
|
RUN [ "$(uname -m)" = "x86_64" ] && gcc -s -m32 -nostdlib exit32.s -o /usr/bin/exit32-test || true
|