Bug 57687 - Tries to modify book.dat
Tries to modify book.dat
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: gnuchess (Show other bugs)
1.0
i386 Linux
medium Severity low
: ---
: ---
Assigned To: oxildntm
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-12-18 19:33 EST by Enrico Scholz
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-12-18 19:34:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Enrico Scholz 2001-12-18 19:33:42 EST
gnuchess tries to store its gained knowledge into book.dat. Because
book.dat is not writable for common users and is located in a potential
read-only directory, gnuchess will not have a chance to evolute.

I suggest to
- move book.dat into /var/lib/games/gnuchess which is writable by group
  'games' and
- set the SGID bit on the gnuchess executable and make its group 'games'


In the current manner, the book.dat is completely senseless because
gnuchess does not use it:

--------
$ strace -eopen gnuchess
...
White (1) : go
Thinking...
open("/usr/share/gnuchess/book.dat", O_RDWR) = -1 EACCES (Permission denied)
 no book (/usr/share/gnuchess/book.dat).
...
---------

With my suggestion you'll get

---------
$ gnuchess   ## strace not applicable because it resets SGID
...
White (1) : go
Thinking...
Read opening book (/usr/share/gnuchess/book.dat)... Opening database: 5872
book positions.
In this position, 2 moves are book moves:
---------
Comment 1 Enrico Scholz 2001-12-18 19:34:34 EST
Forgot to mention:

$ rpm -q gnuchess
gnuchess-5.02-1

Note You need to log in before you can comment on or make changes to this bug.