Bug 786745 - gnuchess only runs when logged in as root
gnuchess only runs when logged in as root
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE 12.2
Classification: openSUSE
Component: Other
Final
x86-64 openSUSE 12.2
: P5 - None : Normal (vote)
: ---
Assigned To: Michael Catanzaro
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-25 15:56 UTC by Foolish Ewe
Modified: 2013-05-02 08:06 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
gnuchess 6.0.2 log, shows correct startup (833 bytes, text/x-log)
2012-12-21 15:25 UTC, Foolish Ewe
Details
reattached, forgot to clear needInfo status when I first did it. (833 bytes, text/x-log)
2012-12-21 15:28 UTC, Foolish Ewe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Foolish Ewe 2012-10-25 15:56:54 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0

There appears to be some permissions or other issues with the gnuchess install, it aborts with the message:
book_open(): can't open file "/usr/share/gnuchess/book.bin": Permission denied

Reproducible: Always

Steps to Reproduce:
1.log in as a user (not root)
2.start gnuchess (or something like xboard which has a gnuchess client)
3.
Actual Results:  
gnuchess
GNU Chess 6.0.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
book_open(): can't open file "/usr/share/gnuchess/book.bin": Permission denied

However note as root we get a normal startup:
sudo gnuchess
GNU Chess 6.0.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
White (1) : 


Expected Results:  
gnu chess runs

I think book.bin is the opening book, I'm not sure why gnuchess would need
write permission to the opening book if I understand correctly.

This may be an upstream problem, perhaps http://forums.freebsd.org/showthread.php?t=25092 is related.  However, when I tried their suggested solution, I get no joy, instead I get the following:

 ls -lad /usr/share/gnuchess/book.bin 
-rw-r--r-- 1 root root 2885728 Jul 16 06:10 /usr/share/gnuchess/book.bin
sudo chmod 644 /usr/share/gnuchess/book.bin
gnuchess
GNU Chess 6.0.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
book_open(): can't open file "/usr/share/gnuchess/book.bin": Permission denied
Comment 1 Josef Reidinger 2012-10-29 08:50:58 UTC
Yes, I agree that it looks like upstream issue. We don't allow to write to static data in /usr/share ... it is againts LSB to have it there. I try to investigate why it want to open it with write permissions and patch it out if possible.
Comment 2 Foolish Ewe 2012-11-02 15:51:07 UTC
Thanks Josef for looking into this.
Comment 3 Josef Reidinger 2012-11-05 09:27:12 UTC
Could you please try to update to version 6.0.2? I also try it on my pc where I have 6.0.2 and it works for me. If it still doesn't work for you, please provide strace:
strace -o /tmp/gnuchess.strace -f gnuchess #strace is in /tmp/gnuchess.strace

Thanks
Comment 4 Josef Reidinger 2012-12-12 17:36:02 UTC
ping
Comment 5 Foolish Ewe 2012-12-21 15:12:50 UTC
Josef:

Sorry for the delay on this.  Is there a repo with a rpm for 6.0.2 available, apparently my latest zypper up didn't update me to that version.

 rpm -q -i gnuchess
Name        : gnuchess
Version     : 6.0.1
Release     : 2.1.2
Architecture: x86_64
Install Date: Sat 13 Oct 2012 01:48:17 AM EDT
Group       : Amusements/Games/Board/Chess
Size        : 3291137
License     : GPL-2.0+
Signature   : RSA/SHA256, Mon 16 Jul 2012 06:11:01 AM EDT, Key ID b88b2fd43dbdc284
Source RPM  : gnuchess-6.0.1-2.1.2.src.rpm
Build Date  : Mon 16 Jul 2012 06:10:31 AM EDT
Build Host  : build27
Relocations : (not relocatable)
Packager    : http://bugs.opensuse.org
Vendor      : openSUSE
URL         : http://alpha.uhasselt.be/Research/Algebra/Toga/gnuchess-release/
Summary     : GNU Chess Program
Description :
A worthy chess opponent that runs in text mode. Find an X11 interface
in the xboard package.
Distribution: openSUSE 12.2

