qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Improved shared folders support


From: Michael Tokarev
Subject: Re: [Qemu-devel] Improved shared folders support
Date: Tue, 04 Nov 2014 09:13:31 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0

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 via email to

[Prev in Thread] Current Thread [Next in Thread]