diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-03-12 12:04:10 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-03-12 12:04:10 -0700 |
commit | 995be66f0f0d26d1a96cbb8dfb429c3941157771 (patch) | |
tree | bdfcd011288f3ee5ca2ae228c5830f8d11b9f41f /src | |
parent | f7040f5b1615162845c84f41125f008a5eb604f3 (diff) | |
download | emacs-995be66f0f0d26d1a96cbb8dfb429c3941157771.tar.gz |
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.c | 20 |
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) sh = getenv ("SHELL"); Vshell_file_name = build_string (sh ? sh : "/bin/sh"); -#ifdef DOS_NT - Vshared_game_score_directory = Qnil; -#else - Vshared_game_score_directory = build_unibyte_string (PATH_GAME); - if (NILP (Ffile_accessible_directory_p (Vshared_game_score_directory))) - Vshared_game_score_directory = Qnil; -#endif + Lisp_Object gamedir = Qnil; + if (PATH_GAME) + { + Lisp_Object path_game = build_unibyte_string (PATH_GAME); + if (file_accessible_directory_p (path_game)) + gamedir = path_game; + } + Vshared_game_score_directory = gamedir; } void @@ -1661,11 +1662,6 @@ includes this. */); DEFVAR_LISP ("shared-game-score-directory", Vshared_game_score_directory, doc: /* Directory of score files for games which come with GNU Emacs. If this variable is nil, then Emacs is unable to use a shared directory. */); -#ifdef DOS_NT - Vshared_game_score_directory = Qnil; -#else - Vshared_game_score_directory = build_string (PATH_GAME); -#endif DEFVAR_LISP ("initial-environment", Vinitial_environment, doc: /* List of environment variables inherited from the parent process. |