summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2012-09-14 05:24:12 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2012-09-14 05:24:12 +0200
commit837ea36d0aa61185ac5a51d632353efc361d7ffd (patch)
tree392a2289b8902173275d6fd0a89a3db3fab2b646 /contrib
parent4959ebe76b9ec1b1effc619b22fdd81d5894d733 (diff)
downloadpass-837ea36d0aa61185ac5a51d632353efc361d7ffd.tar.gz
pass-837ea36d0aa61185ac5a51d632353efc361d7ffd.tar.bz2
pass-837ea36d0aa61185ac5a51d632353efc361d7ffd.zip
Put OSX ramdisk patch into contrib.
This should be removed at somepoint in the future. Currently, the Homebrew people need something to make them happy. This is it.
Diffstat (limited to '')
-rw-r--r--contrib/osx-ramdisk.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/contrib/osx-ramdisk.patch b/contrib/osx-ramdisk.patch
new file mode 100644
index 0000000..b1738b0
--- /dev/null
+++ b/contrib/osx-ramdisk.patch
@@ -0,0 +1,36 @@
+From 9f640573906bf7f98133006d09cb2bddca5ec5ae Mon Sep 17 00:00:00 2001
+From: "Jason A. Donenfeld" <Jason@zx2c4.com>
+Date: Wed, 12 Sep 2012 21:08:56 +0200
+Subject: [PATCH] Use ramdisk for volatile storage in OSX.
+
+---
+ src/password-store.sh | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/src/password-store.sh b/src/password-store.sh
+index c736d7b..33a0e97 100755
+--- a/src/password-store.sh
++++ b/src/password-store.sh
+@@ -239,6 +239,19 @@ case "$command" in
+
+ if [[ -d /dev/shm && -w /dev/shm && -x /dev/shm ]]; then
+ tmp_dir="$(TMPDIR=/dev/shm mktemp -t $template -d)"
++ elif [[ $(uname) = "Darwin" ]]; then
++ cleanup_tmp() {
++ [[ -d $tmp_dir ]] || return
++ rm -rf "$tmp_file" "$tmp_dir" 2>/dev/null
++ umount "$tmp_dir"
++ diskutil quiet eject "$ramdisk_dev"
++ rmdir "$tmp_dir"
++ }
++ trap cleanup_tmp INT TERM EXIT
++ tmp_dir="$(mktemp -t $template -d)"
++ ramdisk_dev="$(hdid -drivekey system-image=yes -nomount 'ram://32768' | cut -d ' ' -f 1)" # 32768 sectors = 16 mb
++ newfs_hfs -M 700 "$ramdisk_dev" &>/dev/null || exit 1
++ mount -t hfs -o noatime -o nobrowse "$ramdisk_dev" "$tmp_dir" || exit 1
+ else
+ prompt=$(echo "Your system does not have /dev/shm, which means that it may"
+ echo "be difficult to entirely erase the temporary non-encrypted"
+--
+1.7.12
+
ateRené 'Necoro' Neumann3-326/+366 2008-03-18corrected header commentRené 'Necoro' Neumann1-2/+2 2008-03-18Removed gtk subdirRené 'Necoro' Neumann21-134/+79 2008-03-18Removed wrapperRené 'Necoro' Neumann2-238/+184 2008-03-18Split and renamed gui_helperRené 'Necoro' Neumann4-249/+266 2008-03-18Splitted windows.pyRené 'Necoro' Neumann10-424/+549 2008-03-12Moved get_dependencies to top package classRené 'Necoro' Neumann4-50/+85 2008-03-11improved performance by caching the use_expand queriesRené 'Necoro' Neumann1-5/+14 2008-03-11use catapult varsRené 'Necoro' Neumann2-4/+6 2008-03-11Updated catapult stuffRené 'Necoro' Neumann5-56/+108 2008-03-10Generate correct KeyNotFoundExceptionRené 'Necoro' Neumann1-2/+2 2008-03-09Small changesRené 'Necoro' Neumann3-1/+4 2008-03-07Better session handlingRené 'Necoro' Neumann1-5/+54 2008-03-07Small changesRené 'Necoro' Neumann1-1/+4 2008-03-07Updated shm module to 1.2René 'Necoro' Neumann1-8/+21 2008-03-07Update TODORené 'Necoro' Neumann1-3/+1 2008-03-07hmm ... yesRené 'Necoro' Neumann1-1/+1 2008-03-06Used better exceptions for configuration parserRené 'Necoro' Neumann1-26/+114 2008-03-06Update translationRené 'Necoro' Neumann2-349/+393 2008-03-06Update createpot.shRené 'Necoro' Neumann1-3/+2 2008-03-06Use 'nofork' instead of 'nolistener'René 'Necoro' Neumann1-3/+3 2008-03-05Install glade files into template dir and not data dirRené 'Necoro' Neumann2-2/+1 2008-03-05Added dependency listRené 'Necoro' Neumann3-117/+237