zypper lr
#  | Alias                                             | Name                                              | Enabled | Refresh
---+---------------------------------------------------+---------------------------------------------------+---------+--------
 1 | Development_Miscellaneous_Languages_OpenSuse_12.2 | Development Miscellaneous Languages OpenSuse 12.2 | Yes     | Yes    
 2 | Games_OpenSus                                     | Games OpenSuse 12.2                               | Yes     | Yes    
 3 | Haskell_OpenSuse_12.2                             | Haskell OpenSuse 12.2                             | Yes     | Yes    
 4 | IRC_Open                                          | IRC OpenSUSE 12.2                                 | Yes     | Yes    
 5 | Packman_Opensuse_12.2_(Jacobs-University_mirror)  | Packman Opensuse 12.2 (Jacobs-University mirror)  | Yes     | Yes    
 6 | Science_OpenSUSE_12.2                             | Science OpenSUSE 12.2                             | Yes     | Yes    
 7 | Server_Database_OpenSuse_12.2                     | Server Database OpenSuse 12.2                     | Yes     | Yes    
 8 | devel:languages:scala                             | devel:languages:scala                             | Yes     | Yes    
 9 | jenkins                                           | jenkins                                           | Yes     | No     
10 | openSUSE-12.2-1.6                                 | openSUSE-12.2-1.6                                 | No      | No     
11 | repo-debug                                        | openSUSE-12.2-Debug                               | No      | Yes    
12 | repo-debug-update                                 | openSUSE-12.2-Update-Debug                        | No      | Yes    
13 | repo-debug-update-non-oss                         | openSUSE-12.2-Update-Debug-Non-Oss                | No      | Yes    
14 | repo-non-oss                                      | openSUSE-12.2-Non-Oss                             | Yes     | Yes    
15 | repo-oss                                          | openSUSE-12.2-Oss                                 | Yes     | Yes    
16 | repo-source                                       | openSUSE-12.2-Source                              | No      | Yes    
17 | repo-update                                       | openSUSE-12.2-Update                              | Yes     | Yes    
18 | repo-update-non-oss                               | openSUSE-12.2-Update-Non-Oss                      | Yes     | Yes    

sudo zypper lu
root's password:
Retrieving repository 'Games OpenSuse 12.2' metadata .....................................................................................................................................[done]
Building repository 'Games OpenSuse 12.2' cache ..........................................................................................................................................[done]
Loading repository data...
Reading installed packages...
No updates found.
Comment 6 Foolish Ewe 2012-12-21 15:25:47 UTC
Created attachment 518085 [details]
gnuchess 6.0.2 log, shows correct startup

Josef:

It is indeed fixed in 6.0.2.  I found the rpm on line, apparently a version was in the factory.  It may be appropriate to mark this issue as resolved.

Thank you very much.
Comment 7 Foolish Ewe 2012-12-21 15:28:34 UTC
Created attachment 518086 [details]
reattached, forgot to clear needInfo status when I first did it.

Josef:

Sorry about attaching this twice, but I forgot to clear the needInfo status.

It is indeed fixed in 6.0.2.  I found the rpm on line, apparently a version was
in the factory.  It may be appropriate to mark this issue as resolved.

Thank you very much.
Comment 8 Michael Catanzaro 2013-04-02 15:33:59 UTC
Hm, this still needs to be fixed for 12.2 as the program is unusable. Mr. Maintenance, can we just do an update to 6.0.2 (or 6.0.3)?

Version 6.0.3 (March 2013)

- Run autoreconf and configure based on autoconf 2.69 and automake 1.13
to get rid of these vulnerabilies:
  http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4029
  http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-3386
- Update configure.ac to automake 1.13.
- If in manual mode, keep it after undo.
- Remove some unused code.

Version 6.0.2 (March 2012)

- New option --addbook to compile a book.
- Maximum file name length of EPD files extended to 127 characters.
- Book file allowed to be read only unless the BookLearn option is set.

12.3 is currently at 6.0.2 which isn't affected by this bug; since all the 6.0.3 changes only affect the build, it seems fine to leave it be in 12.3.
Comment 9 Benjamin Brunner 2013-04-02 15:47:53 UTC
Michael, could you create a maintenancerequest with the 6.0.2 package, please?
Comment 10 Michael Catanzaro 2013-04-15 01:33:03 UTC
Whoops, sorry for the delay.
Comment 11 Bernhard Wiedemann 2013-04-15 03:00:08 UTC
This is an autogenerated message for OBS integration:
This bug (786745) was mentioned in
https://build.opensuse.org/request/show/164013 Maintenance /
Comment 12 Benjamin Brunner 2013-04-22 14:54:27 UTC
Update released for openSUSE 12.2. Resolved fixed.
Comment 13 Swamp Workflow Management 2013-05-02 08:06:09 UTC
openSUSE-RU-2013:0734-1: An update that has one recommended fix can now be installed.

Category: recommended (low)
Bug References: 786745
CVE References: 
Sources used:
openSUSE 12.2 (src):    gnuchess-6.0.2-2.4.1