include "common.chasc.expanded"

# signal handling
ifeqdef SYS_rt_sigreturn allow 	# newer kernels have this instead of sigreturn
ifeqdef SYS_sigreturn allow	# called by signal trampoline

# serializing blob requires dup
#TODO sending blob to buffer is not the best idea in the first place
ifeqdef SYS_dup allow

# network; note that we don't call send/recv in buffer
ifeqdef SYS_recvmsg allow
ifeqdef SYS_sendmsg allow
ifdef SYS_socketcall
ifne SYS_socketcall not_socketcall
load args[0]
ifeq 13 allow			# shutdown
ifeq 16 allow			# sendmsg
ifeq 17 allow			# recvmsg
: not_socketcall
endif
# warning: nr is no longer loaded here

: deny
ret trap
: kill
ret kill
: eperm
ret errno EPERM
: allow
ret allow
