提交 44d8d2b2 编写于 作者: M Michael Tokarev

net/slirp: specify logbase for smbd

It looks like smbd always logs to /var/log/samba/log.$progname
even if config file specifies different logfile -- when it needs
to log something before completing reading the config file.  But
if it can't open it for writing, it fails and exits.  Tell smbd
to use our temp dir as logbase (-l option) to avoid that.

The same option is used by samba3 and samba4, so there should
be no incompatible changes.
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
Reviewed-by: NJan Kiszka <jan.kiszka@siemens.com>
Tested-by: NJan Kiszka <jan.kiszka@siemens.com>
上级 2fd7ae36
......@@ -549,8 +549,8 @@ static int slirp_smb(SlirpState* s, const char *exported_dir,
);
fclose(f);
snprintf(smb_cmdline, sizeof(smb_cmdline), "%s -s %s",
CONFIG_SMBD_COMMAND, smb_conf);
snprintf(smb_cmdline, sizeof(smb_cmdline), "%s -l %s -s %s",
CONFIG_SMBD_COMMAND, s->smb_dir, smb_conf);
if (slirp_add_exec(s->slirp, 0, smb_cmdline, &vserver_addr, 139) < 0 ||
slirp_add_exec(s->slirp, 0, smb_cmdline, &vserver_addr, 445) < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册