From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KXCPc-0005mG-R7 for qemu-devel@nongnu.org; Sun, 24 Aug 2008 06:01:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KXCPb-0005lP-6n for qemu-devel@nongnu.org; Sun, 24 Aug 2008 06:01:32 -0400 Received: from [199.232.76.173] (port=60617 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXCPa-0005lG-Vp for qemu-devel@nongnu.org; Sun, 24 Aug 2008 06:01:31 -0400 Received: from mail2.shareable.org ([80.68.89.115]:36525) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KXCPa-0000G2-LI for qemu-devel@nongnu.org; Sun, 24 Aug 2008 06:01:30 -0400 Date: Sun, 24 Aug 2008 11:01:29 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] vnc port selection Message-ID: <20080824100128.GB24946@shareable.org> References: <48AD99CF.6070004@redhat.com> <48ADB43D.9050401@qumranet.com> <48ADB58D.9070409@codemonkey.ws> <48B121D6.6060008@qumranet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48B121D6.6060008@qumranet.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Xen Development Mailing List Avi Kivity wrote: > Anthony Liguori wrote: > > > >>Alternatively, have the management application pass an fd denoting > >>the socket. > > > >If you are allocating the ports in the management tool, then just tell > >QEMU what port to open up. I don't think you gain anything passing an > >fd. > > > > It prevents races, allows listening on non-traditional sockets (vnc over > unix-domain), and allows privilege separation. Agreed: races are particularly irksome. I have the same problem in another application, where one program allocates a fee port, but another (SSH tunnel) opens it. It's very annoying that the second program fails from time to time, due to the race. -- Jamie