[pass] [PATCH] See: "Bugfix for Mac's diskutil"

Allan Odgaard lists+pass at simplit.com
Sun Jun 29 09:35:04 CEST 2014

On 29 Jun 2014, at 1:45, Jason A. Donenfeld wrote:

> I'm working on a sufficiently clean patch for this.

What is the purpose of this code? I thought it was creating an encrypted 
disk image to make it harder to later obtain the password via computer 
forensics, but it doesn’t seem to involve any encryption. I would also 
assume that most people using `pass` on a Mac already have full disk 
encryption enabled (FileVault).

Related to Mac compatibility: On OS X the synopsis for `mktemp` is:

     usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
            mktemp [-d] [-q] [-u] -t prefix

The way it is being used by pass is:

     mktemp [-d] -t "$template"

This means "$template" is being used as a prefix (on OS X), and we get 
file paths like:


It seems that a more platform neutral way to create a temporary path is 
by using:

     mktemp [-d] "${TMPDIR:-/tmp}/$template"

That said, I think it would be nice if we could add a `.txt` extension 
to the temporary path, since we’re passing it to EDITOR. Since `pass` 
is creating its own directory for the item, it should be possible to 
simply append `.txt` to the result of `mktemp` without problems.

More information about the Password-Store mailing list