From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M1F41-0002Dj-Js for qemu-devel@nongnu.org; Tue, 05 May 2009 03:27:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M1F3w-0002DX-4S for qemu-devel@nongnu.org; Tue, 05 May 2009 03:27:40 -0400 Received: from [199.232.76.173] (port=40342 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1F3v-0002DU-NO for qemu-devel@nongnu.org; Tue, 05 May 2009 03:27:35 -0400 Received: from mx20.gnu.org ([199.232.41.8]:24330) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M1F3v-0002hK-4u for qemu-devel@nongnu.org; Tue, 05 May 2009 03:27:35 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M1F3t-0001d5-MM for qemu-devel@nongnu.org; Tue, 05 May 2009 03:27:34 -0400 Message-ID: <49FFEA5F.4000507@web.de> Date: Tue, 05 May 2009 09:27:27 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <49FF31E4.8040106@us.ibm.com> <49FF4DC2.4020003@web.de> <20090505014744.GD12731@shareable.org> <49FFDA1A.6090408@web.de> In-Reply-To: <49FFDA1A.6090408@web.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF5BE215CB12B991A5050C513" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: Does anyone actually use -smb List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: Anthony Liguori , "qemu-devel@nongnu.org" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF5BE215CB12B991A5050C513 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Jan Kiszka wrote: > Jamie Lokier wrote: >> Jan Kiszka wrote: >>> Anthony Liguori wrote: >>>> It looks to be broken. I don't recall that Samba has every supporte= d >>>> running as an unprivileged user to so it would require launching as = root. >>> It works perfectly. I even have a patch pending that fixes the zombie= >>> issue it causes (more precisely, slirp missed that). >> I've been unable to use it for a year or so due to Samba having >> hard-coded directory paths, pointing into /var/lib/samba, which cannot= >> be overridden in the config file smb.conf. >> >> (I forget which files were hard-coded, or which distro I hit that on. >> Either CentOS, Debian or Ubuntu. Files were something like >> /var/lib/samba/{locking,connections}.tdb, perhaps?) >> >> Because of those paths, non-root wasn't possible and running it as >> root caused it to try to clobber some files which interfered with a >> non-QEMU ("native") Samba running on the same machine for normal file >> service. >=20 > I ran strace -e open and only caught this: >=20 > [pid 28902] open("/var/log/samba/log.smbd", O_WRONLY|O_CREAT|O_APPEND, > 0644) =3D -1 EACCES (Permission denied) >=20 > But that would only be a problem if I ran qemu as root. Hmm, wait, I ca= n > fix it by specifying the file like this: >=20 > log file=3D/tmp/qemu-smb.28902/log.%m Nope, this makes no difference. smbd still starts with accessing /var/log/samba/log.smbd, writes a few lines into it (if it has access permissions), then parses smb.conf, and finally switches over to the specified log file. But that's a non-issue for the typical use case of -smb: unprivileged qemu. Jan --------------enigF5BE215CB12B991A5050C513 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkn/6mIACgkQniDOoMHTA+lGJACeMu6NMaES2IPhOrwGGUe6qwrY lAkAnjNzSLpX8Wmpjxce9XkAPBk6o1GF =b3us -----END PGP SIGNATURE----- --------------enigF5BE215CB12B991A5050C513--