aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authortg <tg@FreeBSD.org>1998-03-26 20:13:39 +0800
committertg <tg@FreeBSD.org>1998-03-26 20:13:39 +0800
commit581066a60e89135e1c4ae6382cba067b50368882 (patch)
treea70e7f9dd9b16fa286e55d55ac2c0668bd7c1406 /games
parent60f2c7cf166a94bc1db7e82f44f88ab8cff844ad (diff)
downloadfreebsd-ports-gnome-581066a60e89135e1c4ae6382cba067b50368882.tar.gz
freebsd-ports-gnome-581066a60e89135e1c4ae6382cba067b50368882.tar.zst
freebsd-ports-gnome-581066a60e89135e1c4ae6382cba067b50368882.zip
Create high score dir with mode 755, when installing from the package.
Respect $HOME/.Xauthority.
Diffstat (limited to 'games')
-rw-r--r--games/xkobo/Makefile4
-rw-r--r--games/xkobo/files/patch-aa19
-rw-r--r--games/xkobo/files/patch-ab35
-rw-r--r--games/xkobo/pkg-plist4
4 files changed, 58 insertions, 4 deletions
diff --git a/games/xkobo/Makefile b/games/xkobo/Makefile
index 677092833771..a638fa553e9e 100644
--- a/games/xkobo/Makefile
+++ b/games/xkobo/Makefile
@@ -3,7 +3,7 @@
# Date created: 18 Jul 1995
# Whom: jkh
#
-# $Id: Makefile,v 1.9 1997/07/02 07:54:05 tg Exp $
+# $Id: Makefile,v 1.10 1997/11/12 09:57:17 tg Exp $
#
DISTNAME= xkobo-1.11
@@ -12,6 +12,8 @@ MASTER_SITES= ${MASTER_SITE_XCONTRIB} \
ftp://ftp.uoknor.edu/mirrors/X/contrib/games/
MASTER_SITE_SUBDIR= games
+MAINTAINER= ports@FreeBSD.ORG
+
USE_IMAKE= yes
ALL_TARGET= xkobo
diff --git a/games/xkobo/files/patch-aa b/games/xkobo/files/patch-aa
index 621b23d399ce..34330e40acd7 100644
--- a/games/xkobo/files/patch-aa
+++ b/games/xkobo/files/patch-aa
@@ -1,5 +1,5 @@
--- Imakefile.orig Fri Jan 10 03:29:36 1997
-+++ Imakefile Wed Nov 12 10:55:46 1997
++++ Imakefile Wed Mar 25 20:18:50 1998
@@ -6,7 +6,7 @@
SHIPS = 5
@@ -9,3 +9,20 @@
/* C++ COMPILER */
/* CXX = g++ */
+@@ -19,6 +19,7 @@
+ #ifdef SECURE_SCOREFILES
+ /* ADMINISTER OF THE GAME */
+ XKOBO_ADMINISTER = games
++DEF_SECURE = -DSECURE_SCOREFILES
+ #endif
+
+ /* ------------------------------------------------------------------- */
+@@ -35,7 +36,7 @@
+ SRCS = $(SRCS1) $(SRCS2)
+
+ DEFINES = -DWAIT_MSEC=$(WAIT_MSEC) -DSHIPS=$(SHIPS) \
+- -DXKOBO_SCORE_DIR=\"$(HSCORE_DIR)\"
++ -DXKOBO_SCORE_DIR=\"$(HSCORE_DIR)\" $(DEF_SECURE)
+
+ CCOPTIONS = #-Wall -g -pg
+
diff --git a/games/xkobo/files/patch-ab b/games/xkobo/files/patch-ab
new file mode 100644
index 000000000000..9591a1bf90cd
--- /dev/null
+++ b/games/xkobo/files/patch-ab
@@ -0,0 +1,35 @@
+--- xlwin.C.orig Wed Mar 13 17:34:46 1996
++++ xlwin.C Wed Mar 25 20:16:00 1998
+@@ -21,6 +21,10 @@
+ */
+
+ extern "C"{
++#ifdef SECURE_SCOREFILES
++#include <sys/types.h>
++#include <unistd.h>
++#endif
+ #include <stdio.h>
+ #include <stdlib.h>
+ }
+@@ -105,7 +109,21 @@
+ {
+ if (mask == -1) return;
+ if (disp == NULL){
++#ifdef SECURE_SCOREFILES
++ uid_t ruid, euid;
++
++ /* get ruid */
++ ruid = getuid();
++ /* save euid */
++ euid = geteuid();
++ /* become normal user to read $HOME/.Xauthority */
++ (void)seteuid(ruid);
++#endif
+ disp = XOpenDisplay(disp_string);
++#ifdef SECURE_SCOREFILES
++ /* become XKOBO_ADMINISTER again */
++ (void)seteuid(euid);
++#endif
+ if (disp == NULL){
+ fprintf(stderr, "xlwin: can't open display\n");
+ exit(1);
diff --git a/games/xkobo/pkg-plist b/games/xkobo/pkg-plist
index 5fb419ad3c30..8ec3efc42d91 100644
--- a/games/xkobo/pkg-plist
+++ b/games/xkobo/pkg-plist
@@ -1,4 +1,4 @@
bin/xkobo
man/man1/xkobo.1.gz
-@exec mkdir %D/lib/X11/xkobo-scores && chmod 777 %D/lib/X11/xkobo-scores
-@unexec rm -r %D/lib/X11/xkobo-scores
+@exec mkdir -p %D/lib/X11/xkobo-scores && chmod 755 %D/lib/X11/xkobo-scores; chown games %D/lib/X11/xkobo-scores
+@unexec rm -rf %D/lib/X11/xkobo-scores