]> git.ipfire.org Git - thirdparty/qemu.git/commit
slirp: Ensure smbd and shared directory exist when enable smb
authorDunrong Huang <riegamaths@gmail.com>
Fri, 6 Jul 2012 06:04:43 +0000 (14:04 +0800)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 21 Aug 2012 20:36:35 +0000 (15:36 -0500)
commit1a933e48016db893c799775a897b2af88a879683
tree23436122fcef3e7a21e80f9159ae495f689a033e
parent55e64b6dddfd71953f4eb7ad6d0bcfc8d92500e5
slirp: Ensure smbd and shared directory exist when enable smb

Users may pass the following parameters to qemu:
    $ qemu-kvm -net nic -net user,smb= ...
    $ qemu-kvm -net nic -net user,smb ...
    $ qemu-kvm -net nic -net user,smb=bad_directory ...

In these cases, qemu started successfully while samba server
failed to start. Users will confuse since samba server
failed silently without any indication of what it did wrong.

To avoid it, we check whether the shared directory exist and
if users have permission to access this directory when QEMU's
"built-in" SMB server is enabled.

Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
(cherry picked from commit 927d811b282ffdf5386bd63f435c1507634ba49a)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
net/slirp.c