Just replying to my own post with a new idea I got from myself. :-)
Your approach ... really comes down to including a tiny static library in the
source, and has all the problems that come with it.
...
[M]y approach is similar to using an external shared library, with all the
benefits that come with it.
We can also use a real shared library[1]. This has several benefits and
one major drawback:
Benefits:
- No special code is required at the start of the game.
- Other functionality is easier to add, such as using a highscore server
(locally or on the net).
- Highscore parsing code is taken out of the game to a central place,
which allows us to really close the security hole of badly written games
(as far as high score files are concerned).
Drawback:
- The current code that has already been written by the Fedora people is
not usable, and must be replaced by calls into the library. In fact,
this may mean significant rewriting work for each game.
The benefits are nice, but the drawback is huge. I would like to agree
the following about games with a central highscore file:
- New games and games for which this is initially implemented should be
written to use the shared library.
- Games which already use their own system should be patched using the
method Fedory uses.
- It is considered an improvement, but not a priority, to patch games to
use the shared library instead of their own handling, and thus to move
from the sgid-safe patch to the shared library patch.