biox / pa

a simple password manager. encryption via age, written in portable posix shell
https://passwordass.org
Other
506 stars 21 forks source link

OS X /dev/shm unavailable #9

Closed microspino closed 1 year ago

microspino commented 1 year ago

Hello, and thx for the effort put into building pa. I use pass and I'd like to move my passwords to pa to avoid GPG altogether. pa dies saying /dev/shm is unavailable. Somenone suggested to create and use a RamDisk which unfortunately doesn't work either.

I'm on OS X Ventura 3.1 (22C65). Here's what i did:

hdiutil attach -nomount ram://$((2 * 1024 * 100) which creates /dev/disk3

diskutil eraseVolume HFS+ RAMDisk /dev/disk3 diskutil mount /dev/disk3

But pa edit test always returns No such file or directory

Do I have to create some sort of shared memory with something else than a RamDisk? Is pa supposed to work on OS X?

biox commented 1 year ago

Hrm, this has me rethinking my rationale to use /dev/shm in the first place. it's clearly the first choice where security characteristics are concerned (i.e. /dev/shm doesn't write bits to any disk sectors), but i think i want to prioritize compatability.

in which case, we could just fall back to TMPDIR instead - if the password bits wind up in random disk sectors, maybe that's fine. if a local attacker has access to your disk sectors, you're probably owned anyway.

i'll get to this tonight - let me know what you think.

biox commented 1 year ago

@microspino - I pushed c0a3973 - could you update pa and give this another try? i don't have access to OSX or i'd try myself.

microspino commented 1 year ago

@biox sorry for the delay. I was kind of sick. it works! Thx Thx twice:

  1. because you quickly made a fix
  2. because you made during a holiday I didn't expect so much! ❤️