Skip to content

Commit a3dc1e6

Browse files
committedJul 4, 2017
Add X32 to the seccomp filter
Fixes #1432.
1 parent 42c5774 commit a3dc1e6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎src/libstore/build.cc

+4
Original file line numberDiff line numberDiff line change
@@ -2317,6 +2317,10 @@ void setupSeccomp()
23172317
seccomp_arch_add(ctx, SCMP_ARCH_X86) != 0)
23182318
throw SysError("unable to add 32-bit seccomp architecture");
23192319

2320+
if (settings.thisSystem == "x86_64-linux" &&
2321+
seccomp_arch_add(ctx, SCMP_ARCH_X32) != 0)
2322+
throw SysError("unable to add X32 seccomp architecture");
2323+
23202324
/* Prevent builders from creating setuid/setgid binaries. */
23212325
for (int perm : { S_ISUID, S_ISGID }) {
23222326
if (seccomp_rule_add(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(chmod), 1,

0 commit comments

Comments
 (0)
Please sign in to comment.