samba-4.18.0 and above causes pyenv (https://github.com/pyenv/pyenv) to fail with `Bad file descriptor` error while trying to build a python version. This behavior seems similar to the bug reported here (https://bugzilla.samba.org/show_bug.cgi?id=15464). This bug was experienced on a WSL instance installed with 'samba-4.18.6-3.el8_9.x86_64' and domain joined. The issue with pyenv is no more experienced if a samba version lower than 4.18.0 is installed on the system or ‘winbind’ entry against `passwd` is removed from `/etc/nsswitch.conf`. This behavior is also discussed here, https://github.com/pyenv/pyenv/issues/2895. Not exactly sure if this is still directly related to something that didn’t got fixed as part of https://bugzilla.samba.org/show_bug.cgi?id=15464 or it is a different bug in its entirety but it needs to be investigated and fixed. Workaround: 1) Everything works fine once samba is downgraded to 4.17.5 or winbind entry against passwd in /etc/nsswitch.conf is removed. Environment: -- > Windows SubSystem for Linux (WSL2) instance domain joined running rocky 'Rocky Linux release 8.9 (Green Obsidian)'. --> pyenv version 2.4.0 installed. --> samba (samba-4.18.6-3.el8_9.x86_64) (also tried 4.19.4). Steps to reproduce: 1) WSL2 running Rocky Linux 8 samba domain joined instance. 2) Install pyenv and try running `pyenv install 3.12` 3) Once Python has been downloaded and pyenv initiates the build, it fails with: ''' $ ./python-build 3.12.1 /tmp/foo Downloading Python-3.12.1.tar.xz... -> https://www.python.org/ftp/python/3.12.1/Python-3.12.1.tar.xz Installing Python-3.12.1... BUILD FAILED (Rocky Linux 8.9 using python-build 20180424) Inspect or clean up the working tree at /tmp/python-build.20240424115224.79814 Results logged to /tmp/python-build.20240424115224.79814.log Last 10 log lines: ./configure: line 5085: 5: Bad file descriptor ./configure: line 5085: 5: Bad file descriptor ./configure: line 5085: 5: Bad file descriptor ./configure: line 5085: 5: Bad file descriptor checking whether the C compiler works... ./configure: line 5171: 5: Bad file descriptor no ./configure: line 5177: 5: Bad file descriptor configure: error: in `/tmp/python-build.20240424115224.79814/Python-3.12.1': configure: error: C compiler cannot create executables See `config.log' for more details '''