Check validity of promotion piece in long algebraic
[capablanca.git] / lasker-2.2.3 / README
1 Introduction
2 ------------
3
4 This is an enhanced version of the 'lasker' internet chess server. I
5 started to enhance Lasker when I needed a working chess server for a
6 local school. You can get the original 'lasker' release from
7 http://chessd.sourceforge.net/ and you can get my enhanced version
8 from http://chess.samba.org/
9
10 Here is a list of some of the new features in this version:
11
12      - lots and lots of bugs fixed
13      - timeseal support added (see timeseal/README for details)
14      - server configuration via 'aconfig' command instead of config.h
15      - added multi-part command parsing (commands separated by ';')
16      - enhanced aliases
17      - build/install process fixed
18      - fixed help system
19      - transparent server reload (upgrade without disturbing connections or games)
20
21
22 Installation
23 ------------
24
25 First you need to configure and compile the chessd server. Do
26 something like the following:
27
28           cd src
29           ./configure --prefix=/usr/local
30           make
31
32 Then to install the server run "make install". That will install a
33 basic skeleton installation in /usr/local/chessd. 
34
35 Setting up
36 ----------
37
38 Next you will want to launch your chess server using the command:
39      bin/chessd -f -p 5000
40 while in the chessd/ directory. This will launch the chess server
41 using the skeleton data you installed above.
42
43 I highly recommend creating a separate account on your machine to run
44 the chess daemon. This user should own all files in the chessd
45 directory.
46
47 After you launch chessd for the first time you will need to login as
48 the special user 'admin'. That username will be recognised as the
49 server administrator and you will be logged in with the rather unusual
50 combination of a head administrator who is also an unregistered
51 player.
52
53 The first thing you will want to do as the admin user is create a
54 proper 'admin' account with a password. Use the command 'addplayer'
55 while logged in as the admin user to create the admin account. You
56 will be told the password. Then you should immediately logout and log
57 back in using the admin password you have just been given. You will
58 probably want to change this password using the 'asetpass' command. 
59
60 You may also find the following commands useful:
61     ahelp addplayer
62     ahelp asetpass
63     ahelp commands
64
65
66 Securing your server
67 --------------------
68
69 The source code for this chess server has been hacked on by dozens of
70 people over the years. It almost certainly has exploitable buffer
71 overruns or other security holes. If you are like me then you won't
72 like the idea of running an insecure program like that on your server.
73
74 To make it a lot more secure you can choose to run the chess server in
75 a chroot jail. This makes it much harder for an attacker to gain a
76 foothold on your server. It won't prevent them from crashing the
77 chessd process but it will prevent them from gaining access to other
78 parts of the system.
79
80 To run chessd in a chroot jail you need to do the following:
81
82    1) chessd needs to be setuid root. I know this sounds bizarre, but
83       it needs root privileges to use the chroot() system
84       call. Immediately after the chroot chessd will permanently lose
85       its root privileges and instead become the user that launched
86       chessd. To make chessd setuid root do this as root:
87               chown root chessd
88               chmod u+s chessd
89
90    2) pass the command line option -R to tell chessd that it should
91       chroot to the current directory. So to launch chessd you can use
92       this:
93                 chessd -p 5000 -T /usr/local/bin/timeseal_decoder -R /usr/local/chessd
94
95       You may also like to look at the start_chessd script in the
96       scripts directory. This is the script I use to keep chessd
97       always running on my machine.
98
99 If you do use the -R option then I also recommend that you don't place
100 any of the chess server binaries (or any other binaries or libraries)
101 inside the chessd directory. That will increase the security of your
102 server a little.
103
104
105 Email spool
106 -----------
107
108 This chess server does not send emails directly, instead it puts
109 outgoing emails in the spool/ directory and waits for some external
110 program or script to deliver them. I designed it this way as it makes
111 it possible to send email from a chess server in a chroot jail, and
112 offers more flexibility in how email is handled (as that tends to vary
113 a lot between systems).
114
115 If you run sendmail then the sample script in scripts/spool_sendmail
116 might be good enough. Just run this script at startup and it will send
117 all spooled mail every minute.
118
119
120 Server reload
121 -------------
122
123 This version of chessd supports reloading the server code without
124 having to shutdown the server or disturb any games that are in
125 progress. This allows for on the fly upgrades, hopefully without the
126 users even noticing that the system is being upgraded.
127
128 In order to support this functionality I had to make the source code
129 rather more Linux specific than it was previously, but I think that is
130 worth it for the functionality. It would be possible to port the code
131 to many other platforms, but I have not yet done so.
132
133 To reload the server use the command 'areload'. You must be at the
134 ADMIN_GOD admin level to issue this command.
135
136 Updates
137 -------
138
139 Updates will be available on http://chess.samba.org/
140
141 You may wish to use the cvs version to enable you to update more
142 easily. I will only be doing tar ball releases occasionally.
143
144 License
145 -------
146
147 This chess server release is under the GNU General Public License,
148 which is the license used by the original chess server written by
149 Richard Nash. Various parts of the server are under different
150 licenses, depending on who wrote what part, but I believe that all of
151 the licenses are compatible with the GPL.
152
153 The reason I chose the GPL for this release is that I don't want this
154 code to become proprietary again. This has happened at least 3 times
155 in the past with this source code and while I'm sure there were very
156 good reasons at the time, it does mean that the freely available chess
157 servers have not benefited from the considerable development that has
158 happened over the past seven years. 
159
160 I also chose the GPL because it allows me to incorporate source code
161 from other GPLd projects. This saved me quite a lot of time, and is
162 sure to be useful again.
163
164
165 --------------------------------
166 Andrew Tridgell
167 tridge@chess.samba.org June 2002
168 --------------------------------