Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2004:
[Freeciv-Dev] Re: Extended connect dialog (PR#977)
Home

[Freeciv-Dev] Re: Extended connect dialog (PR#977)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: Extended connect dialog (PR#977)
From: "Daniel L Speyer" <dspeyer@xxxxxxxxxxx>
Date: Tue, 16 Mar 2004 17:02:17 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=977 >

I prefer the current way.

Firstly, it's highly portable (as you observed).

Secondly, it tests what's relevant -- can the client already modify the 
same files the server can.

Thirdly, it means that if a client connects to a server started by the 
same user on the same machine at an earlier time, that client gets 
hack.  This is, IMHO, how it should be.

Just my 2 (3?) cents,
--Daniel Speyer

Jason Short wrote:

><URL: http://rt.freeciv.org/Ticket/Display.html?id=977 >
>
>The method of local authorization is quite a hack.
>
>The server needs to make sure it is the correct client connecting that 
>it's going to give HACK authorization to.  So the server sends (over the 
>network) the name of a local file.  The client creates this file and 
>puts some auth info into it.  The client then sends this auth info to 
>the server, which it verifies against the data in the file.
>
>The question is: is there a better way?
>
>On posix systems, the answer is clearly yes.  The client should call 
>socketpair() to generate a pair of sockets before the fork; client and 
>server each get one of the sockets.  It then takes just a few lines for 
>the server to use this socket as the client's automatic connection. 
>It's fast, secure, and elegant.  The only drawback is that win32 has no 
>socketpair() function.  Is there a way to do this on windows?  (I surely 
>hope so, since I need to do this for another project.)  Any win32 
>developers know how it might be done?  Win32 has various methods of 
>creating pipes, but we need to create a two-way socket that can be 
>accessed via the normal file descriptor functions (read, write).
>
>jason
>
>
>  
>





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