]> code.delx.au - gnu-emacs/commitdiff
configure --with-gameuser now defaults to games group.
authorUlrich Müller <ulm@gentoo.org>
Sun, 8 Feb 2015 20:00:49 +0000 (21:00 +0100)
committerUlrich Müller <ulm@gentoo.org>
Sun, 8 Feb 2015 20:09:22 +0000 (21:09 +0100)
* configure.ac (--with-gameuser): Default to 'games' group instead
of 'games' user.
* lisp/play/gamegrid.el: Update comment to reflect that the
'update-game-score' helper program is now setgid by default.

ChangeLog
configure.ac
etc/NEWS
lisp/ChangeLog
lisp/play/gamegrid.el

index ca9f44aacf7e475dd82ca25731406b339f552ca7..908ffe6230e299bc8d67134427cfe2e2f43d81f7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-08  Ulrich Müller  <ulm@gentoo.org>
+
+       * configure.ac (--with-gameuser): Default to 'games' group instead
+       of 'games' user.
+
 2015-02-04  Paul Eggert  <eggert@cs.ucla.edu>
 
        * .gitattributes: Ignore blanks at EOL in texinfo.tex.
index 5776e4ef8ed9d5352bfc4b90d000e584941116bf..192634bdc45de601f8f6b482ce281266fa6827e4 100644 (file)
@@ -397,17 +397,12 @@ AC_ARG_WITH(gameuser,dnl
                An argument prefixed by ':' specifies a group instead.])])
 gameuser=
 gamegroup=
+# We don't test if we can actually chown/chgrp here, because configure
+# may run without root privileges.  lib-src/Makefile.in will handle
+# any errors due to missing user/group gracefully.
 case ${with_gameuser} in
   no) ;;
-  "" | yes)
-    AC_MSG_CHECKING([whether a 'games' user exists])
-    if id -u games >/dev/null 2>&1; then
-      AC_MSG_RESULT([yes])
-      gameuser=games
-    else
-      AC_MSG_RESULT([no])
-    fi
-    ;;
+  "" | yes) gamegroup=games ;;
   :*) gamegroup=`echo "${with_gameuser}" | sed -e "s/://"` ;;
   *) gameuser=${with_gameuser} ;;
 esac
index c72a40974b581023cfa4c155a3780472b2bd81e4..4c7160ebca693c83c5705f4a6f426dc03783f583 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -53,7 +53,7 @@ build with 'make V=1'.
 group instead of a user if its argument is prefixed by ':' (a colon).
 This will cause the game score files in ${localstatedir}/games/emacs
 to be owned by that group, and the helper program for updating them to
-be installed setgid.
+be installed setgid.  The option now defaults to the 'games' group.
 
 ---
 ** The `grep-changelog' script (and its manual page) are no longer included.
index d95c0e6d6071094bbd5e5a68fffa64ad22a33dc1..8848fe6d904c12d6f9a6178525b72ec260c07735 100644 (file)
@@ -1,3 +1,8 @@
+2015-02-08  Ulrich Müller  <ulm@gentoo.org>
+
+       * play/gamegrid.el: Update comment to reflect that the
+       'update-game-score' helper program is now setgid by default.
+
 2015-02-08  David Kastrup  <dak@gnu.org>
 
        * subr.el (apply-partially): Use lexical binding here.
index b4c3c594731332f0c2b7a4c5d59ea07041ca5d9f..df06d5a6ab243abfeb9f15f8f37114a1d4af4b4e 100644 (file)
@@ -462,22 +462,22 @@ FILE is created there."
 ;;        `gamegrid-add-score' was supposed to be used in the past and
 ;;        is covered here for backward-compatibility.
 ;;
-;;     2. The helper program "update-game-score" is setuid and the
-;;        file FILE does already exist in a system wide shared game
-;;        directory.  This should be the normal case on POSIX systems,
-;;        if the game was installed system wide.  Use
+;;     2. The helper program "update-game-score" is setgid or setuid
+;;        and the file FILE does already exist in a system wide shared
+;;        game directory.  This should be the normal case on POSIX
+;;        systems, if the game was installed system wide.  Use
 ;;        "update-game-score" to add the score to the file in the
 ;;        shared game directory.
 ;;
-;;     3. "update-game-score" is setuid, but the file FILE does *not*
-;;        exist in the system wide shared game directory.  Use
+;;     3. "update-game-score" is setgid/setuid, but the file FILE does
+;;        *not* exist in the system wide shared game directory.  Use
 ;;        `gamegrid-add-score-insecure' to create--if necessary--and
 ;;        update FILE.  This is for the case that a user has installed
 ;;        a game on her own.
 ;;
-;;     4. "update-game-score" is not setuid.  Use it to create/update
-;;        FILE in the user's home directory.  There is presumably no
-;;        shared game directory.
+;;     4. "update-game-score" is not setgid/setuid.  Use it to
+;;        create/update FILE in the user's home directory.  There is
+;;        presumably no shared game directory.
 
 (defvar gamegrid-shared-game-dir)
 
@@ -491,7 +491,7 @@ FILE is created there."
           (gamegrid-add-score-insecure file score))
          ((and gamegrid-shared-game-dir
                (file-exists-p (expand-file-name file shared-game-score-directory)))
-          ;; Use the setuid (or setgid) "update-game-score" program
+          ;; Use the setgid (or setuid) "update-game-score" program
           ;; to update a system-wide score file.
           (gamegrid-add-score-with-update-game-score-1 file
            (expand-file-name file shared-game-score-directory) score))