18.02.2024 01:28, Henrik Carlqvist :
Still wondering if there are any plans to apply my patch or if you would like
to change anything in the patch?

Being able to set parameters in smb.conf would be really useful these days for
people running old versions of Windows like Windows XP in a qemu guest. Today,
the default settings of Samba has disabled SMBv1 making old versions of
Windows unable to connect to Samba shares.

I don't maintain this code, so my email is just a random comment.
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.

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.

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.

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.

/mjt

Reply via email to