aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2017-03-12 12:04:10 -0700
committerPaul Eggert2017-03-12 12:04:10 -0700
commit995be66f0f0d26d1a96cbb8dfb429c3941157771 (patch)
treebdfcd011288f3ee5ca2ae228c5830f8d11b9f41f /src
parentf7040f5b1615162845c84f41125f008a5eb604f3 (diff)
downloademacs-995be66f0f0d26d1a96cbb8dfb429c3941157771.tar.gz
emacs-995be66f0f0d26d1a96cbb8dfb429c3941157771.zip
Install update-game-score only on request
Most distributions do not install update-game-score properly due to setuid/setgid complications, so install it only when the installer specifies a user or group (Bug#25895). * .gitattributes: Remove lib-src/update-game-score.exe.manifest. * Makefile.in (gameuser, gamegroup, use_gamedir, PATH_GAME): New vars. (epaths-force): Use PATH_GAME. (uninstall): Remove snake-scores and tetris-scores only if shared. * configure.ac: Default --with-gameuser to 'no'. (UPDATE_MANIFEST): Remove. * etc/NEWS: Mention this. * lib-src/Makefile.in (UPDATE_MANIFEST): Remove. (use_gamedir): New macro. (UTILITIES): Remove update-game-score unless use_gamedir. (SCRIPTS): Remove $(UPDATE_MANIFEST). ($(DESTDIR)${archlibdir}): Install game directory program and data only if use_gamedir. * lib-src/update-game-score.exe.manifest: Remove, as update-game-score is no longer installed on MS-Windows. * lisp/play/gamegrid.el (gamegrid-add-score-with-update-game-score): Use auxiliary program only if setuid or setgid. * make-dist: Do not distribute update-game-score.exe.manifest. * src/callproc.c (init_callproc): Set Vshared_game_score_directory based on PATH_GAME, not DOS_NT. (syms_of_callproc): Remove unnecessary initialization of Vshared_game_score_directory.
Diffstat (limited to 'src')
-rw-r--r--src/callproc.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/callproc.c b/src/callproc.c
index 08fa6e97722..05048576ce9 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1584,13 +1584,14 @@ init_callproc (void)
1584 sh = getenv ("SHELL"); 1584 sh = getenv ("SHELL");
1585 Vshell_file_name = build_string (sh ? sh : "/bin/sh"); 1585 Vshell_file_name = build_string (sh ? sh : "/bin/sh");
1586 1586
1587#ifdef DOS_NT 1587 Lisp_Object gamedir = Qnil;
1588 Vshared_game_score_directory = Qnil; 1588 if (PATH_GAME)
1589#else 1589 {
1590 Vshared_game_score_directory = build_unibyte_string (PATH_GAME); 1590 Lisp_Object path_game = build_unibyte_string (PATH_GAME);
1591 if (NILP (Ffile_accessible_directory_p (Vshared_game_score_directory))) 1591 if (file_accessible_directory_p (path_game))
1592 Vshared_game_score_directory = Qnil; 1592 gamedir = path_game;
1593#endif 1593 }
1594 Vshared_game_score_directory = gamedir;
1594} 1595}
1595 1596
1596void 1597void
@@ -1661,11 +1662,6 @@ includes this. */);
1661 DEFVAR_LISP ("shared-game-score-directory", Vshared_game_score_directory, 1662 DEFVAR_LISP ("shared-game-score-directory", Vshared_game_score_directory,
1662 doc: /* Directory of score files for games which come with GNU Emacs. 1663 doc: /* Directory of score files for games which come with GNU Emacs.
1663If this variable is nil, then Emacs is unable to use a shared directory. */); 1664If this variable is nil, then Emacs is unable to use a shared directory. */);
1664#ifdef DOS_NT
1665 Vshared_game_score_directory = Qnil;
1666#else
1667 Vshared_game_score_directory = build_string (PATH_GAME);
1668#endif
1669 1665
1670 DEFVAR_LISP ("initial-environment", Vinitial_environment, 1666 DEFVAR_LISP ("initial-environment", Vinitial_environment,
1671 doc: /* List of environment variables inherited from the parent process. 1667 doc: /* List of environment variables inherited from the parent process.