diff -r -u src.orig/password-store.sh src/password-store.sh
old
|
new
|
|
168 | 168 | [[ $1 == "nowarn" ]] && warn=0 |
169 | 169 | local template="$PROGRAM.XXXXXXXXXXXXX" |
170 | 170 | if [[ -d /dev/shm && -w /dev/shm && -x /dev/shm ]]; then |
171 | | SECURE_TMPDIR="$(mktemp -d "/dev/shm/$template")" |
| 171 | SECURE_TMPDIR="$(${MKTEMP} -d "/dev/shm/$template")" |
172 | 172 | remove_tmpfile() { |
173 | 173 | rm -rf "$SECURE_TMPDIR" |
174 | 174 | } |
… |
… |
|
182 | 182 | Are you sure you would like to continue? |
183 | 183 | _EOF |
184 | 184 | )" |
185 | | SECURE_TMPDIR="$(mktemp -d "${TMPDIR:-/tmp}/$template")" |
| 185 | SECURE_TMPDIR="$(${MKTEMP} -d "${TMPDIR:-/tmp}/$template")" |
186 | 186 | shred_tmpfile() { |
187 | 187 | find "$SECURE_TMPDIR" -type f -exec $SHRED {} + |
188 | 188 | rm -rf "$SECURE_TMPDIR" |
… |
… |
|
421 | 421 | local passfile="$PREFIX/$path.gpg" |
422 | 422 | |
423 | 423 | tmpdir #Defines $SECURE_TMPDIR |
424 | | local tmp_file="$(mktemp -u "$SECURE_TMPDIR/XXXXX")-${path//\//-}.txt" |
| 424 | local tmp_file="$(${MKTEMP} -u "$SECURE_TMPDIR/XXXXX")-${path//\//-}.txt" |
425 | 425 | |
426 | 426 | |
427 | 427 | local action="Add" |
diff -r -u src.orig/platform/darwin.sh src/platform/darwin.sh
old
|
new
|
|
24 | 24 | rm -rf "$SECURE_TMPDIR" |
25 | 25 | } |
26 | 26 | trap unmount_tmpdir INT TERM EXIT |
27 | | SECURE_TMPDIR="$(mktemp -d "${TMPDIR:-/tmp}/$PROGRAM.XXXXXXXXXXXXX")" |
| 27 | SECURE_TMPDIR="$(${MKTEMP} -d "${TMPDIR:-/tmp}/$PROGRAM.XXXXXXXXXXXXX")" |
28 | 28 | DARWIN_RAMDISK_DEV="$(hdid -drivekey system-image=yes -nomount 'ram://32768' | cut -d ' ' -f 1)" # 32768 sectors = 16 mb |
29 | 29 | [[ -z $DARWIN_RAMDISK_DEV ]] && die "Error: could not create ramdisk." |
30 | 30 | newfs_hfs -M 700 "$DARWIN_RAMDISK_DEV" &>/dev/null || die "Error: could not create filesystem on ramdisk." |
… |
… |
|
33 | 33 | |
34 | 34 | GETOPT=@@PREFIX@@/bin/getopt |
35 | 35 | SHRED="srm -f -z" |
| 36 | MKTEMP="/usr/bin/mktemp" |