Prevent secmount from adding newlines to passwords
This commit is contained in:
parent
82477517c3
commit
4f0f4acb21
1 changed files with 3 additions and 3 deletions
|
@ -14,9 +14,9 @@ then
|
||||||
mkdir -p "$back"
|
mkdir -p "$back"
|
||||||
passwd=$(zenity --password --title $title)
|
passwd=$(zenity --password --title $title)
|
||||||
if zenity --question --title $title --text "Save password in login keyring?"
|
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
|
fi
|
||||||
echo $passwd | securefs c "$back"
|
echo -n $passwd | securefs c "$back"
|
||||||
else
|
else
|
||||||
passwd=$(secret-tool lookup application securefs directory "$target")
|
passwd=$(secret-tool lookup application securefs directory "$target")
|
||||||
if [ -z "$passwd" ]
|
if [ -z "$passwd" ]
|
||||||
|
@ -24,4 +24,4 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec echo $passwd | securefs mount "$back" "$target"
|
exec echo -n $passwd | securefs mount "$back" "$target"
|
||||||
|
|
Loading…
Reference in a new issue