Closed issue by Anachron on void-packages repository https://github.com/void-linux/void-packages/issues/11570 Description: ### System * xuname: Void 4.19.37_1 aarch64 uptodate rFF * package: samba-3.6.25_14 ### Expected behavior Samba shares to be able to be mounted. ### Actual behavior ``` [rpi@void-rpi3 ~]$ smbclient -L localhost -U media Enter media's password: Domain=[RPI-WG] OS=[Unix] Server=[Samba 3.6.25] tree connect failed: NT_STATUS_PIPE_BROKEN ``` There is also a new core dump for every connect in `/var/log/samba/cores/smbd/core.`. Error-Log in /var/log/samba/samba.log (LogLevel=3): ``` [2019/05/08 21:31:43.477457, 3] param/loadparm.c:9572(lp_load_ex) lp_load_ex: refreshing parameters [2019/05/08 21:31:43.477831, 3] param/loadparm.c:5192(init_globals) Initialising global parameters [2019/05/08 21:31:43.478006, 2] param/loadparm.c:4985(max_open_files) rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384) [2019/05/08 21:31:43.478391, 3] ../lib/util/params.c:550(pm_process) params.c:pm_process() - Processing configuration file "/etc/samba/smb.conf" [2019/05/08 21:31:43.478574, 3] param/loadparm.c:8310(do_section) Processing section "[global]" [2019/05/08 21:31:43.478810, 2] param/loadparm.c:8327(do_section) Processing section "[media]" [2019/05/08 21:31:43.479432, 3] param/loadparm.c:6630(lp_add_ipc) adding IPC service [2019/05/08 21:31:43.480536, 2] lib/interface.c:341(add_interface) added interface eth0 ip= bcast= netmask= [2019/05/08 21:31:43.480722, 2] lib/interface.c:341(add_interface) added interface eth0 ip= bcast= netmask= [2019/05/08 21:31:43.480870, 2] lib/interface.c:341(add_interface) added interface eth0 ip= bcast= netmask= [2019/05/08 21:31:43.481065, 2] lib/interface.c:341(add_interface) added interface eth0 ip=192.168.2.108 bcast=192.168.2.255 netmask=255.255.255.0 [2019/05/08 21:31:43.481360, 3] smbd/server.c:1107(main) loaded services [2019/05/08 21:31:43.481754, 0] smbd/server.c:1128(main) standard input is not a socket, assuming -D option [2019/05/08 21:31:43.482319, 3] smbd/server.c:1139(main) Becoming a daemon. [2019/05/08 21:31:43.496122, 3] auth/token_util.c:438(finalize_local_nt_token) Failed to fetch domain sid for RPI-WG [2019/05/08 21:31:43.496595, 3] auth/token_util.c:469(finalize_local_nt_token) Failed to fetch domain sid for RPI-WG [2019/05/08 21:31:43.499000, 3] auth/token_util.c:438(finalize_local_nt_token) Failed to fetch domain sid for RPI-WG [2019/05/08 21:31:43.499473, 3] auth/token_util.c:469(finalize_local_nt_token) Failed to fetch domain sid for RPI-WG [2019/05/08 21:31:43.502537, 3] rpc_server/svcctl/srv_svcctl_reg.c:565(svcctl_init_winreg) Initialise the svcctl registry keys if needed. [2019/05/08 21:31:43.507904, 3] rpc_server/rpc_handles.c:281(close_policy_hnd) Closed policy [2019/05/08 21:31:43.508913, 3] rpc_server/rpc_handles.c:281(close_policy_hnd) Closed policy [2019/05/08 21:31:43.510071, 3] rpc_server/rpc_handles.c:281(close_policy_hnd) Closed policy [2019/05/08 21:31:43.510887, 3] rpc_server/rpc_handles.c:281(close_policy_hnd) Closed policy [2019/05/08 21:31:43.512355, 3] rpc_server/rpc_handles.c:281(close_policy_hnd) Closed policy [2019/05/08 21:31:43.513190, 3] rpc_server/rpc_handles.c:281(close_policy_hnd) Closed policy [2019/05/08 21:31:43.514336, 3] rpc_server/rpc_handles.c:281(close_policy_hnd) Closed policy [2019/05/08 21:31:43.515193, 3] rpc_server/rpc_handles.c:281(close_policy_hnd) Closed policy [2019/05/08 21:31:43.515383, 3] rpc_server/rpc_handles.c:281(close_policy_hnd) Closed policy [2019/05/08 21:31:43.515692, 3] rpc_server/eventlog/srv_eventlog_reg.c:59(eventlog_init_winreg) Initialise the eventlog registry keys if needed. [2019/05/08 21:31:43.516849, 3] rpc_server/rpc_handles.c:281(close_policy_hnd) Closed policy [2019/05/08 21:31:43.517354, 3] printing/printing.c:1750(start_background_queue) start_background_queue: Starting background LPQ thread [2019/05/08 21:31:43.520135, 3] ../lib/util/util_net.c:70(interpret_string_addr_internal) interpret_string_addr_internal: getaddrinfo failed for name :: [Unknown server error] [2019/05/08 21:31:43.520593, 3] ../lib/util/util_net.c:70(interpret_string_addr_internal) interpret_string_addr_internal: getaddrinfo failed for name :: [Unknown server error] [2019/05/08 21:31:43.521591, 3] printing/pcap.c:138(pcap_cache_reload) reloading printcap cache [2019/05/08 21:31:43.522663, 2] smbd/server.c:861(smbd_parent_loop) waiting for connections [2019/05/08 21:31:43.525005, 3] printing/pcap.c:189(pcap_cache_reload) reload status: ok [2019/05/08 21:31:43.528433, 0] printing/print_cups.c:151(cups_connect) Unable to connect to CUPS server /var/run/cups/cups.sock:631 - Bad file descriptor [2019/05/08 21:31:43.529548, 0] printing/print_cups.c:528(cups_async_callback) failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL [2019/05/08 21:32:12.165938, 3] lib/access.c:338(allow_access) Allowed connection from 127.0.0.1 (127.0.0.1) [2019/05/08 21:32:12.166463, 3] smbd/oplock.c:922(init_oplocks) init_oplocks: initializing messages. [2019/05/08 21:32:12.167165, 3] smbd/process.c:1609(process_smb) Transaction 0 of length 194 (0 toread) [2019/05/08 21:32:12.167358, 3] smbd/process.c:1414(switch_message) switch message SMBnegprot (pid 1150) conn 0x0 [2019/05/08 21:32:12.171805, 3] smbd/negprot.c:598(reply_negprot) Requested protocol [PC NETWORK PROGRAM 1.0] [2019/05/08 21:32:12.172215, 3] smbd/negprot.c:598(reply_negprot) Requested protocol [MICROSOFT NETWORKS 1.03] [2019/05/08 21:32:12.172406, 3] smbd/negprot.c:598(reply_negprot) Requested protocol [MICROSOFT NETWORKS 3.0] [2019/05/08 21:32:12.172569, 3] smbd/negprot.c:598(reply_negprot) Requested protocol [LANMAN1.0] [2019/05/08 21:32:12.172717, 3] smbd/negprot.c:598(reply_negprot) Requested protocol [LM1.2X002] [2019/05/08 21:32:12.172862, 3] smbd/negprot.c:598(reply_negprot) Requested protocol [DOS LANMAN2.1] [2019/05/08 21:32:12.173065, 3] smbd/negprot.c:598(reply_negprot) Requested protocol [LANMAN2.1] [2019/05/08 21:32:12.173223, 3] smbd/negprot.c:598(reply_negprot) Requested protocol [Samba] [2019/05/08 21:32:12.173366, 3] smbd/negprot.c:598(reply_negprot) Requested protocol [NT LANMAN 1.0] [2019/05/08 21:32:12.173521, 3] smbd/negprot.c:598(reply_negprot) Requested protocol [NT LM 0.12] [2019/05/08 21:32:12.174222, 3] smbd/negprot.c:419(reply_nt1) using SPNEGO [2019/05/08 21:32:12.174378, 3] smbd/negprot.c:704(reply_negprot) Selected protocol NT LANMAN 1.0 [2019/05/08 21:32:12.176319, 3] smbd/process.c:1609(process_smb) Transaction 1 of length 166 (0 toread) [2019/05/08 21:32:12.176625, 3] smbd/process.c:1414(switch_message) switch message SMBsesssetupX (pid 1150) conn 0x0 [2019/05/08 21:32:12.176866, 3] smbd/sesssetup.c:1345(reply_sesssetup_and_X) wct=12 flg2=0xc801 [2019/05/08 21:32:12.177114, 3] smbd/sesssetup.c:1072(reply_sesssetup_and_X_spnego) Doing spnego session setup [2019/05/08 21:32:12.177281, 3] smbd/sesssetup.c:1114(reply_sesssetup_and_X_spnego) NativeOS=[Unix] NativeLanMan=[Samba] PrimaryDomain=[] [2019/05/08 21:32:12.177564, 3] smbd/sesssetup.c:660(reply_spnego_negotiate) reply_spnego_negotiate: Got secblob of size 47 [2019/05/08 21:32:12.199147, 3] ../lib/util/util_net.c:70(interpret_string_addr_internal) interpret_string_addr_internal: getaddrinfo failed for name void-rpi3 [Unknown host] [2019/05/08 21:32:12.199555, 3] lib/util_sock.c:1434(get_mydnsfullname) get_mydnsfullname: getaddrinfo failed for name void-rpi3 [Unknown server error] [2019/05/08 21:32:12.216440, 3] ../lib/util/util_net.c:70(interpret_string_addr_internal) interpret_string_addr_internal: getaddrinfo failed for name void-rpi3 [Unknown host] [2019/05/08 21:32:12.216736, 3] lib/util_sock.c:1434(get_mydnsfullname) get_mydnsfullname: getaddrinfo failed for name void-rpi3 [Unknown server error] [2019/05/08 21:32:12.217212, 3] ../libcli/auth/ntlmssp.c:34(debug_ntlmssp_flags) Got NTLMSSP neg_flags=0x60088215 [2019/05/08 21:32:12.218578, 3] smbd/process.c:1609(process_smb) Transaction 2 of length 342 (0 toread) [2019/05/08 21:32:12.218833, 3] smbd/process.c:1414(switch_message) switch message SMBsesssetupX (pid 1150) conn 0x0 [2019/05/08 21:32:12.219107, 3] smbd/sesssetup.c:1345(reply_sesssetup_and_X) wct=12 flg2=0xc801 [2019/05/08 21:32:12.219271, 3] smbd/sesssetup.c:1072(reply_sesssetup_and_X_spnego) Doing spnego session setup [2019/05/08 21:32:12.219424, 3] smbd/sesssetup.c:1114(reply_sesssetup_and_X_spnego) NativeOS=[Unix] NativeLanMan=[Samba] PrimaryDomain=[] [2019/05/08 21:32:12.219647, 3] ../libcli/auth/ntlmssp_server.c:348(ntlmssp_server_preauth) Got user=[media] domain=[RPI-WG] workstation=[VOID-RPI3] len1=24 len2=100 [2019/05/08 21:32:12.220167, 3] auth/auth.c:219(check_ntlm_password) check_ntlm_password: Checking password for unmapped user [RPI-WG]\[media]@[VOID-RPI3] with the new password interface [2019/05/08 21:32:12.220334, 3] auth/auth.c:222(check_ntlm_password) check_ntlm_password: mapped user is: [VOID-RPI3]\[media]@[VOID-RPI3] [2019/05/08 21:32:12.221607, 3] passdb/lookup_sid.c:1754(get_primary_group_sid) Forcing Primary Group to 'Domain Users' for media [2019/05/08 21:32:12.223126, 3] auth/auth.c:268(check_ntlm_password) check_ntlm_password: sam authentication for user [media] succeeded [2019/05/08 21:32:12.223357, 2] auth/auth.c:309(check_ntlm_password) check_ntlm_password: authentication for user [media] -> [media] -> [media] succeeded [2019/05/08 21:32:12.223837, 3] auth/token_util.c:438(finalize_local_nt_token) Failed to fetch domain sid for RPI-WG [2019/05/08 21:32:12.224298, 3] auth/token_util.c:469(finalize_local_nt_token) Failed to fetch domain sid for RPI-WG [2019/05/08 21:32:12.227534, 3] ../libcli/auth/ntlmssp_sign.c:535(ntlmssp_sign_init) NTLMSSP Sign/Seal - Initialising with flags: [2019/05/08 21:32:12.227699, 3] ../libcli/auth/ntlmssp.c:34(debug_ntlmssp_flags) Got NTLMSSP neg_flags=0x60088215 [2019/05/08 21:32:12.227885, 3] smbd/password.c:298(register_existing_vuid) register_existing_vuid: User name: media Real name: [2019/05/08 21:32:12.228081, 3] smbd/password.c:308(register_existing_vuid) register_existing_vuid: UNIX uid 1001 is UNIX user media, and will be vuid 100 [2019/05/08 21:32:12.229234, 3] smbd/password.c:224(register_homes_share) Using static (or previously created) service for user 'media'; path = '/data/media' [2019/05/08 21:32:12.230681, 3] smbd/process.c:1609(process_smb) Transaction 3 of length 88 (0 toread) [2019/05/08 21:32:12.230994, 3] smbd/process.c:1414(switch_message) switch message SMBtconX (pid 1150) conn 0x0 [2019/05/08 21:32:12.231361, 3] lib/access.c:338(allow_access) Allowed connection from 127.0.0.1 (127.0.0.1) [2019/05/08 21:32:12.231598, 3] smbd/service.c:872(make_connection_snum) Connect path is '/tmp' for service [IPC$] [2019/05/08 21:32:12.231841, 3] smbd/vfs.c:102(vfs_init_default) Initialising default vfs hooks [2019/05/08 21:32:12.231995, 3] smbd/vfs.c:128(vfs_init_custom) Initialising custom vfs hooks from [/[Default VFS]/] [2019/05/08 21:32:12.233253, 0] lib/util_sec.c:118(assert_gid) Failed to set gid privileges to (-1,1001) now set to (0,0) uid=(0,0) [2019/05/08 21:32:12.233899, 0] lib/util.c:1117(smb_panic) PANIC (pid 1150): failed to set gid [2019/05/08 21:32:12.251179, 0] lib/util.c:1221(log_stack_trace) BACKTRACE: 22 stack frames: #0 smbd(log_stack_trace+0x40) [0x5583d4d1e0] #1 smbd(smb_panic+0x28) [0x5583d4d2e0] #2 smbd(+0x407bd0) [0x5583d53bd0] #3 smbd(+0x15baa4) [0x5583aa7aa4] #4 smbd(set_sec_ctx+0x94) [0x5583aa7f9c] #5 smbd(+0x14ad60) [0x5583a96d60] #6 smbd(+0x171fb0) [0x5583abdfb0] #7 smbd(+0x172a28) [0x5583abea28] #8 smbd(make_connection+0x1fc) [0x5583abeddc] #9 smbd(reply_tcon_and_X+0x224) [0x5583a7506c] #10 smbd(+0x16e1c4) [0x5583aba1c4] #11 smbd(+0x16e658) [0x5583aba658] #12 smbd(+0x16eb00) [0x5583abab00] #13 smbd(run_events_poll+0x2f8) [0x5583d5d608] #14 smbd(smbd_process+0x954) [0x5583abc1fc] #15 smbd(+0x65f8dc) [0x5583fab8dc] #16 smbd(run_events_poll+0x2f8) [0x5583d5d608] #17 smbd(+0x411840) [0x5583d5d840] #18 smbd(_tevent_loop_once+0x88) [0x5583facb00] #19 smbd(main+0x1060) [0x5583a42880] #20 /usr/lib/libc.so.6(__libc_start_main+0xe4) [0x7f942612a4] #21 smbd(+0xf6b48) [0x5583a42b48] [2019/05/08 21:32:12.256220, 0] lib/fault.c:372(dump_core) dumping core in /var/log/samba/cores/smbd [2019/05/08 21:32:12.306444, 3] smbd/server.c:359(remove_child_pid) smbd/server.c:359 Unclean shutdown of pid 1150 [2019/05/08 21:32:12.306885, 1] smbd/server.c:367(remove_child_pid) Scheduled cleanup of brl and lock database after unclean shutdown [2019/05/08 21:32:32.327466, 1] smbd/server.c:320(cleanup_timeout_fn) Cleaning up brl and lock database after unclean shutdown [2019/05/08 21:32:43.537601, 3] printing/printing.c:1689(printer_housekeeping_fn) Printcap cache time expired. [2019/05/08 21:32:43.537917, 3] printing/pcap.c:138(pcap_cache_reload) reloading printcap cache [2019/05/08 21:32:43.540339, 3] printing/pcap.c:189(pcap_cache_reload) reload status: ok [2019/05/08 21:32:43.543576, 0] printing/print_cups.c:151(cups_connect) Unable to connect to CUPS server /var/run/cups/cups.sock:631 - Bad file descriptor [2019/05/08 21:32:43.544505, 0] printing/print_cups.c:528(cups_async_callback) failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL ``` ### Steps to reproduce the behavior 1. Install `samba`, `smbclient` 2. Setup a minimal `/etc/samba/smb.conf` 3. Create a testuser both on linux and samba (`useradd` & `smbpasswd`) 4. Try to connect locally via `smbclient -L localhost -U ` 5. Receive error above