sandbox/seccomp: fake close(2) return value

Some errors will cause the XMPP file descriptor to be closed before
xmppipe exits. Return EBADF if close is called since the process will
terminate anyway.
pull/1/head
Michael Santos 7 years ago
parent f51377428f
commit 6c4a14c712

@ -90,6 +90,9 @@ xmppipe_sandbox_init(xmppipe_state_t *state)
#ifdef __NR_open
SC_DENY(open, EACCES),
#endif
#ifdef __NR_close
SC_DENY(close, EBADF),
#endif
/* Syscalls to allow */
#ifdef __NR_brk

Loading…
Cancel
Save