mktemp with -d causes errors on other distros, just making a temp file instead of directory instead (removing -d)
This commit is contained in:
parent
c28199ad4b
commit
78dfa80712
5
pass
5
pass
@ -2,7 +2,6 @@
|
|||||||
# posix password manager - developed by acidvegas (https://git.acid.vegas/pass)
|
# posix password manager - developed by acidvegas (https://git.acid.vegas/pass)
|
||||||
|
|
||||||
umask 077
|
umask 077
|
||||||
|
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
|
|
||||||
GPG_ID="acidvegas" # change me
|
GPG_ID="acidvegas" # change me
|
||||||
@ -19,10 +18,10 @@ mkdir -p $PASS_DIR
|
|||||||
edit() {
|
edit() {
|
||||||
local template="pw.XXXXXXXXXXXXX"
|
local template="pw.XXXXXXXXXXXXX"
|
||||||
if [ -d /dev/shm ] && [ -w /dev/shm ] && [ -x /dev/shm ]; then
|
if [ -d /dev/shm ] && [ -w /dev/shm ] && [ -x /dev/shm ]; then
|
||||||
tmp=$(mktemp -d /dev/shm/$template)
|
tmp=$(mktemp /dev/shm/$template)
|
||||||
else
|
else
|
||||||
echo "warning: /dev/shm does not exist or is missing permissions required for temporary files (using insecure fallback to /tmp directory)"
|
echo "warning: /dev/shm does not exist or is missing permissions required for temporary files (using insecure fallback to /tmp directory)"
|
||||||
tmp=$(mktemp -d /tmp/$template)
|
tmp=$(mktemp /tmp/$template)
|
||||||
fi
|
fi
|
||||||
rm_tmp() {
|
rm_tmp() {
|
||||||
rm -rf "$tmp"
|
rm -rf "$tmp"
|
||||||
|
Loading…
Reference in New Issue
Block a user