[DebianGIS-dev] [SCM] josm branch, master, updated. debian/0.0.svn2561-1-3-g0e91533

David Paleino dapal at debian.org
Mon Mar 1 18:08:45 UTC 2010


The following commit has been merged in the master branch:
commit 0e91533b36e86cfaa4e1ff410ed33f3b37d193c0
Author: David Paleino <dapal at debian.org>
Date:   Mon Mar 1 19:08:04 2010 +0100

    debian/patches/50_preferences_world_readable.dpatch added, chmod the file to 600 since it contains plaintext password for OSM (Closes: #572032)

diff --git a/debian/changelog b/debian/changelog
index f825081..ef2db69 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,8 +3,11 @@ josm (0.0.svn2561-2) UNRELEASED; urgency=low
   * debian/watch fixed: implemented a redirector for uscan on Alioth.
   * debian/control:
     - add pkg-osm to uploaders
+  * debian/patches/:
+    - 50_preferences_world_readable.dpatch added, chmod the file to
+      600 since it contains plaintext password for OSM (Closes: #572032)
 
- -- David Paleino <dapal at debian.org>  Mon, 22 Feb 2010 21:26:51 +0100
+ -- David Paleino <dapal at debian.org>  Mon, 01 Mar 2010 19:07:12 +0100
 
 josm (0.0.svn2561-1) unstable; urgency=low
 
diff --git a/debian/patches/00list b/debian/patches/00list
index 676597b..1db8396 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -1,3 +1,4 @@
 10_build
 20_bts
 40_elemstyles
+50_preferences_world_readable.dpatch
diff --git a/debian/patches/50_preferences_world_readable.dpatch b/debian/patches/50_preferences_world_readable.dpatch
new file mode 100755
index 0000000..7e16db1
--- /dev/null
+++ b/debian/patches/50_preferences_world_readable.dpatch
@@ -0,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 50_preferences_world_readable.dpatch by David Paleino <dapal at debian.org>
+##
+## DP: Make the preferences file owner-only readable
+
+ at DPATCH@
+diff -urNad josm~/src/org/openstreetmap/josm/data/Preferences.java josm/src/org/openstreetmap/josm/data/Preferences.java
+--- josm~/src/org/openstreetmap/josm/data/Preferences.java
++++ josm/src/org/openstreetmap/josm/data/Preferences.java
+@@ -346,6 +346,10 @@
+         File tmpFile = new File(prefFile + "_tmp");
+         copyFile(tmpFile, prefFile);
+         tmpFile.delete();
++
++        // Finally, make it owner-only-readable.
++        // FIXME: newest versions will use JDK 1.6, it has set*() functions.
++        Runtime.getCurrentRuntime().exec("/bin/chmod 600 " + prefFile.getAbsolutePath());
+     }
+ 
+     /**

-- 
Java OpenStreetMap editor



More information about the Pkg-grass-devel mailing list