Subject: Bug#3183: permissions problems with /var/lib/games

From: Austin Donnelly <[email-masked]>
Date: Sun, 2 Jun 96 15:28 BST

Package: base
Version: 1.1.0-2

/var/lib/games isn't created in the current set of base discs. It
probably should be, in order to enforce some sort of system wide
policy concerning the permissions of this directory.

At the moment, the first package which creates the directory sets its
permissions:

mirrormagic-1.3-2.deb              drwxrwsr-x root/games
maelstrom-1.4.1-L6-3.deb           drwxr-xr-x root/root
xtet42-2.02-2.deb                  drwxr-xr-x root/root
xonix-1.4-2.deb                    drwxr-xrwx root/root
nethack-3.1.3-2.deb                drwxr-xr-x root/daemon
xpat2-1.04-1.deb                   drwxr-xr-x root/root
xsok-1.01-1.deb                    drwxr-xr-x root/root

My permissions have somehow got to drwx------ games/root, which makes
most things barf.

The Guidelines document doesn't seem to say anything about the
permissions. The FSSTND FAQ has nothing to offer either. The FSSTND
itself doesn't suggest permissions for the directory.

Can we come to a consensus over the permissions for this directory,
and then have this directory created by the base discs?

I would suggest:

  drwxrwx--- games/games

and then make all games setuid games or setgid games (with preference
to being setgid).

Comments?
[Note: this is being filed as a bug report against the base package]

Austin

---

From: Alexander Goldstein <[email-masked]>
Date: Sun, 2 Jun 1996 21:15:09 -0500 (CDT)

> and then make all games setuid games or setgid games (with preference

Can all X games be requred setgid games?   If the executable is setuid, it
will not be able to connect to the X server.

---

From: Ian Jackson <[email-masked]>
Date: Tue, 4 Jun 96 03:26 BST

Austin Donnelly writes ("Bug#3183: permissions problems with /var/lib/games"):
...
> and then make all games setuid games or setgid games (with preference

The permissions on /var/lib/games should be drwxrwxr-x root.root.

This is so that each game can decide on its own security policy.  For
example, for some games it is good to be able to read the high score
table without needing a set-id program.

Games which need to keep score files, save games, &c, safe from prying
eyes and or fingers should be set-*g*id to games and use files and
directories with appropriate permissions.

They should *not* be set-*u*id games.  If they are then anyone who
manages to break the security of any game can get control of the
account of any game-player quite easily by trojanning a game binary,
rather than only getting control over all the games' saved data (and
possibly getting access to other players' accounts with considerably
more effort).

Ian.