unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#44519: Qemu fails to start Samba server
@ 2020-11-08 14:52 elaexuotee--- via Bug reports for GNU Guix
  2020-11-09  5:27 ` elaexuotee--- via Bug reports for GNU Guix
  0 siblings, 1 reply; 2+ messages in thread
From: elaexuotee--- via Bug reports for GNU Guix @ 2020-11-08 14:52 UTC (permalink / raw)
  To: 44519

[-- Attachment #1: Type: text/plain, Size: 1541 bytes --]

Hey Guix,

Having trouble getting the Samba directory share in qemu to work as advertised:

    $ qemu-system-x86_64 -netdev user,id=net0,smb=/share ...

Running something like the above with samba installed should spin up `smbd`;
however, this doesn't happen. I see no smbd processes started. Qemu does create
/tmp/qemu-smb.XXXXXX/smb.conf, however.

Am I just missing something obvious? Can your reproduce?

Digging through the qemu repo[0], it looks like qemu calls out to a samba
daemon with an invocation that resolves to this:

    $ smbd -l /tmp/qemu-smb.XXXXXX -s /tmp/qemu-smb.XXXXXXX/smb.conf

Manually running the above results in silent failure, though. To be clear,
running the above with --foreground makes no difference.

For good measure, I am attaching the smb.conf that qemu generates, in case you
want to directly try the smbd command without spinning up qemu. Note, you may
need to edit the 'path=/shared' line to an existing directory on your machine.

Throwing strace at the above shows that the daemon is getting EPERM when trying
to bind() the priviledged ports 445 and 139.

Indeed, running the daemon under sudo works as expected, and I am able to
access the shared directory from the guest machine as intended. Given the
permission issues, I did try adding <samba>/sbin/smbd to my setuid-programs,
but that seems to make no difference.


Is this a PEBKAC issue or a legitimate bug?


[0]:https://github.com/qemu/qemu/blob/7f368aed672117980f7f09933e1eb3e1139caae6/net/slirp.c


[-- Attachment #2: smb.conf --]
[-- Type: text/plain, Size: 539 bytes --]

[global]
private dir=/tmp/qemu-smb.2IQ1T0
interfaces=127.0.0.1
bind interfaces only=yes
pid directory=/tmp/qemu-smb.2IQ1T0
lock directory=/tmp/qemu-smb.2IQ1T0
state directory=/tmp/qemu-smb.2IQ1T0
cache directory=/tmp/qemu-smb.2IQ1T0
ncalrpc dir=/tmp/qemu-smb.2IQ1T0/ncalrpc
log file=/tmp/qemu-smb.2IQ1T0/log.smbd
smb passwd file=/tmp/qemu-smb.2IQ1T0/smbpasswd
security = user
map to guest = Bad User
load printers = no
printing = bsd
disable spoolss = yes
usershare max shares = 0
[qemu]
path=/share
read only=no
guest ok=yes
force user=x

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#44519: Qemu fails to start Samba server
  2020-11-08 14:52 bug#44519: Qemu fails to start Samba server elaexuotee--- via Bug reports for GNU Guix
@ 2020-11-09  5:27 ` elaexuotee--- via Bug reports for GNU Guix
  0 siblings, 0 replies; 2+ messages in thread
From: elaexuotee--- via Bug reports for GNU Guix @ 2020-11-09  5:27 UTC (permalink / raw)
  To: 44519-done

Um. Apparently, I was the one failing. I just tried connecting again, and as
long as smbd has setuid, the qemu SMB share works as advertised.

Sorry for the false alarm.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-09  5:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-08 14:52 bug#44519: Qemu fails to start Samba server elaexuotee--- via Bug reports for GNU Guix
2020-11-09  5:27 ` elaexuotee--- via Bug reports for GNU Guix

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).