Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2002:
[Freeciv-Dev] Re: connect dialog ver 3 (PR#1911)
Home

[Freeciv-Dev] Re: connect dialog ver 3 (PR#1911)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Cc: Freeciv-Dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: connect dialog ver 3 (PR#1911)
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Tue, 22 Oct 2002 09:59:25 +0000 (GMT)

On Tue, 22 Oct 2002, Vasco Alexandre Da Silva Costa wrote:
> Yes. That is why I don't want the client to fork() the server and control
> stdin/stdout using pipes. If the client dies how will you regain control
> of the server? I like things separate and squeaky clean.
...
> Yes IMO we need some way to grant cmdlevel hack to players connecting by
> TCP/IP.

The problem is in the idea that we need a cmdlevel hack in the first
place. If do away with this requirement, the other problems are easy to
solve.

In other words, let's rethink the use of "hack" level commands so that
they become safe instead.

My vision for the server to be a (possibly forked) daemon running in the
background which (unless it is a public server) runs until there are no
more players connected to it (or no players connect to it in a given
timeframe). First player to connect gets control priviledges and no unsafe
"hack" priviledges exist.

This means changing "save" and "load" so that they cannot overwrite
anything useful on the system. This should be relatively simple - restrict
them to a directory of their own, and check that any files to be loaded or
overwritten are also freeciv savefiles. Note that this change will also be
necessary if load and save is ever to be implemented on civserver. The
same goes for loading rulesets.

> Also pipes are not easily portable to other platforms. Unlike
> BSD sockets UNIX pipes are not ubiquitous. Not to mention fork() ...

I agree pipes are bad. However, I don't see a fundamental problem getting
a fork mechanism working for multiple platforms - this is already solved
in Mike auth patch AFAIK for both unix and win32 platforms.

> You can do a GUI to control the server regardless of this nonsense.

It is my hope that eventually any UI for the server will be unnecessary,
and that using its commandline will be an option used only for debugging.

  - Per



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