Allow setting temporary directory path
grantwest opened this issue · comments
Grant West commented
A potential use case for vipe is editing an encrypted file; decrypt | vipe | encrypt
Currently vipe always saves the temporary file to /tmp/
which on many systems is a tmpfs. However, tmpfs can be swapped thus resulting in sensitive data being written to disk. To solve this we can create a ramfs which cannot be swapped, but we would need to be able to configure vipe to use this directory. I imagine we could pass in a temporary directory something like this:
decrypt | vipe -t /myramdisk | encrypt
Julian Gruber commented
That sounds like a good addition for this use case. I think the patch should be relatively straight forward. Do you want to give it a stab?