• Ulrich Müller's avatar
    Allow update-game-score to run sgid instead of suid. · 20f66485
    Ulrich Müller authored
    * configure.ac (gamegroup): New AC_SUBST.
    (--with-gameuser): Allow to specify a group instead of a user.
    In the default case, check at configure time if a 'games' user
    exists.
    * lib-src/update-game-score.c: Allow the program to run sgid
    instead of suid, in order to match common practice for most games.
    (main): Check if we are running sgid.  Pass appropriate file
    permission bits to 'write_scores'.
    (write_scores): New 'mode' argument, instead of hardcoding 0644.
    (get_prefix): Update error message.
    * lib-src/Makefile.in (gamegroup): New variable, set by configure.
    ($(DESTDIR)${archlibdir}): Handle both suid or sgid when
    installing the 'update-game-score' program.
    * lisp/play/gamegrid.el (gamegrid-add-score-with-update-game-score):
    Allow the 'update-game-score' helper program to run suid or sgid.
    20f66485
gamegrid.el 18.7 KB