pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/nethack-lib Set a setuid bit on bin/recover too



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8f9b8c1e3e54
branches:  trunk
changeset: 347179:8f9b8c1e3e54
user:      pho <pho%pkgsrc.org@localhost>
date:      Wed Jan 08 16:55:13 2020 +0000

description:
Set a setuid bit on bin/recover too

Also corrected the default directory where bin/recover searches for
save files.

diffstat:

 games/nethack-lib/Makefile                     |   8 +++++++-
 games/nethack-lib/distinfo                     |   3 ++-
 games/nethack-lib/patches/patch-util_recover.c |  19 +++++++++++++++++++
 3 files changed, 28 insertions(+), 2 deletions(-)

diffs (62 lines):

diff -r 63809a184743 -r 8f9b8c1e3e54 games/nethack-lib/Makefile
--- a/games/nethack-lib/Makefile        Wed Jan 08 15:25:48 2020 +0000
+++ b/games/nethack-lib/Makefile        Wed Jan 08 16:55:13 2020 +0000
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.32 2019/10/24 11:51:23 pho Exp $
+# $NetBSD: Makefile,v 1.33 2020/01/08 16:55:13 pho Exp $
 #
 
 .include               "../../games/nethack-lib/Makefile.common"
 
 PKGNAME=               nethack-lib-${NETHACK_VERSION}
+PKGREVISION=           1
 
 COMMENT=               Data files for Nethack
 
@@ -47,4 +48,9 @@
                        ${VARDIR}/xlogfile                              \
                        ${HACKDIR}/sysconf
 
+# Like bin/nethack-*, bin/recover also has to operate on save files
+# owned by ${NETHACK_USER}:${NETHACK_GROUP}. This means bin/recover
+# can only work when it's setuid'ed to that user/group.
+SPECIAL_PERMS+=                ${PREFIX}/bin/recover ${GAMEPERM}
+
 .include "../../mk/bsd.pkg.mk"
diff -r 63809a184743 -r 8f9b8c1e3e54 games/nethack-lib/distinfo
--- a/games/nethack-lib/distinfo        Wed Jan 08 15:25:48 2020 +0000
+++ b/games/nethack-lib/distinfo        Wed Jan 08 16:55:13 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.24 2019/12/19 14:41:59 rhialto Exp $
+$NetBSD: distinfo,v 1.25 2020/01/08 16:55:13 pho Exp $
 
 SHA1 (nethack-364-src.tgz) = e8166806a65893d7b843718c37b8aa9e87cfcef1
 RMD160 (nethack-364-src.tgz) = 0af138fd481e6359f265d85423a36a160692dc92
@@ -14,3 +14,4 @@
 SHA1 (patch-sys_unix_Makefile.top) = 0736aafda67dec45657f9f15338ce2f89add9747
 SHA1 (patch-sys_unix_Makefile.utl) = 142f267fdd9a94c212657b7242dea6a3716c738e
 SHA1 (patch-sys_unix_nethack.sh) = eec4b6619584d7e07ac5d9a086af9bc8f7e6285f
+SHA1 (patch-util_recover.c) = 60e5ec35313a97cf788ff1ed4a4772bbcf24bc48
diff -r 63809a184743 -r 8f9b8c1e3e54 games/nethack-lib/patches/patch-util_recover.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/nethack-lib/patches/patch-util_recover.c    Wed Jan 08 16:55:13 2020 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-util_recover.c,v 1.1 2020/01/08 16:55:13 pho Exp $
+
+The directory where save files are located is defined as
+VAR_PLAYGROUND. HACKDIR only has static files.
+
+--- util/recover.c.orig        2020-01-08 16:49:06.924084164 +0000
++++ util/recover.c
+@@ -121,9 +121,9 @@ char *argv[];
+     }
+ #endif /* SECURE && !VMS */
+ 
+-#ifdef HACKDIR
++#ifdef VAR_PLAYGROUND
+     if (!dir)
+-        dir = HACKDIR;
++        dir = VAR_PLAYGROUND;
+ #endif
+ 
+ #ifdef AMIGA



Home | Main Index | Thread Index | Old Index