From patchwork Wed Apr 25 13:57:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolaus Rath X-Patchwork-Id: 154945 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 78EF6B6FAA for ; Thu, 26 Apr 2012 00:14:39 +1000 (EST) Received: from localhost ([::1]:58259 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SN2zN-0007oY-4M for incoming@patchwork.ozlabs.org; Wed, 25 Apr 2012 10:14:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SN2yL-0003l2-04 for qemu-devel@nongnu.org; Wed, 25 Apr 2012 10:14:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SN2j0-0001cu-ES for qemu-devel@nongnu.org; Wed, 25 Apr 2012 09:57:55 -0400 Received: from inspiron.ap.columbia.edu ([128.59.145.39]:56046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SN2j0-0001Pt-8W for qemu-devel@nongnu.org; Wed, 25 Apr 2012 09:57:42 -0400 Received: by inspiron.ap.columbia.edu (Postfix, from userid 1000) id E103A21221; Wed, 25 Apr 2012 09:57:19 -0400 (EDT) From: Nikolaus Rath To: qemu-devel@nongnu.org Mail-Copies-To: never Date: Wed, 25 Apr 2012 09:57:19 -0400 Message-ID: <87haw79ao0.fsf@inspiron.ap.columbia.edu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 128.59.145.39 Subject: [Qemu-devel] [PATCH] Declare state directory in smb.conf X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The smb.conf generated by the userspace networking does not include a state directory directive. Samba therefore falls back to the default value. Since the user generally does not have write access to this path, smbd immediately crashes. The "state directory" option was added in Samba 3.4.0 (commit http://gitweb.samba.org/?p=samba.git;a=commit;h=7b02e05eb64f3ffd7aa1cf027d10a7343c0da757). This patch adds the missing option. Signed-off-by: Nikolaus Rath --- Best, -Nikolaus diff -r -u qemu-kvm-1.0.1.old/net/slirp.c qemu-kvm-1.0.1/net/slirp.c --- qemu-kvm-1.0.1.old/net/slirp.c 2012-04-16 22:15:17.000000000 -0400 +++ qemu-kvm-1.0.1/net/slirp.c 2012-04-24 21:56:41.835745642 -0400 @@ -511,6 +511,7 @@ "socket address=127.0.0.1\n" "pid directory=%s\n" "lock directory=%s\n" + "state directory=%s\n" "log file=%s/log.smbd\n" "smb passwd file=%s/smbpasswd\n" "security = share\n" @@ -521,6 +522,7 @@ s->smb_dir, s->smb_dir, s->smb_dir, + s->smb_dir, s->smb_dir, s->smb_dir, exported_dir