[SCM] Socket Wrapper Repository - branch master updated

Andreas Schneider asn at samba.org
Mon Sep 8 14:47:34 UTC 2025


The branch, master has been updated
       via  89f9c3c swrap: Allow to pass 8 fds
      from  ad8ab69 cmake: Remove unneeded policy with cmake 3.10

https://git.samba.org/?p=socket_wrapper.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 89f9c3c62d17116a782728863d038d6c99d49ab4
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Sep 8 16:41:13 2025 +0200

    swrap: Allow to pass 8 fds
    
    Python 3.14 is sending 8 file descriptors around for concurrent code.
    
    SWRAP_ERROR[python3 (54391)] - swrap_sendmsg_unix_scm_rights: cmsg->cmsg_len=48,size_fds_in=32 => num_fds_in=8 > SWRAP_MAX_PASSED_FDS(6)
    
    REASON: Exception: Exception: Traceback (most recent call last):
      File "/builddir/build/BUILD/samba-4.23.0-build/samba-4.23.0rc3/bin/python/samba/tests/docs.py", line 266, in test_default_s3
        self._test_default(['bin/testparm'])
        ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
      File "/builddir/build/BUILD/samba-4.23.0-build/samba-4.23.0rc3/bin/python/samba/tests/docs.py", line 323, in _test_default
        future = executor.submit(check_or_set_smbconf_default, cmdline, self.topdir, param, default)
      File "/usr/lib64/python3.14/concurrent/futures/process.py", line 816, in submit
        self._adjust_process_count()
        ~~~~~~~~~~~~~~~~~~~~~~~~~~^^
      File "/usr/lib64/python3.14/concurrent/futures/process.py", line 775, in _adjust_process_count
        self._spawn_process()
        ~~~~~~~~~~~~~~~~~~~^^
      File "/usr/lib64/python3.14/concurrent/futures/process.py", line 793, in _spawn_process
        p.start()
        ~~~~~~~^^
      File "/usr/lib64/python3.14/multiprocessing/process.py", line 121, in start
        self._popen = self._Popen(self)
                      ~~~~~~~~~~~^^^^^^
      File "/usr/lib64/python3.14/multiprocessing/context.py", line 300, in _Popen
        return Popen(process_obj)
      File "/usr/lib64/python3.14/multiprocessing/popen_forkserver.py", line 35, in __init__
        super().__init__(process_obj)
        ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
      File "/usr/lib64/python3.14/multiprocessing/popen_fork.py", line 20, in __init__
        self._launch(process_obj)
        ~~~~~~~~~~~~^^^^^^^^^^^^^
      File "/usr/lib64/python3.14/multiprocessing/popen_forkserver.py", line 51, in _launch
        self.sentinel, w = forkserver.connect_to_new_process(self._fds)
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
      File "/usr/lib64/python3.14/multiprocessing/forkserver.py", line 113, in connect_to_new_process
        reduction.sendfds(client, allfds)
        ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
      File "/usr/lib64/python3.14/multiprocessing/reduction.py", line 146, in sendfds
        sock.sendmsg([msg], [(socket.SOL_SOCKET, socket.SCM_RIGHTS, fds)])
        ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    OSError: [Errno 22] Invalid argument
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 src/socket_wrapper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index bc4000c..54eb239 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -5634,7 +5634,7 @@ static int swrap_sendmsg_filter_cmsg_sol_socket(const struct cmsghdr *cmsg,
 static const uint64_t swrap_unix_scm_right_magic = 0x8e0e13f27c42fc38;
 
 /*
- * We only allow up to 6 fds at a time
+ * We only allow up to 8 fds at a time
  * as that's more than enough for Samba
  * and it means we can keep the logic simple
  * and work with fixed size arrays.
@@ -5646,7 +5646,7 @@ static const uint64_t swrap_unix_scm_right_magic = 0x8e0e13f27c42fc38;
 #ifndef PIPE_BUF
 #define PIPE_BUF 4096
 #endif
-#define SWRAP_MAX_PASSED_FDS ((size_t)6)
+#define SWRAP_MAX_PASSED_FDS ((size_t)8)
 #define SWRAP_MAX_PASSED_SOCKET_INFO SWRAP_MAX_PASSED_FDS
 struct swrap_unix_scm_rights_payload {
 	uint8_t num_idxs;


-- 
Socket Wrapper Repository



More information about the samba-cvs mailing list