* [Qemu-devel] Does anyone actually use -smb @ 2009-05-04 18:20 Anthony Liguori 2009-05-04 20:19 ` [Qemu-devel] " Jan Kiszka 0 siblings, 1 reply; 15+ messages in thread From: Anthony Liguori @ 2009-05-04 18:20 UTC (permalink / raw) To: qemu-devel 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. Would anyone be opposed to removing this? -- Regards, Anthony Liguori ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] Re: Does anyone actually use -smb 2009-05-04 18:20 [Qemu-devel] Does anyone actually use -smb Anthony Liguori @ 2009-05-04 20:19 ` Jan Kiszka 2009-05-04 20:25 ` Jan Kiszka ` (2 more replies) 0 siblings, 3 replies; 15+ messages in thread From: Jan Kiszka @ 2009-05-04 20:19 UTC (permalink / raw) To: Anthony Liguori; +Cc: qemu-devel [-- Attachment #1: Type: text/plain, Size: 537 bytes --] 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). > > Would anyone be opposed to removing this? > No reason to do so IMHO. It's very simple to use, much simpler than having to configure a full samba server on the host, which would include user/password management. Jan [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 257 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] Re: Does anyone actually use -smb 2009-05-04 20:19 ` [Qemu-devel] " Jan Kiszka @ 2009-05-04 20:25 ` Jan Kiszka 2009-05-04 21:36 ` Anthony Liguori 2009-05-05 1:47 ` Jamie Lokier 2 siblings, 0 replies; 15+ messages in thread From: Jan Kiszka @ 2009-05-04 20:25 UTC (permalink / raw) To: Anthony Liguori; +Cc: qemu-devel [-- Attachment #1: Type: text/plain, Size: 846 bytes --] 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). > >> Would anyone be opposed to removing this? >> > > No reason to do so IMHO. It's very simple to use, much simpler than > having to configure a full samba server on the host, which would include > user/password management. > > Jan > BTW, I'm sitting on a large rework of all the slirp-related command line options + a fully-configurable slirp (not yet multi-instance, but that may come as well). Is your question motivated by some slirp-affecting work, or just cleanup considerations? Jan [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 257 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Re: Does anyone actually use -smb 2009-05-04 20:19 ` [Qemu-devel] " Jan Kiszka 2009-05-04 20:25 ` Jan Kiszka @ 2009-05-04 21:36 ` Anthony Liguori 2009-05-04 21:40 ` Jan Kiszka 2009-05-05 1:47 ` Jamie Lokier 2 siblings, 1 reply; 15+ messages in thread From: Anthony Liguori @ 2009-05-04 21:36 UTC (permalink / raw) To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel 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). > > >> Would anyone be opposed to removing this? >> >> > > No reason to do so IMHO. It's very simple to use, much simpler than > having to configure a full samba server on the host, which would include > user/password management. > But you have to run qemu as root, and you can only use -smb with one guest at a time? Is that correct? Regards, Anthony Liguori > Jan > > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Re: Does anyone actually use -smb 2009-05-04 21:36 ` Anthony Liguori @ 2009-05-04 21:40 ` Jan Kiszka 0 siblings, 0 replies; 15+ messages in thread From: Jan Kiszka @ 2009-05-04 21:40 UTC (permalink / raw) To: Anthony Liguori; +Cc: Anthony Liguori, qemu-devel [-- Attachment #1: Type: text/plain, Size: 870 bytes --] Anthony Liguori 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). >> >> >>> Would anyone be opposed to removing this? >>> >>> >> >> No reason to do so IMHO. It's very simple to use, much simpler than >> having to configure a full samba server on the host, which would include >> user/password management. >> > > But you have to run qemu as root, and you can only use -smb with one > guest at a time? Is that correct? Nope, I'm running it as dumb user. I haven't tried multiple qemu instances, wait... works as well. Jan [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 257 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Re: Does anyone actually use -smb 2009-05-04 20:19 ` [Qemu-devel] " Jan Kiszka 2009-05-04 20:25 ` Jan Kiszka 2009-05-04 21:36 ` Anthony Liguori @ 2009-05-05 1:47 ` Jamie Lokier 2009-05-05 6:18 ` Jan Kiszka 2009-05-05 13:34 ` Anthony Liguori 2 siblings, 2 replies; 15+ messages in thread From: Jamie Lokier @ 2009-05-05 1:47 UTC (permalink / raw) To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel 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 guess if you have a private build of Samba you can avoid this problem, but even then I'm wondering how you ensure different Samba instances don't interfere with each other, as there is nowhere in smb.conf to specify an alternate location for those files normally in /var/lib/samba. Jan, do you do anything special for -smb or does it just work? What distro and distro version are you using? Thanks, -- Jamie ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Re: Does anyone actually use -smb 2009-05-05 1:47 ` Jamie Lokier @ 2009-05-05 6:18 ` Jan Kiszka 2009-05-05 7:27 ` Jan Kiszka ` (2 more replies) 2009-05-05 13:34 ` Anthony Liguori 1 sibling, 3 replies; 15+ messages in thread From: Jan Kiszka @ 2009-05-05 6:18 UTC (permalink / raw) To: Jamie Lokier; +Cc: Anthony Liguori, qemu-devel [-- Attachment #1: Type: text/plain, Size: 1924 bytes --] 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 Will write a patch for qemu. > > I guess if you have a private build of Samba you can avoid this > problem, but even then I'm wondering how you ensure different Samba > instances don't interfere with each other, as there is nowhere in > smb.conf to specify an alternate location for those files normally in > /var/lib/samba. > > Jan, do you do anything special for -smb or does it just work? What > distro and distro version are you using? OpenSUSE 11.0 with samba-3.2.4-4.3 and 11.1 with samba-3.2.7-11.2.1. Maybe you should file a bug at your distro if its version doesn't behave according to its docs. Jan [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 257 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] Re: Does anyone actually use -smb 2009-05-05 6:18 ` Jan Kiszka @ 2009-05-05 7:27 ` Jan Kiszka 2009-05-05 12:13 ` Alexey Eremenko 2009-05-05 12:09 ` Jamie Lokier 2009-05-05 12:10 ` Jamie Lokier 2 siblings, 1 reply; 15+ messages in thread From: Jan Kiszka @ 2009-05-05 7:27 UTC (permalink / raw) To: Jamie Lokier; +Cc: Anthony Liguori, qemu-devel [-- Attachment #1: Type: text/plain, Size: 1655 bytes --] 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 #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 257 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Re: Does anyone actually use -smb 2009-05-05 7:27 ` Jan Kiszka @ 2009-05-05 12:13 ` Alexey Eremenko 0 siblings, 0 replies; 15+ messages in thread From: Alexey Eremenko @ 2009-05-05 12:13 UTC (permalink / raw) To: qemu-devel Well, I use Samba from time to time. But I found out that it not always works. I used KVM-85, while -smb parameter works fine on my Fedora 7 machine it totally fails on my Fedora 10 machine. Guest is Windows XP. I dunno why, it may be version of samba on Host, or anything else. -- -Alexey Eromenko "Technologov" ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Re: Does anyone actually use -smb 2009-05-05 6:18 ` Jan Kiszka 2009-05-05 7:27 ` Jan Kiszka @ 2009-05-05 12:09 ` Jamie Lokier 2009-05-05 13:52 ` Jan Kiszka 2009-05-05 12:10 ` Jamie Lokier 2 siblings, 1 reply; 15+ messages in thread From: Jamie Lokier @ 2009-05-05 12:09 UTC (permalink / raw) To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel Jan Kiszka wrote: > OpenSUSE 11.0 with samba-3.2.4-4.3 and 11.1 with samba-3.2.7-11.2.1. > > Maybe you should file a bug at your distro if its version doesn't behave > according to its docs. But it does behave according to its docs. The Samba docs "man smbd" list a lot of files in /var/lib/samba, for which there is no smb.conf option to change the path. I've just looked at RHEL 4.6 (ancient - samba-3.0.25b) and Ubuntu 9.04 (new - samba-2:3.3.2-1ubuntu3), which I happen to have. >From "man smbd", does yours not have these? Samba stores it´s data in several TDB (Trivial Database) files, usually located in /var/lib/samba. (*) information persistent across restarts (but not necessarily important to backup). account_policy.tdb* NT account policy settings such as pw expiration, etc... brlock.tdb byte range locks browse.dat browse lists connections.tdb share connections (used to enforce max connections, etc...) gencache.tdb generic caching db group_mapping.tdb* group mapping information locking.tdb share modes & oplocks login_cache.tdb* bad pw attempts messages.tdb Samba messaging system netsamlogon_cache.tdb* cache of user net_info_3 struct from net_samlogon() request (as a domain member) ntdrivers.tdb* installed printer drivers ntforms.tdb* installed printer forms ntprinters.tdb* installed printer information printing/ directory containing tdb per print queue of cached lpq output registry.tdb Windows registry skeleton (connect via regedit.exe) sessionid.tdb session information (e.g. support for ´utmp = yes´) share_info.tdb* share acls winbindd_cache.tdb winbindd´s cache of user lists, etc... winbindd_idmap.tdb* winbindd´s local idmap db wins.dat* wins database when ´wins support = yes´ Most of them correspond to features which are disabled for QEMU, but some aren't. I'm only talking about this because I've tried to use QEMU "-smb" in the last year and couldn't get it working. It looked like I needed to reconfigure and recompile Samba from source to use it. -- Jamie ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Re: Does anyone actually use -smb 2009-05-05 12:09 ` Jamie Lokier @ 2009-05-05 13:52 ` Jan Kiszka 2009-05-05 15:07 ` Avi Kivity 0 siblings, 1 reply; 15+ messages in thread From: Jan Kiszka @ 2009-05-05 13:52 UTC (permalink / raw) To: Jamie Lokier; +Cc: Anthony Liguori, qemu-devel [-- Attachment #1: Type: text/plain, Size: 3108 bytes --] Jamie Lokier wrote: > Jan Kiszka wrote: >> OpenSUSE 11.0 with samba-3.2.4-4.3 and 11.1 with samba-3.2.7-11.2.1. >> >> Maybe you should file a bug at your distro if its version doesn't behave >> according to its docs. > > But it does behave according to its docs. > > The Samba docs "man smbd" list a lot of files in /var/lib/samba, for > which there is no smb.conf option to change the path. > > I've just looked at RHEL 4.6 (ancient - samba-3.0.25b) and Ubuntu 9.04 > (new - samba-2:3.3.2-1ubuntu3), which I happen to have. > > From "man smbd", does yours not have these? > > Samba stores it´s data in several TDB (Trivial Database) files, usually ^^^^^^^ Sounds not like it is necessarily set in stone. > located in /var/lib/samba. > > (*) information persistent across restarts (but not necessarily > important to backup). > > account_policy.tdb* > NT account policy settings such as pw expiration, etc... > > brlock.tdb > byte range locks > > browse.dat > browse lists > > connections.tdb > share connections (used to enforce max connections, etc...) > > gencache.tdb > generic caching db > > group_mapping.tdb* > group mapping information > > locking.tdb > share modes & oplocks > > login_cache.tdb* > bad pw attempts > > messages.tdb > Samba messaging system > > netsamlogon_cache.tdb* > cache of user net_info_3 struct from net_samlogon() request (as a > domain member) > > ntdrivers.tdb* > installed printer drivers > > ntforms.tdb* > installed printer forms > > ntprinters.tdb* > installed printer information > > printing/ > directory containing tdb per print queue of cached lpq output > > registry.tdb > Windows registry skeleton (connect via regedit.exe) > > sessionid.tdb > session information (e.g. support for ´utmp = yes´) > > share_info.tdb* > share acls > > winbindd_cache.tdb > winbindd´s cache of user lists, etc... > > winbindd_idmap.tdb* > winbindd´s local idmap db > > wins.dat* > wins database when ´wins support = yes´ This is how my /tmp/qemu-smb.x folder looks like when running "smbclient //10.0.2.4/qemu" in the guest: account_policy.tdb brlock.tdb connections.tdb gencache.tdb group_mapping.ldb locking.tdb log.smbd messages.tdb notify.tdb ntdrivers.tdb ntforms.tdb ntprinters.tdb perfmon printing registry.tdb secrets.tdb sessionid.tdb share_info.tdb smb.conf smbpasswd > > Most of them correspond to features which are disabled for QEMU, but > some aren't. > > I'm only talking about this because I've tried to use QEMU "-smb" in > the last year and couldn't get it working. It looked like I needed to > reconfigure and recompile Samba from source to use it. Would be interesting to know if that makes a difference for you. Jan [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 257 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Re: Does anyone actually use -smb 2009-05-05 13:52 ` Jan Kiszka @ 2009-05-05 15:07 ` Avi Kivity 0 siblings, 0 replies; 15+ messages in thread From: Avi Kivity @ 2009-05-05 15:07 UTC (permalink / raw) To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel Jan Kiszka wrote: >> From "man smbd", does yours not have these? >> >> Samba stores it´s data in several TDB (Trivial Database) files, usually >> > ^^^^^^^ > Sounds not like it is necessarily set in stone. > To me it sounds like a build option :) -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Re: Does anyone actually use -smb 2009-05-05 6:18 ` Jan Kiszka 2009-05-05 7:27 ` Jan Kiszka 2009-05-05 12:09 ` Jamie Lokier @ 2009-05-05 12:10 ` Jamie Lokier 2 siblings, 0 replies; 15+ messages in thread From: Jamie Lokier @ 2009-05-05 12:10 UTC (permalink / raw) To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel 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) Is that just starting Samba, or accessing a share from a Windows guest and doing some file accesses with locking? -- Jamie ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Re: Does anyone actually use -smb 2009-05-05 1:47 ` Jamie Lokier 2009-05-05 6:18 ` Jan Kiszka @ 2009-05-05 13:34 ` Anthony Liguori 2009-05-05 13:55 ` Avi Kivity 1 sibling, 1 reply; 15+ messages in thread From: Anthony Liguori @ 2009-05-05 13:34 UTC (permalink / raw) To: Jamie Lokier; +Cc: Jan Kiszka, qemu-devel 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. > Yes, this has been my experience too. I just assumed this was upstream behavior. -- Regards, Anthony Liguori ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Re: Does anyone actually use -smb 2009-05-05 13:34 ` Anthony Liguori @ 2009-05-05 13:55 ` Avi Kivity 0 siblings, 0 replies; 15+ messages in thread From: Avi Kivity @ 2009-05-05 13:55 UTC (permalink / raw) To: Anthony Liguori; +Cc: Jan Kiszka, qemu-devel Anthony Liguori wrote: >> 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. >> > > Yes, this has been my experience too. I just assumed this was > upstream behavior. > I think we should regard this as a regression in samba, and submit a bug report or a patch. It doesn't make sense for a program like samba only to work as a single instance. -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2009-05-05 15:07 UTC | newest] Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-05-04 18:20 [Qemu-devel] Does anyone actually use -smb Anthony Liguori 2009-05-04 20:19 ` [Qemu-devel] " Jan Kiszka 2009-05-04 20:25 ` Jan Kiszka 2009-05-04 21:36 ` Anthony Liguori 2009-05-04 21:40 ` Jan Kiszka 2009-05-05 1:47 ` Jamie Lokier 2009-05-05 6:18 ` Jan Kiszka 2009-05-05 7:27 ` Jan Kiszka 2009-05-05 12:13 ` Alexey Eremenko 2009-05-05 12:09 ` Jamie Lokier 2009-05-05 13:52 ` Jan Kiszka 2009-05-05 15:07 ` Avi Kivity 2009-05-05 12:10 ` Jamie Lokier 2009-05-05 13:34 ` Anthony Liguori 2009-05-05 13:55 ` Avi Kivity
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.