diff options
Diffstat (limited to 'games/xkobo/files/patch-ab')
-rw-r--r-- | games/xkobo/files/patch-ab | 35 |
1 files changed, 35 insertions, 0 deletions
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); |