aboutsummaryrefslogtreecommitdiffstats
path: root/games/xkobo/files
diff options
context:
space:
mode:
authorThomas Gellekum <tg@FreeBSD.org>1998-03-26 20:13:39 +0800
committerThomas Gellekum <tg@FreeBSD.org>1998-03-26 20:13:39 +0800
commitdda7cefae9f0ea27cd02bd4c79fdab8199859b91 (patch)
tree0024bc3c252f0155e1e235657f0f73e6dfe287bb /games/xkobo/files
parente7993a1b0e2b596dd7807c34e99f1459ef938f0d (diff)
downloadfreebsd-ports-gnome-dda7cefae9f0ea27cd02bd4c79fdab8199859b91.tar.gz
freebsd-ports-gnome-dda7cefae9f0ea27cd02bd4c79fdab8199859b91.tar.zst
freebsd-ports-gnome-dda7cefae9f0ea27cd02bd4c79fdab8199859b91.zip
Create high score dir with mode 755, when installing from the package.
Respect $HOME/.Xauthority.
Diffstat (limited to 'games/xkobo/files')
-rw-r--r--games/xkobo/files/patch-aa19
-rw-r--r--games/xkobo/files/patch-ab35
2 files changed, 53 insertions, 1 deletions
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);