Bug 57687 - Tries to modify book.dat
Summary: Tries to modify book.dat
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: gnuchess   
(Show other bugs)
Version: 1.0
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: oxildntm
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-12-19 00:33 UTC by Enrico Scholz
Modified: 2008-05-01 15:38 UTC (History)
0 users

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


Attachments (Terms of Use)

Description Enrico Scholz 2001-12-19 00:33:42 UTC
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-19 00:34:34 UTC
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.