qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] slirp: don't use "smb ports = 0" option


From: Nikolaus Rath
Subject: Re: [Qemu-devel] [PATCH] slirp: don't use "smb ports = 0" option
Date: Sun, 29 Apr 2012 12:21:55 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Hi,

It'd be great if someone could take a look at this and apply it if there
are no objections...

I also asked on the Samba mailing list about this, and this hack should
not be necessary with any version of samba.
http://article.gmane.org/gmane.network.samba.general/124526

Thanks,
-Nikolaus

Nikolaus Rath <address@hidden> writes:
> Hello,
>
> The "smb ports = 0" option causes recent samba versions to crash. It was
> introduced in commit 157777ef3e 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:  Nikolaus Rath <address@hidden>
>
> diff -u -r qemu-kvm-1.0+dfsg.old/net/slirp.c qemu-kvm-1.0+dfsg/net/slirp.c
> --- qemu-kvm-1.0+dfsg.old/net/slirp.c 2011-12-04 05:38:06.000000000 -0500
> +++ qemu-kvm-1.0+dfsg/net/slirp.c     2012-04-25 14:40:39.859737798 -0400
> @@ -507,7 +507,6 @@
>      fprintf(f,
>              "[global]\n"
>              "private dir=%s\n"
> -            "smb ports=0\n"
>              "socket address=127.0.0.1\n"
>              "pid directory=%s\n"
>              "lock directory=%s\n"
>
>
> Best,
>
>    -Nikolaus
>
> -- 
>  »Time flies like an arrow, fruit flies like a Banana.«
>
>   PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C


   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C



reply via email to

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