Bug#930128: tint: Error creating /var/games/tint.scores

Asher Gordon AsDaGo at posteo.net
Mon Dec 9 04:07:39 GMT 2019


Package: tint
Version: 0.05+b1
Followup-For: Bug #930128

Hi Mark,

Mark Van den Borre <mvandenborre at fosdem.org> writes:

> May I suggest updating the default high scores file to the user's home
> directory?

A better solution would be to have /usr/games/tint binary be owned by
the group "games" and set the set-group-ID bit. This would allow it to
write /var/games/tint.scores since that file is writable by the "games"
group.

This solution is better than having the high scores file in the user's
home directory, because this way if multiple users are playing, they can
each see each others high scores.

In fact, many games in Debian do this already (take moon-buggy for
example).

You can work around this bug by changing the group and set-group-ID bit
yourself:

    $ su
    Password:
    # chown root:games /usr/games/tint 
    # chmod g+s /usr/games/tint
    # exit
    $ ls -l /usr/games/tint
    -rwxr-sr-x 1 root games 27032 Aug  7 04:48 /usr/games/tint*
    $ tint
    Choose a level to start [1-9]: 1
    <Play game>
               PLAYER STATISTICS

            Score               186
            Efficiency           -1
            Score ratio           8
    Congratulations! You have a new high score.
    Enter your name [asher]: Asher

               TINT HIGH SCORES

            Rank   Score        Name

              1*     186        Asher

Hopefully you get a better score than I did, but as you can see, it did
save the score.

By the way: I played TINT a while ago, and I'm pretty sure this bug
wasn't present then (most likely someone accidentally removed the
set-group-ID bit from the package since then).

Also, in my opinion, the severity of this bug should be important or
even serious since saving high scores are a big part of the game. But
I'll leave that up to the Maintainers to decide.


Asher


-- 
It's better to be quotable than to be honest.
                -- Tom Stoppard

GPG fingerprint: 38F3 975C D173 4037 B397  8095 D4C9 C4FC 5460 8E68


-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.3.0-2-amd64 (SMP w/2 CPU cores)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages tint depends on:
ii  libc6        2.29-3
ii  libncurses6  6.1+20191019-1
ii  libtinfo6    6.1+20191019-1

tint recommends no packages.

tint suggests no packages.

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-games-devel/attachments/20191208/89067d75/attachment.sig>


More information about the Pkg-games-devel mailing list