tests: Fix fake socket_wrapper_syscall_valid() master
authorAndreas Schneider <asn@samba.org>
Mon, 7 Aug 2023 12:22:54 +0000 (14:22 +0200)
committerAndreas Schneider <asn@samba.org>
Mon, 7 Aug 2023 12:27:39 +0000 (14:27 +0200)
We want to return errno = ENOSYS in socket_wrapper_syscall_va(). However if we
do not handle __FAKE_SOCKET_WRAPPER_SYSCALL_NO+1 then we will call
libc_syscall() for __FAKE_SOCKET_WRAPPER_SYSCALL_NO+1.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15445
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15448

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

index 657873a76d8e719263305c96f0137a788c4f2d0e..0472b45cff0ed2e1e84fbd70d6c2bdc0bec8b7a6 100644 (file)
@@ -23,7 +23,7 @@
 /* simulate socket_wrapper hooks */
 bool socket_wrapper_syscall_valid(long int sysno)
 {
-       if (sysno == __FAKE_SOCKET_WRAPPER_SYSCALL_NO) {
+       if (sysno >= __FAKE_SOCKET_WRAPPER_SYSCALL_NO) {
                return true;
        }