summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anderson <ejona86@gmail.com>2013-07-05 16:24:18 -0700
committerEric Anderson <ejona86@gmail.com>2013-07-05 16:24:18 -0700
commita3cade092fdeb119d041b6e3502971e0ead24553 (patch)
tree264f0cdb8172a32f4131e5622c494e9255fb9032
parent269b83bd9a3b0aecf92bb5f0e7aa79f5178f3e9e (diff)
downloadhib-dlagent-a3cade092fdeb119d041b6e3502971e0ead24553.tar.gz
hib-dlagent-a3cade092fdeb119d041b6e3502971e0ead24553.zip
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.
-rwxr-xr-xhib-dlagent6
1 files changed, 5 insertions, 1 deletions
diff --git a/hib-dlagent b/hib-dlagent
index 1dfd64b..01b5218 100755
--- a/hib-dlagent
+++ b/hib-dlagent
@@ -38,6 +38,7 @@ Options:
-k <key> Search key's files. Use multiple times for multiple keys
-o <file> Name to use when saving file
-p <pass> Use pass to login. If specified multiple times, the last is used
+ -P <pname> The name of the password available via gnome-keyring-query
-s Print URL to stdout instead of downloading. Incompatible with -d
-u <user> 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
;;