Skip to content

Commit

Permalink
portable; fix Linux glibc builds, yet even more syscalls; compat miss…
Browse files Browse the repository at this point in the history
…ing include.
  • Loading branch information
brynet committed Mar 30, 2017
1 parent b45120f commit 6bfcd12
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compat/imsg.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#ifndef _IMSG_H_
#define _IMSG_H_

#include <stdint.h>

#define IBUF_READ_SIZE 65535
#define IMSG_HEADER_SIZE sizeof(struct imsg_hdr)
#define MAX_IMSGSIZE 16384
Expand Down
7 changes: 7 additions & 0 deletions seccomp-sandbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ static const struct sock_filter child_insns[] = {
#ifdef SYS_getpagesize
SC_ALLOW(__NR_getpagesize),
#endif
SC_ALLOW(__NR_getpid),
/*
* Newer glibc versions do ioctl(.., TCGETS) internally.
* OpenBSD 5.8 replaced isatty(3) with a fcntl(2) implementation
* to avoid ioctl(2) calls for libc stdio.
*/
SC_DENY(__NR_ioctl, ENOTTY),
#if defined(SANDBOX_DEBUG)
#ifdef SYS_lseek
SC_ALLOW(__NR_lseek),
Expand Down

0 comments on commit 6bfcd12

Please sign in to comment.