All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henrik Carlqvist <hc981@poolhem.se>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: hc981@poolhem.se, samuel.thibault@gnu.org, qemu-devel@nongnu.org
Subject: Re: Ping 2: [PATCH v2] Allowing setting and overriding parameters in smb.conf
Date: Sun, 18 Feb 2024 15:55:03 +0100	[thread overview]
Message-ID: <20240218155503.7d52a2f9.hc981@poolhem.se> (raw)
In-Reply-To: <727be4d0-3c88-4d02-b3ba-82a532fad840@tls.msk.ru>

On Sun, 18 Feb 2024 12:30:01 +0300
Michael Tokarev <mjt@tls.msk.ru> wrote:
> I don't maintain this code, so my email is just a random comment.

Thanks for your comment anyway!

> But I did have an issue with smbd not working right due to one
> missing/wrong parameter or another, more than once.  Also, samba
> is evolving too, so it might need more parameters or less.

During the years, my brute force approach to solve issues like this has been
to locally patch qemu source code to build custom qemu binaries with the
smb.conf parameters that I want. 

> My suggestion is still the same as 10+ years ago: to ship a shell script
> which run smbd, instead of running smbd directly.  This script will set
> up smb.conf (whole thing, exactly as it is done now in the C code), and
> exec /usr/sbin/smbd with the necessary args.

Such a script would be easier to modify than changing the C sources.

> This way, it's a) trivial to modify parameters on the qemu side (easy to
> edit just this script), b) possible to see which samba version is in use
> and adopt some parameters, c) use alternative smbd, and especially d)
> allow the end-user to override smbd or config in use.

During the years, I have also seen the need to use alternative smbd. I have
then solved it by having the old smbd that I prefered for qemu in /usr/sbin
and moved the "original" smbd provided by the Linux distribution to
/usr/local/sbin where it has been started by any real Samba servers in the
network.

> The best, I'd say, is to allow to specify the script on qemu command line
> (like samba=/etc/qemu/run-smbd.sh), and have default value for that, like
> /usr/share/qemu/run-smbd.sh, which is the default script shipped with
> qemu.  Or maybe let qemu choose to use either the one specified on the
> command line, /etc/qemu/run-smbd.sh if it exists, or
> /usr/share/qemu/run-smbd.sh.

Yes, by specifying such a script on the command line it would be possible to
have different parameters for different qemu sessions.  However, I think that
also my solution allowing settings of samba parameters fixes most of the
problems in a way which most of the times will be easier to use. 

Usually, there is no need to modify more than a handfull of parameters so
those extra arguments to the qemu command line will be less to write than a
separate script starting samba. In my experience qemu is mostly started from a
script with a rather long qemu command line anyway.

The remaining problem is when Samba comes with a new version which requires
new settings of parameters. Regardless of solution some script will need to be
modified to solve that problem.

Again, thanks for your comment! I hope that someone will consider my patch or
your suggestion. The next thing to look into would be the possibility to start
some userspace NFS daemon as an alternative to Samba as Unix-guests works
better with NFS than CIFS. However, that would be a much bigger project and I
won't dig into such a thing until I have gotten any response on this small
patch.

regards Henrik


  reply	other threads:[~2024-02-18 14:58 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-07  2:37 [PATCH qemu v3 0/1] [PATCH v3] Emulate dip switch language layout settings on SUN keyboard ~henca
2023-01-06 21:33 ` [PATCH qemu v3 1/1] Emulating sun keyboard language layout dip switches, taking the value for the dip switches from the "-k" option to qemu ~henca
2023-01-10 23:08   ` Mark Cave-Ayland
2023-01-23 19:09     ` [PATCH v5] Emulate dip switch language layout settings on SUN keyboard Henrik Carlqvist
2023-03-04 21:07       ` Henrik Carlqvist
2023-03-28 14:01         ` Daniel P. Berrangé
2023-03-28 17:19           ` Henrik Carlqvist
2023-03-28 17:59             ` Daniel P. Berrangé
2023-03-28 20:16               ` Henrik Carlqvist
2023-04-30 20:55                 ` [PATCH v6] " Henrik Carlqvist
2023-06-08 16:14                   ` Ping: " Henrik Carlqvist
2023-06-10  7:06                     ` Mark Cave-Ayland
2023-06-10 10:29                       ` Henrik Carlqvist
2023-06-10 23:47                         ` [PATCH v7] " Henrik Carlqvist
2023-06-20  9:22                           ` Daniel P. Berrangé
2023-06-20 19:50                             ` Henrik Carlqvist
2023-06-21  7:09                               ` Daniel P. Berrangé
2023-06-21 18:14                                 ` Henrik Carlqvist
2023-06-23 18:30                                   ` [PATCH v8] " Henrik Carlqvist
2023-06-26  9:42                                     ` Daniel P. Berrangé
2023-06-27  6:33                                     ` Mark Cave-Ayland
2023-06-27 17:18                                       ` Henrik Carlqvist
2023-08-01 21:27                                     ` [PATCH v1] Allowing setting and overriding parameters in smb.conf Henrik Carlqvist
2023-08-02 19:53                                       ` Samuel Thibault
2023-08-02 23:09                                         ` Henrik Carlqvist
2023-08-02 23:13                                           ` Samuel Thibault
2023-08-02 23:26                                             ` Henrik Carlqvist
2023-08-02 23:34                                               ` Samuel Thibault
2023-08-03  0:13                                                 ` Henrik Carlqvist
2023-08-03 15:12                                                 ` [PATCH v2] " Henrik Carlqvist
2023-09-10 11:48                                                   ` Ping: " Henrik Carlqvist
2024-02-17 22:28                                                     ` Ping 2: " Henrik Carlqvist
2024-02-18  9:30                                                       ` Michael Tokarev
2024-02-18 14:55                                                         ` Henrik Carlqvist [this message]
2023-06-08 16:22                   ` [PATCH v6] Emulate dip switch language layout settings on SUN keyboard Daniel P. Berrangé
2023-06-08 18:12                     ` Henrik Carlqvist
2023-06-09  7:50                       ` Daniel P. Berrangé

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=20240218155503.7d52a2f9.hc981@poolhem.se \
    --to=hc981@poolhem.se \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=samuel.thibault@gnu.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.