All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Peter Wu <peter@lekensteyn.nl>
Cc: Jan Kiszka <jan.kiszka@siemens.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Improved shared folders support
Date: Tue, 04 Nov 2014 09:13:31 +0300	[thread overview]
Message-ID: <54586E8B.2040802@msgid.tls.msk.ru> (raw)
In-Reply-To: <2237174.UyJVYf2hI9@al>

03.11.2014 22:46, Peter Wu wrote:
> On Monday 03 November 2014 15:58:35 Michael Tokarev wrote:
>> 03.11.2014 15:22, Peter Wu wrote:
>> []
>>> As an aside, would it be possible to override the samba binary at runtime,
>>> without compiling? Either an envvar (SMBD) or an option (-net
>>> user,smb=...,smbd=...).
>>
>> The whole thing needs to be rewritten to use a shell script to create
>> smb.conf and to call smbd.  It's something I wanted to do for very long
>> time, the only question is where to put this script so a user can
>> easily customize it.  In debian we have a rule that anything in /etc
>> is a conffile, and it gets upgraded (when upgrading the corresponding
>> package) only if it hasn't been modified by the user.  Everything else
>> (in /usr/lib, /usr/share etc) gets upgraded unconditionally.  So maybe
>> storing it in /etc/qemu/run-smbd.sh or somehting like that makes sense.
> 
> I do not think that everyone is (or wants to be) a Samba wizard. For
> that reason, I see little value in giving the user too much control over
> the creation of the samba config file. There exists helpers for setting up
> bridges, but that is because it may need more privileges, and starting samba is
> not such a case.

The talk is not about being a wizard or relying on users creating that
script.  The talk is about letting user a quick way to fix stuff with
new or unusual samba combination, without a need to recompile qemu
binary.  Changing a shell script is trivial, including trial and error
(so you dont really need to be a wizard), while recompiling is much
more difficult.

>> The rest is a shell code to create smb.conf in a temp dir -- the same
>> as current code does in qemu, plus all your additions,
> 
> If by "my additions" you mean specifying a custom samba path, that is
> just a single program, why not allow to override it at runtime?

No, I mean the other patch - the printing one you sent the other day.

[]
> That single program could be a wrapper script that modifies the files as
> needed.
> 
> I propose to keep a simple interface which do not need users to modify a
> shell script or learn Samba. Consider Virtual Box' and VMWare' shared
> folders functionality. It allows multiple folders to be specified with
> these properties:

Again, my variant does not mean users will need to learn anything, it
is only needed in emergency cases.  My proposal is to move all current
smb.conf file creation from qemu binary to an external shell script
which is *shipped by qemu*, and which creates the same setup as currently
done by qemu binary.  But with it being a shell script, it will be easy
to modify it *if needed*.  Modifying already created smb.conf is not a
good idea, that requires even more wizardy skills.

[skip changing user interface, it is for another email]
[]
> By the way, how well does '-net user,smb' work with multiple
> connections? The documentation for guestfwd suggests that the command
> gets executed for each connection. Won't that cause concurrency issues
> in the access to databases?

I for one never tried that ;)

/mjt

  reply	other threads:[~2014-11-04  6:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-24 16:55 [Qemu-devel] slirp-smb broken with Samba 4.1 Jan Kiszka
2014-10-24 18:29 ` Michael Tokarev
2014-10-24 19:58   ` Michael Tokarev
2014-10-24 20:43     ` Michael Tokarev
2014-10-25  7:23       ` Jan Kiszka
2014-11-03 12:22 ` Peter Wu
2014-11-03 12:58   ` Michael Tokarev
2014-11-03 19:46     ` [Qemu-devel] Improved shared folders support (was: Re: slirp-smb broken with Samba 4.1) Peter Wu
2014-11-04  6:13       ` Michael Tokarev [this message]
2014-11-05 17:29         ` [Qemu-devel] Improved shared folders support Peter Wu
2014-11-04 22:53   ` [Qemu-devel] slirp-smb broken with Samba 4.1 Peter Wu

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=54586E8B.2040802@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=jan.kiszka@siemens.com \
    --cc=peter@lekensteyn.nl \
    --cc=qemu-devel@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.