jaromail

a commandline tool to easily and privately handle your e-mail
git clone git://parazyd.org/jaromail.git
Log | Files | Refs | Submodules | README

commit f9ac6fc691ed95a98d40f30704901e5ea9a87e8d
parent 901309bd4e6593308cc637d4e10ef2396c7e7eec
Author: Jaromil <jaromil@dyne.org>
Date:   Wed, 11 Sep 2013 13:13:25 +0200

better path for stored passwords in gnome keyring

Diffstat:
Msrc/gnome-keyring/jaro-gnome-keyring.c | 2+-
Msrc/zlibs/accounts | 11+++++++----
2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/gnome-keyring/jaro-gnome-keyring.c b/src/gnome-keyring/jaro-gnome-keyring.c @@ -111,7 +111,7 @@ store_password(jaro_credential_t *cred) !cred->username || !cred->password) return 1; - g_snprintf(desc, sizeof(desc), "Jaro %s", cred->host); + g_snprintf(desc, sizeof(desc), "%s %s", cred->protocol, cred->host); keyres = gnome_keyring_store_password_sync(&jaro_schema, GNOME_KEYRING_DEFAULT, desc, diff --git a/src/zlibs/accounts b/src/zlibs/accounts @@ -193,7 +193,9 @@ ask_password() { # USE GNOME KEYRING if [ "$GNOMEKEY" = "1" ]; then func "Looking for password in Gnome keyring for $email on $host over $type" - print "protocol=${type}\npath=jaromail/${email}\nusername=${login}\nhost=${host}\n\n" \ + func "path: jaromail/${type}/${email}" + + print "protocol=${type}\npath=jaromail/${type}/${email}\nusername=${login}\nhost=${host}\n\n" \ | $WORKDIR/bin/jaro-gnome-keyring check if [ $? != 0 ]; then # its a new password new_password @@ -202,7 +204,7 @@ ask_password() { return 1 } else # password found into gnome keyring act "Using saved password for $1 @ $2" - password=`print "protocol=${type}\npath=jaromail/${email}\nusername=${login}\nhost=${host}\n\n" | $WORKDIR/bin/jaro-gnome-keyring get` + password=`print "protocol=${type}\npath=jaromail/${type}/${email}\nusername=${login}\nhost=${host}\n\n" | $WORKDIR/bin/jaro-gnome-keyring get` fi return 0 elif [ -r $WORKDIR/keyring ]; then @@ -284,10 +286,11 @@ new_password() { # USE GNOME KEYRING if [ "$GNOMEKEY" = "1" ]; then - + act "using gnome-keyring password storage" + func "path: jaromail/${type}/${email}" cat <<EOF | $WORKDIR/bin/jaro-gnome-keyring store protocol=${type} -path=jaromail/${email} +path=jaromail/${type}/${email} username=${login} host=${host} password=${password}