aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorNikolaus Rath <Nikolaus@rath.org>2012-04-25 18:51:27 -0400
committerJan Kiszka <jan.kiszka@siemens.com>2012-05-01 19:08:44 -0300
commitde305b1387dad4473ae4cec48467d10d949e0f10 (patch)
treeb52e6efe83298465cf8bfd1e933d59dbbef3e79e /net
parent65074706b9353bae7307fcfcbbf63a36f6896aa7 (diff)
downloadqemu-de305b1387dad4473ae4cec48467d10d949e0f10.zip
qemu-de305b1387dad4473ae4cec48467d10d949e0f10.tar.gz
qemu-de305b1387dad4473ae4cec48467d10d949e0f10.tar.bz2
slirp: don't use "smb ports = 0" option
The "smb ports = 0" option causes recent samba versions to crash. It was introduced in commit 157777ef3e with log message "Samba 3 support". However, a value of 0 has never been officially supported by smb and is also not necessary: if stdin is a socket, smb does not try to listen on any ports and uses just stdin. This is necessary to support inetd based operation (otherwise smbd would always fail when called from inetd, because inetd already listens on the SMB port). Since samba has supported inetd operation since pre-3.x, it should be safe to rely on this feature. I have tested it with Samba 3.6.4 -- communication works fine, and smbd is not listening on any ports. I suspect the "smb ports = 0" hack may have been introduced when someone tested the qemu generated samba config from the command line with "smbd -i" and found it to fail (because then stdin isn't a socket). Signed-off-by: Nikolaus Rath <Nikolaus@rath.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Diffstat (limited to 'net')
-rw-r--r--net/slirp.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/slirp.c b/net/slirp.c
index 18e07ba..f49043b 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -507,7 +507,6 @@ static int slirp_smb(SlirpState* s, const char *exported_dir,
fprintf(f,
"[global]\n"
"private dir=%s\n"
- "smb ports=0\n"
"socket address=127.0.0.1\n"
"pid directory=%s\n"
"lock directory=%s\n"