Skip to content

Commit

Permalink
Merge pull request #1938 from andreasbaumann/seccomp32
Browse files Browse the repository at this point in the history
added seccomp_rule_add for fstat64 and _llseek (support for 32-bit)
  • Loading branch information
masatake committed Nov 26, 2018
2 parents befcb88 + fb0c197 commit bda19d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main/seccomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ int installSyscallFilter (void)

// The bowels of stdio want to know the size of a file, even for stdout.
seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (fstat), 0);
seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (fstat64), 0);

// seems unnecessary, but this comes from
// main/parse.c:2764 : tagFilePosition (&tagfpos);
seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (lseek), 0);
seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (_llseek), 0);

// libxml2 uses pthread_once, which in turn uses a futex
seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (futex), 0);
Expand Down

0 comments on commit bda19d5

Please sign in to comment.