1. 21 Nov, 2014 1 commit
  2. 10 Nov, 2014 1 commit
    • Peter Wu's avatar
      slirp/smbd: modify/set several parameters in generated smbd.conf · 7912d04b
      Peter Wu authored
      The file sharing module should not handle printers, so disable it.
      The options 'load printers' and 'printing' have been available since the
      beginning (May 1996, commit 0e8fd3398771da2f016d72830179507f3edda51b).
      Option 'disable spoolss' is available since Samba 2.0.4, commit
      Next, "socket address" was reported as deprecated, use a combination of
      "interfaces" and "bind interfaces only" instead (available since October
      1997, commit 79f4fb52c1ed56fd843f81b4eb0cdd2991d4d0f4).
      Override cache directory to avoid writing to a global directory. Option
      available since Samba 3.4.0, Jan 2009, commit
      Set "usershare max shared=0" to prevent a global directory from being
      used. Option available since Samba 3.0.23, February 2006, commit
      The last option was introduced with Samba 3.4.0, but previously
      "state directory" was already added which exists in Samba 3.4.0. As
      unknown parameters are ignored (while printing a warning), it should be
      safe to add another option.
      Signed-off-by: default avatarPeter Wu <peter@lekensteyn.nl>
      Cc: Jan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
  3. 02 Nov, 2014 1 commit
  4. 02 Sep, 2014 1 commit
  5. 18 Jul, 2014 1 commit
  6. 27 Apr, 2014 1 commit
    • Michael Buesch's avatar
      slirp/smb: Move ncalrpc directory to tmp · b87b8a8b
      Michael Buesch authored
      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: default avatarMichael Buesch <m@bues.ch>
      Cc: Jan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      (Applying this to -trivial because it _is_ rather trivial
       and because Jan does not reply for months)
  7. 12 Mar, 2014 2 commits
    • Michael Tokarev's avatar
      slirp smb with modern win guests when samba is also running on host · 5c1e1890
      Michael Tokarev authored
      After numerous reports that -smb (or -netdev user,smb=foo) not working
      with modern windows (win7 and vista are reported as non-working), I
      started digging myself.  And found that indeed it doesn't work, and
      The thing is that modern win tries to connect to port 445 (microsoft-ds)
      first, and if that fails, it falls back to old port 139 (netbios-ssn).
      slirp code in qemu only redirects port 139, it does not touch port 445.
      So the prob is that if samba is also running on the host, guest will try
      to communicate using port 445, and that will succed, but ofcourse guest
      will not talk with our samba but with samba running on the host.
      If samba is not running on the host, guest will fall back to port 139,
      and will reach the redirecting rule and qemu will spawn smbd correctly.
      The solution is to redirect both ports (139 and 445), and the fix is
      a one-liner, adding second call to slirp_add_exec() at the end of
      net/slirp.c:slirp_smb() function (provided below).
      But it looks like that is not a proper fix really, since in theory
      we should redirect both ports to the SAME, single samba instance,
      but I'm not sure this is possible with slirp.  Well, even if two
      smbd processes will be run on the same config dir, it should not
      be a problem.
      The one-liner (not exactly 1 since it touches previous line too) is like
      Signed-off-By: default avatarMichael Tokarev <mjt@tls.msk.ru>
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
    • Michael Buesch's avatar
      qemu/slirp: Fix SMB security configuration on newer samba versions · c2804ee6
      Michael Buesch authored
      The smb.conf automatically generated by qemu's -smb option fails on current
      samba, because smbd rejects the security=share option with the following warning:
      >   WARNING: Ignoring invalid value 'share' for parameter 'security'
      Which makes it fall back to security=user without guest login.
      This results in being unable to login to the samba server from the guest OS.
      This fixes it by selecting 'user' explicitly and mapping
      unknown users to guest logins.
      Signed-off-by: default avatarMichael Buesch <m@bues.ch>
      Reviewed-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
  8. 19 Jun, 2013 1 commit
  9. 15 Apr, 2013 1 commit
  10. 04 Apr, 2013 1 commit
  11. 17 Jan, 2013 1 commit
  12. 19 Dec, 2012 5 commits
  13. 15 Nov, 2012 1 commit
  14. 08 Oct, 2012 1 commit
    • Paolo Bonzini's avatar
      net: consolidate NetClientState header files into one · a245fc18
      Paolo Bonzini authored
      This patch doesn't seem much useful alone, I must admit.  However,
      it makes sense as part of the upcoming directory reorganization,
      where I want to have include/net/tap.h as the net<->hw interface
      for tap.  Then having both net/tap.h and include/net/tap.h does
      not work.  "Fixed" by moving all the init functions to a single
      header file net/clients.h.
      The patch also adopts a uniform style for including net/*.h files
      from net/*.c, without the net/ path.
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@gmail.com>
  15. 09 Aug, 2012 1 commit
  16. 01 Aug, 2012 6 commits
  17. 23 Jul, 2012 4 commits
  18. 09 Jul, 2012 4 commits
  19. 04 Jun, 2012 1 commit
  20. 01 May, 2012 2 commits
    • Nikolaus Rath's avatar
      Declare state directory in smb.conf · 276eda57
      Nikolaus Rath authored
      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
      This patch adds the missing option.
      Signed-off-by: default avatarNikolaus Rath <Nikolaus@rath.org>
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
    • Nikolaus Rath's avatar
      slirp: don't use "smb ports = 0" option · de305b13
      Nikolaus Rath authored
      The "smb ports = 0" option causes recent samba versions to crash. It was
      introduced in commit 157777ef
       with log message "Samba 3 support".
      However, a value of 0 has never been officially supported by smb and is
      also not necessary: if stdin is a socket, smb does not try to listen on
      any ports and uses just stdin. This is necessary to support inetd based
      operation (otherwise smbd would always fail when called from inetd,
      because inetd already listens on the SMB port). Since samba has
      supported inetd operation since pre-3.x, it should be safe to rely on
      this feature. I have tested it with Samba 3.6.4 -- communication works
      fine, and smbd is not listening on any ports.
      I suspect the "smb ports = 0" hack may have been introduced when someone
      tested the qemu generated samba config from the command line with "smbd
      -i" and found it to fail (because then stdin isn't a socket).
      Signed-off-by: default avatarNikolaus Rath <Nikolaus@rath.org>
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
  21. 19 Dec, 2011 1 commit
  22. 22 Nov, 2011 1 commit
  23. 03 Sep, 2011 1 commit