Hello, The qemu emulator has a feature to fork a samba instance for file sharing with the emulated hosts. It communicates with smbd over stdin. The generated configuration file contains a "smb ports = 0" directive to prevent smbd from listening to any ports. Unfortunately, with at least Samba 3.6.4 this causes a segfault instead: [0] vostro:/tmp/qemu-smb.6836-0# smbd -i -s smb.conf Unable to setup corepath for smbd: Operation not permitted smbd version 3.6.4 started. Copyright Andrew Tridgell and the Samba Team 1992-2011 open_sockets_smbd: No sockets available to bind to. ==============================================================Abnormal server exit: open_sockets_smbd() failed ==============================================================BACKTRACE: 6 stack frames: #0 smbd(log_stack_trace+0x1a) [0x7fe50c14f8ba] #1 smbd(+0x6a0743) [0x7fe50c3bd743] #2 smbd(+0x6a0a41) [0x7fe50c3bda41] #3 smbd(main+0xa52) [0x7fe50be26d42] #4 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7fe508ac0ead] #5 smbd(+0x10a6b9) [0x7fe50be276b9] Also, there is some confusion as to whether this option was actually ever necessary. Could someone clarify if something like this is still needed, or if Samba does the right think automatically? In the later case, has this always been the case or was it introduced in a specific version (and the "smb ports = 0" required before)? Thanks, -Nikolaus -- ?Time flies like an arrow, fruit flies like a Banana.? PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
On Wed, Apr 25, 2012 at 10:04:30AM -0400, Nikolaus Rath wrote:> Hello, > > The qemu emulator has a feature to fork a samba instance for file > sharing with the emulated hosts. It communicates with smbd over stdin. > The generated configuration file contains a "smb ports = 0" directive to > prevent smbd from listening to any ports. > > Unfortunately, with at least Samba 3.6.4 this causes a segfault > instead: > > [0] vostro:/tmp/qemu-smb.6836-0# smbd -i -s smb.conf > Unable to setup corepath for smbd: Operation not permitted > smbd version 3.6.4 started. > Copyright Andrew Tridgell and the Samba Team 1992-2011 > open_sockets_smbd: No sockets available to bind to. > ==============================================================> Abnormal server exit: open_sockets_smbd() failed > ==============================================================> BACKTRACE: 6 stack frames: > #0 smbd(log_stack_trace+0x1a) [0x7fe50c14f8ba] > #1 smbd(+0x6a0743) [0x7fe50c3bd743] > #2 smbd(+0x6a0a41) [0x7fe50c3bda41] > #3 smbd(main+0xa52) [0x7fe50be26d42] > #4 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7fe508ac0ead] > #5 smbd(+0x10a6b9) [0x7fe50be276b9] > > > Also, there is some confusion as to whether this option was actually > ever necessary. > > Could someone clarify if something like this is still needed, or if > Samba does the right think automatically? In the later case, has this > always been the case or was it introduced in a specific version (and the > "smb ports = 0" required before)?If you remove the "smb ports = 0" value does the started Samba bind to any interfaces ? Jeremy.
On Wed, Apr 25, 2012 at 10:04:30AM -0400, Nikolaus Rath wrote:> Hello, > > The qemu emulator has a feature to fork a samba instance for file > sharing with the emulated hosts. It communicates with smbd over stdin. > The generated configuration file contains a "smb ports = 0" directive to > prevent smbd from listening to any ports. > > Unfortunately, with at least Samba 3.6.4 this causes a segfault > instead: > > [0] vostro:/tmp/qemu-smb.6836-0# smbd -i -s smb.conf > Unable to setup corepath for smbd: Operation not permitted > smbd version 3.6.4 started. > Copyright Andrew Tridgell and the Samba Team 1992-2011 > open_sockets_smbd: No sockets available to bind to. > ==============================================================> Abnormal server exit: open_sockets_smbd() failed > ==============================================================> BACKTRACE: 6 stack frames: > #0 smbd(log_stack_trace+0x1a) [0x7fe50c14f8ba] > #1 smbd(+0x6a0743) [0x7fe50c3bd743] > #2 smbd(+0x6a0a41) [0x7fe50c3bda41] > #3 smbd(main+0xa52) [0x7fe50be26d42] > #4 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7fe508ac0ead] > #5 smbd(+0x10a6b9) [0x7fe50be276b9] > > > Also, there is some confusion as to whether this option was actually > ever necessary. > > Could someone clarify if something like this is still needed, or if > Samba does the right think automatically? In the later case, has this > always been the case or was it introduced in a specific version (and the > "smb ports = 0" required before)?In fack looking at the current code in v3-6-test, so long as you ensure that you run without the '-D' (deamonize) option, and fd 0 is a socket (we use getsockopt(fd, SOL_SOCKET, SO_TYPE...) to detect this) then we'll go into 'inetd' mode, which I think is what you want. Jeremy.
On 04/26/2012 09:09 PM, Jeremy Allison wrote:> On Wed, Apr 25, 2012 at 10:04:30AM -0400, Nikolaus Rath wrote: >> Hello, >> >> The qemu emulator has a feature to fork a samba instance for file >> sharing with the emulated hosts. It communicates with smbd over stdin. >> The generated configuration file contains a "smb ports = 0" directive to >> prevent smbd from listening to any ports. >> >> Unfortunately, with at least Samba 3.6.4 this causes a segfault >> instead: >> >> [0] vostro:/tmp/qemu-smb.6836-0# smbd -i -s smb.conf >> Unable to setup corepath for smbd: Operation not permitted >> smbd version 3.6.4 started. >> Copyright Andrew Tridgell and the Samba Team 1992-2011 >> open_sockets_smbd: No sockets available to bind to. >> ==============================================================>> Abnormal server exit: open_sockets_smbd() failed >> ==============================================================>> BACKTRACE: 6 stack frames: >> #0 smbd(log_stack_trace+0x1a) [0x7fe50c14f8ba] >> #1 smbd(+0x6a0743) [0x7fe50c3bd743] >> #2 smbd(+0x6a0a41) [0x7fe50c3bda41] >> #3 smbd(main+0xa52) [0x7fe50be26d42] >> #4 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7fe508ac0ead] >> #5 smbd(+0x10a6b9) [0x7fe50be276b9] >> >> >> Also, there is some confusion as to whether this option was actually >> ever necessary. >> >> Could someone clarify if something like this is still needed, or if >> Samba does the right think automatically? In the later case, has this >> always been the case or was it introduced in a specific version (and the >> "smb ports = 0" required before)? > > If you remove the "smb ports = 0" value does the started Samba > bind to any interfaces ?No, with Samba 3.6.4 it does not listen anywhere. So this has always been the case? Best, -Nikolaus -- ?Time flies like an arrow, fruit flies like a Banana.? PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
Possibly Parallel Threads
- Subnet specification for tinc node as default gateway
- Failed to set socket option SO_KEEPALIVE (Error Invalid argument) error on Samba 3.0.10 on Solaris 8
- [SFTP] Read from write-only file not returning error
- Samba performance issue
- Why smbd (version 4.1.0) uses source3/smbd/server.c not source4/smbd/server.c