File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757 working-directory : api/src
5858 run : |
5959 gcc -O2 -static -Wall -Wextra -Werror -o /tmp/spec-guard spec-guard.c
60+ chmod 0555 /tmp/spec-guard
6061 # Smoke: spec-guard must execvp its argument cleanly. Use a
6162 # parent process with a known FD population so we also assert
6263 # the close-inherited-FDs path runs (child must see only the
Original file line number Diff line number Diff line change @@ -29,8 +29,9 @@ RUN git clone -b master --single-branch https://github.com/google/nsjail.git . \
2929RUN make -j$(nproc)
3030
3131COPY api/src/spec-guard.c /tmp/spec-guard.c
32+ # KVM/nsjail execution may need read permission on virtiofs-backed rootfs.
3233RUN gcc -O2 -static -o /usr/local/bin/spec-guard /tmp/spec-guard.c \
33- && chmod 0111 /usr/local/bin/spec-guard
34+ && chmod 0555 /usr/local/bin/spec-guard
3435
3536# ============================================================================
3637# Stage 1b: Build language runtime packages (only consumed by sandbox-runner-baked)
Original file line number Diff line number Diff line change @@ -42,8 +42,9 @@ RUN git clone -b master --single-branch https://github.com/google/nsjail.git . \
4242RUN make -j$(nproc)
4343
4444COPY api/src/spec-guard.c /tmp/spec-guard.c
45+ # KVM/nsjail execution may need read permission on virtiofs-backed rootfs.
4546RUN gcc -O2 -static -o /usr/local/bin/spec-guard /tmp/spec-guard.c \
46- && chmod 0111 /usr/local/bin/spec-guard
47+ && chmod 0555 /usr/local/bin/spec-guard
4748
4849# ============================================================================
4950# Stage 2: Build worker
Original file line number Diff line number Diff line change @@ -33,8 +33,9 @@ RUN git clone -b master --single-branch https://github.com/google/nsjail.git . \
3333RUN make -j$(nproc)
3434
3535COPY api/src/spec-guard.c /tmp/spec-guard.c
36+ # KVM/nsjail execution may need read permission on virtiofs-backed rootfs.
3637RUN gcc -O2 -static -o /usr/local/bin/spec-guard /tmp/spec-guard.c \
37- && chmod 0111 /usr/local/bin/spec-guard
38+ && chmod 0555 /usr/local/bin/spec-guard
3839
3940FROM oven/bun:1.3.14-debian AS sandbox-build
4041
You can’t perform that action at this time.
0 commit comments