src/socket_wrapper.c: export socket_wrapper_syscall_{valid,va}()
authorStefan Metzmacher <metze@samba.org>
Mon, 16 Jan 2023 18:48:57 +0000 (19:48 +0100)
committerAndreas Schneider <asn@samba.org>
Tue, 17 Jan 2023 16:49:01 +0000 (17:49 +0100)
commit1b8d5d8c6e0bd56ec4883e2b09f4f2cedd3aa1d7
tree74d6af9a83a5a4e9f3f09381e96a217c778835b3
parent79ce9b9b14ac83a33712d6af4eecdb63bba45742
src/socket_wrapper.c: export socket_wrapper_syscall_{valid,va}()

We need to hook into syscall() from socket_wrapper as well as
from uid_wrapper() (and maybe others in future).
But the assumption is that only one wrapper will take care
of a single syscall number.

So we provide socket_wrapper_syscall_valid() in order to allow
external consumers (e.g. uid_wrapper.so) to check if
socket_wrapper wants to handle a specified syscall number.

And we provide socket_wrapper_syscall_va() in order to allow
calling into swrap_syscall().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
src/socket_wrapper.c