Package: qemu
Version: 1.6.0+dfsg-2
Severity: normal
Tags: patch

The smbd forked by qemu still uses the default ncalrpc directory
in /var/run/samba. This may lead to problems, if the directory
does not exist (for example if /var/run is a tmpfs and the host
smbd was not started).

This leads to the following error message from samba
and an unworkable smbd:
        Failed to create pipe directory /var/run/samba/ncalrpc - No such file
or directory

The attached patch fixes this by pointing smbd to /tmp/qemu-smb.%d.%d/ncalrpc
as ncalrpc directory.
Smbd will create the actual ncalrpc subdirectory on its own.

Using a private directory also avoids possible clashes with the system-smbd.



-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.11-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages qemu depends on:
ii  qemu-system  1.6.0+dfsg-2
ii  qemu-user    1.6.0+dfsg-2
ii  qemu-utils   1.6.0+dfsg-2

qemu recommends no packages.

Versions of packages qemu suggests:
pn  qemu-user-static  <none>

-- no debconf information
From: Michael Buesch <m...@bues.ch>
Subject: [PATCH] slirp/smb: Move ncalrpc directory to tmp

The smbd forked by qemu still uses the default ncalrpc directory
in /var/run/samba. This may lead to problems, if /var/run/samba
does not exist (for example if /var/run is a tmpfs and the host
smbd was not started).

This leads to the following error message from samba
and an unworkable smbd:
	Failed to create pipe directory /var/run/samba/ncalrpc - No such file or directory

Fix this by pointing smbd to /tmp/qemu-smb.%d.%d/ncalrpc as ncalrpc directory.
Smbd will create the actual ncalrpc subdirectory on its own.

Signed-off-by: Michael Buesch <m...@bues.ch>

---

Index: qemu-1.6.0+dfsg/net/slirp.c
===================================================================
--- qemu-1.6.0+dfsg.orig/net/slirp.c
+++ qemu-1.6.0+dfsg/net/slirp.c
@@ -527,6 +527,7 @@ static int slirp_smb(SlirpState* s, cons
             "pid directory=%s\n"
             "lock directory=%s\n"
             "state directory=%s\n"
+            "ncalrpc dir=%s/ncalrpc\n"
             "log file=%s/log.smbd\n"
             "smb passwd file=%s/smbpasswd\n"
             "security = user\n"
@@ -539,6 +540,7 @@ static int slirp_smb(SlirpState* s, cons
             s->smb_dir,
             s->smb_dir,
             s->smb_dir,
+            s->smb_dir,
             s->smb_dir,
             s->smb_dir,
             s->smb_dir,

Reply via email to