Subject: bin/6077: [PATCH] Backgammon manpage claims you can execute save files
To: None <gnats-bugs@gnats.netbsd.org>
From: Joseph Myers <jsm@octomino.demon.co.uk>
List: netbsd-bugs
Date: 08/31/1998 20:10:56
>Number:         6077
>Category:       bin
>Synopsis:       [PATCH] Backgammon manpage claims you can execute save files
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 31 13:35:02 1998
>Last-Modified:
>Originator:     Joseph Samuel Myers
>Organization:
Trinity College, University of Cambridge, UK
>Release:        NetBSD-current of 1998-08-30
>Environment:
[
System: Linux octomino 2.0.35 #1 Wed Aug 12 15:54:21 UTC 1998 i586 unknown
Architecture: i586
]
>Description:

The backgammon manpage claims that you can restore a saved game by
executing the save file.  This probably held for some long ago
version, but is nonsense now.  The patch below removes this game, and
stops save files being created with execute permission.

>How-To-Repeat:

>Fix:

diff -ruN backgammon/backgammon/backgammon.6 backgammon+/backgammon/backgammon.6
--- backgammon/backgammon/backgammon.6	Fri Oct 10 11:21:50 1997
+++ backgammon+/backgammon/backgammon.6	Mon Aug 31 19:50:59 1998
@@ -90,8 +90,6 @@
 .It Fl s Ar file
 recover previously saved game from
 .Ar file .
-(This can also be done by executing the saved file,
-i.e., typing its name in as a command)
 .El
 .Pp
 .\" 
diff -ruN backgammon/common_source/save.c backgammon+/common_source/save.c
--- backgammon/common_source/save.c	Sun Aug 30 11:05:05 1998
+++ backgammon+/common_source/save.c	Mon Aug 31 19:51:17 1998
@@ -95,7 +95,7 @@
 		}
 		*fs = '\0';
 		if ((fdesc = open(fname, O_RDWR)) == -1 && errno == ENOENT) {
-			if ((fdesc = creat(fname, 0700)) != -1)
+			if ((fdesc = creat(fname, 0600)) != -1)
 				break;
 		}
 		if (fdesc != -1) {
>Audit-Trail:
>Unformatted: