Skip to content

Commit

Permalink
added seccomp_rule_add for fstat64 and _llseek (support for 32-bit)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasbaumann committed Nov 22, 2018
1 parent befcb88 commit fb0c197
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 fb0c197

Please sign in to comment.