diff options
author | Moviuro <moviuro+git@gmail.com> | 2017-03-12 11:57:30 +0100 |
---|---|---|
committer | Moviuro <moviuro+git@gmail.com> | 2017-03-12 11:57:30 +0100 |
commit | 19afc1e269ab1e357947b1486da8f47cd9f6487d (patch) | |
tree | 26766ed72a4952fb2c27f31e74d7d41b5f7190af | |
parent | fab0475fba86bc4421bff82c1897e94da2fd02a8 (diff) | |
download | rofi-pass-19afc1e269ab1e357947b1486da8f47cd9f6487d.tar.gz |
rofi-pass: use umask instead of chmod.
Also avoids race conditions as a happy side effect
-rwxr-xr-x | rofi-pass | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -43,6 +43,8 @@ help="Alt+h" switch="Alt+x" insert_pass="Alt+n" +# Safe permissions +umask 077 # get all password files and create an array list_passwords() { @@ -69,14 +71,12 @@ doClip () { checkIfPass () { rm -f "$HOME/.cache/rofi-pass/last_used" echo "${root}: $selected_password" > "$HOME/.cache/rofi-pass/last_used" - chmod 600 "$HOME/.cache/rofi-pass/last_used" } autopass () { rm -f "$HOME/.cache/rofi-pass/last_used" echo "${root}: $selected_password" > "$HOME/.cache/rofi-pass/last_used" - chmod 600 "$HOME/.cache/rofi-pass/last_used" if [[ -z "${stuff["$AUTOTYPE_field"]}" ]]; then if [[ "${stuff["${USERNAME_field}"]}" ]]; then echo -n "${stuff["${USERNAME_field}"]}" | xdotool type --clearmodifiers --file - |