From a3cade092fdeb119d041b6e3502971e0ead24553 Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Fri, 5 Jul 2013 16:24:18 -0700 Subject: Add support for gnome-keyring-query This allows using an encrypted password store and prevents the password from being viewed by other users on the same computer. --- hib-dlagent | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hib-dlagent b/hib-dlagent index 1dfd64b..01b5218 100755 --- a/hib-dlagent +++ b/hib-dlagent @@ -38,6 +38,7 @@ Options: -k Search key's files. Use multiple times for multiple keys -o Name to use when saving file -p Use pass to login. If specified multiple times, the last is used + -P The name of the password available via gnome-keyring-query -s Print URL to stdout instead of downloading. Incompatible with -d -u Use user to login. Search account's files. If specified multiple times, the last is used @@ -96,7 +97,7 @@ main() { exit 1 fi - while getopts "hd:k:o:p:su:" opt; do + while getopts "hd:k:o:p:P:su:" opt; do case $opt in \?) exit 1 @@ -117,6 +118,9 @@ main() { p) PASSWORD="$OPTARG" ;; + P) + PASSWORD="$(gnome-keyring-query get "$OPTARG")" + ;; s) DOWNLOAD=0 ;; -- cgit v1.2.3-54-g00ecf