<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39957 >
> [wsimpson - Sun Dec 09 22:15:45 2007]:
> Sent send_ruleset_choices() when HACK is not successful.
> Redundant send_conn_info() when HACK is not successful.
> File should be deleted by server, client doesn't always have
> Implies every client request should have different file?
> Really need different paradigm for 2.2, perhaps the AUTH system?
We ameliorated this situation somewhat for warserver by
introducing/modifying the cmdlevels to:
ALLOW_NONE = 0, /* user may issue no commands at all */
ALLOW_OBSERVER, /* user may issue observer commands */
ALLOW_BASIC, /* user may issue basic commands - default */
ALLOW_CTRL, /* user may issue commands that affect game &
ALLOW_ADMIN, /* admin user */
ALLOW_HACK, /* user may issue *all* commands - dangerous! */
and implementing an ACL like system for assigning cmdlevels to
new connections based on action results:
ACTION_BAN = 0,
The ACL is a text file that gives the rules for computing the above
results per connection, e.g.:
ban *.foo.com # same as hostname=*.foo.com
basic * # everyone else gets basic
Obviously before the ACL can be applied, AUTH must be enabled and
working and the hostname lookup must be completed. Now that I
think of it, it would probably better to make an ACL table in the
mysql database and load/save the rules from there.
I would not copy our implementation wholesale; there is lots of
cruft from older "experimental" versions bloating the ACL code, and
probably some bugs lurking around. But in the interests of sharing
our ideas and preventing you from re-inventing the wheel, I hope
this is of some help to you. :)
Freeciv-dev mailing list