summary refs log tree commit diff
path: root/gnu/packages/patches/kobodeluxe-paths.patch
diff options
context:
space:
mode:
authorStephen Webber <webber.sl@gmail.com>2016-10-16 15:04:35 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2016-10-18 20:23:03 -0500
commita56145e1fa8c8c9cb866518efdeaaf4ad4017ba1 (patch)
tree63cf2172eec05f1d3bf607bbbde0864e832bfb6b /gnu/packages/patches/kobodeluxe-paths.patch
parent91988aee126376ea9e111882afb511e3a555936d (diff)
downloadguix-a56145e1fa8c8c9cb866518efdeaaf4ad4017ba1.tar.gz
gnu: Add kobodeluxe.
* gnu/packages/games.scm (kobodeluxe): New variable.
* gnu/packages/patches/kobodeluxe-paths.patch: New file.
* gnu/packages/patches/kobodeluxe-enemies-pipe-decl.patch: New file.
* gnu/packages/patches/kobodeluxe-const-charp-conversion.patch: New file.
* gnu/packages/patches/kobodeluxe-manpage-minus-not-hyphen.patch: New file.
* gnu/packages/patches/kobodeluxe-midicon-segmentation-fault.patch: New file.
* gnu/packages/patches/kobodeluxe-graphics-window-signed-char.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
Diffstat (limited to 'gnu/packages/patches/kobodeluxe-paths.patch')
-rw-r--r--gnu/packages/patches/kobodeluxe-paths.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/gnu/packages/patches/kobodeluxe-paths.patch b/gnu/packages/patches/kobodeluxe-paths.patch
new file mode 100644
index 0000000000..87c7b3a620
--- /dev/null
+++ b/gnu/packages/patches/kobodeluxe-paths.patch
@@ -0,0 +1,40 @@
+# Disable reading of configs, graphics, and data from the current directory.
+# So it's safe to run kobodeluxe from anywhere w/o worry about an attacker
+# feeding it bad data.
+--- kobodeluxe-0.5.1.orig/kobo.cpp
++++ kobodeluxe-0.5.1/kobo.cpp
+@@ -141,21 +141,21 @@
+ 	 * Graphics data
+ 	 */
+ 	/* Current dir; from within the build tree */
+-	fmap->addpath("GFX", "./data/gfx");
++	//fmap->addpath("GFX", "./data/gfx");
+ 	/* Real data dir */
+ 	fmap->addpath("GFX", "DATA>>gfx");
+ 	/* Current dir */
+-	fmap->addpath("GFX", "./gfx");
++	//fmap->addpath("GFX", "./gfx");
+
+ 	/*
+ 	 * Sound data
+ 	 */
+ 	/* Current dir; from within the build tree */
+-	fmap->addpath("SFX", "./data/sfx");
++	//fmap->addpath("SFX", "./data/sfx");
+ 	/* Real data dir */
+ 	fmap->addpath("SFX", "DATA>>sfx");
+ 	/* Current dir */
+-	fmap->addpath("SFX", "./sfx");
++	//fmap->addpath("SFX", "./sfx");
+
+ 	/*
+ 	 * Score files (user and global)
+@@ -173,7 +173,7 @@
+ 	/* System local */
+ 	fmap->addpath("CONFIG", SYSCONF_DIR);
+ 	/* In current dir (last resort) */
+-	fmap->addpath("CONFIG", "./");
++	//fmap->addpath("CONFIG", "./");
+ }
+
+