qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: Does anyone actually use -smb


From: Jan Kiszka
Subject: [Qemu-devel] Re: Does anyone actually use -smb
Date: Tue, 05 May 2009 09:27:27 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

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 supported
>>>> 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.
> 
> I ran strace -e open and only caught this:
> 
> [pid 28902] open("/var/log/samba/log.smbd", O_WRONLY|O_CREAT|O_APPEND,
> 0644) = -1 EACCES (Permission denied)
> 
> But that would only be a problem if I ran qemu as root. Hmm, wait, I can
> fix it by specifying the file like this:
> 
> log file=/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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]