aboutsummaryrefslogtreecommitdiff
path: root/net/slirp.c
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.msk.ru>2014-10-25 00:29:50 +0400
committerMichael Tokarev <mjt@tls.msk.ru>2014-11-02 10:04:34 +0300
commit44d8d2b2ddbaa3ee4125ec6cb2e8691e6348b01e (patch)
tree78c3a663245f1a293d47979e38d93999ceb4f842 /net/slirp.c
parent2fd7ae36c5403b14e9c676627a1a0dd2b76b9e1b (diff)
downloadqemu-44d8d2b2ddbaa3ee4125ec6cb2e8691e6348b01e.zip
qemu-44d8d2b2ddbaa3ee4125ec6cb2e8691e6348b01e.tar.gz
qemu-44d8d2b2ddbaa3ee4125ec6cb2e8691e6348b01e.tar.bz2
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: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Tested-by: Jan Kiszka <jan.kiszka@siemens.com>
Diffstat (limited to 'net/slirp.c')
-rw-r--r--net/slirp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/slirp.c b/net/slirp.c
index c171119..920af30 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -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) {