[PATCH] system: change our notification fd handling
authorPaul Moore <paul@paul-moore.com>
Tue, 4 Aug 2020 14:52:08 +0000 (10:52 -0400)
committerFelix Geyer <fgeyer@debian.org>
Sun, 8 Nov 2020 18:59:21 +0000 (18:59 +0000)
commit572014c8befe7e5607b2582dde1075b026bcb816
tree1b6daa9c717270a2c2168ac4a306ea68b8b8f84b
parentca05f27cbccefc460e1059dae0b34edda0ca2833
[PATCH] system: change our notification fd handling

This commit changes how we handle the notification fd by only
requesting it via _NEW_LISTENER if the filter has a _NOTIFY action
in it.  We also augment the seccomp_reset(NULL, ...) behavior so
that it closes the notification fd before resetting the global
state; applications that need to keep their notification fd open
across a call to seccomp_reset(NULL, ...) can simply dup() it.
Although one would have to wonder why the application would be
calling seccomp_reset(NULL, ...) in that case.

Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
(imported from commit 02812f99e8d1df2e671dac675b4af663d0266303)

Gbp-Pq: Name system_change_our_notification_fd_handling.patch
doc/man/man3/seccomp_init.3
src/system.c