From 4f0f4acb218745289d05fd86c8f1518041b9ad22 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Mon, 3 Apr 2023 16:10:35 +0200 Subject: [PATCH] Prevent secmount from adding newlines to passwords --- bin/secmount | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/secmount b/bin/secmount index e5783cc..7cbf93e 100755 --- a/bin/secmount +++ b/bin/secmount @@ -14,9 +14,9 @@ then mkdir -p "$back" passwd=$(zenity --password --title $title) if zenity --question --title $title --text "Save password in login keyring?" - then echo $passwd | secret-tool store --label "SecureFS $target" application securefs directory "$target" + then echo -n $passwd | secret-tool store --label "SecureFS $target" application securefs directory "$target" fi - echo $passwd | securefs c "$back" + echo -n $passwd | securefs c "$back" else passwd=$(secret-tool lookup application securefs directory "$target") if [ -z "$passwd" ] @@ -24,4 +24,4 @@ else fi fi -exec echo $passwd | securefs mount "$back" "$target" +exec echo -n $passwd | securefs mount "$back" "$target"