From: Jan Kiszka <jan.kiszka@web.de>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [PATCH] net/slirp: specify logbase for smbd
Date: Sat, 25 Oct 2014 09:18:17 +0200 [thread overview]
Message-ID: <544B4EB9.9030600@web.de> (raw)
In-Reply-To: <1414183045-14741-1-git-send-email-mjt@msgid.tls.msk.ru>
[-- Attachment #1: Type: text/plain, Size: 1380 bytes --]
On 2014-10-24 22:37, Michael Tokarev wrote:
> 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>
> ---
> net/slirp.c | 4 ++--
> 1 file 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) {
>
Cool, works for me as well!
Reviewed-and-tested-by: Jan Kiszka <jan.kiszka@siemens.com>
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Jan Kiszka <jan.kiszka@web.de>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] net/slirp: specify logbase for smbd
Date: Sat, 25 Oct 2014 09:18:17 +0200 [thread overview]
Message-ID: <544B4EB9.9030600@web.de> (raw)
In-Reply-To: <1414183045-14741-1-git-send-email-mjt@msgid.tls.msk.ru>
[-- Attachment #1: Type: text/plain, Size: 1380 bytes --]
On 2014-10-24 22:37, Michael Tokarev wrote:
> 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>
> ---
> net/slirp.c | 4 ++--
> 1 file 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) {
>
Cool, works for me as well!
Reviewed-and-tested-by: Jan Kiszka <jan.kiszka@siemens.com>
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2014-10-25 7:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 20:37 [Qemu-trivial] [PATCH] net/slirp: specify logbase for smbd Michael Tokarev
2014-10-24 20:37 ` [Qemu-devel] " Michael Tokarev
2014-10-25 7:18 ` Jan Kiszka [this message]
2014-10-25 7:18 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=544B4EB9.9030600@web.de \
--to=jan.kiszka@web.de \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.