提交 de305b13 编写于 作者: N Nikolaus Rath 提交者: Jan Kiszka

slirp: don't use "smb ports = 0" option

The "smb ports = 0" option causes recent samba versions to crash. It was
introduced in commit 157777ef 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: NNikolaus Rath <Nikolaus@rath.org>
Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
上级 65074706
...@@ -507,7 +507,6 @@ static int slirp_smb(SlirpState* s, const char *exported_dir, ...@@ -507,7 +507,6 @@ static int slirp_smb(SlirpState* s, const char *exported_dir,
fprintf(f, fprintf(f,
"[global]\n" "[global]\n"
"private dir=%s\n" "private dir=%s\n"
"smb ports=0\n"
"socket address=127.0.0.1\n" "socket address=127.0.0.1\n"
"pid directory=%s\n" "pid directory=%s\n"
"lock directory=%s\n" "lock directory=%s\n"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册