diff --git a/bin/qvm-pass b/bin/qvm-pass index a1aff2f..f635c7a 100755 --- a/bin/qvm-pass +++ b/bin/qvm-pass @@ -17,7 +17,7 @@ usage() { echo " If your key is not named after a subcommand, you can also" echo " get its contents by passing it as the first argument of" echo " this command, omitting the get subcommand." - echo " get-or-generate [-n symbols] " + echo " get-or-generate [-n] " echo " Retrieves a key from the pass store; creates the key" echo " with 32 characters length if it does not exist yet," echo " and returns the generated key on standard output." @@ -38,7 +38,7 @@ usage() { force=0 multiline=0 echo=0 -nosymbols= +nosymbols=0 TEMP=`getopt -o d:n:mfe? -- "$@"` || { usage ; exit 64 ; } eval set -- "$TEMP" @@ -51,7 +51,7 @@ while true ; do *) export QUBES_PASS_DOMAIN="$2" ; shift 2 ;; esac ;; -n) - nosymbols="$2" ; shift 2 ;; + nosymbols=1 ; shift ;; -m) multiline=1 ; shift ;; -f) @@ -77,7 +77,7 @@ case "$1" in exec qubes-pass-client "$1" "$2" "$nosymbols" ;; init) - if [ "$force$multiline$echo$nosymbols" != "000" ] ; then + if [ "$force$multiline$echo$nosymbols" != "0000" ] ; then echo "the $1 subcommand does not accept that option; run with -? for more information" >&2 ; exit 64 fi if [ -n "$2" ] ; then @@ -86,7 +86,7 @@ case "$1" in exec qubes-pass-client "$1" ;; rm) - if [ "$force$multiline$echo$nosymbols" != "000" ] ; then + if [ "$force$multiline$echo$nosymbols" != "0000" ] ; then echo "the $1 subcommand does not accept that option; run with -? for more information" >&2 ; exit 64 fi if [ -z "$2" ] ; then @@ -113,7 +113,7 @@ case "$1" in exec qubes-pass-client "$1" "$2" "$3" "$force" ;; insert) - if [ "$nosymbols" != "" ] ; then + if [ "$nosymbols" != "0" ] ; then echo "the $1 subcommand does not accept that option; run with -? for more information" >&2 ; exit 64 fi shift @@ -152,13 +152,13 @@ case "$1" in exec qubes-pass-client insert "$1" "$multiline" "$contents" ;; list) - if [ "$force$multiline$echo$nosymbols" != "000" ] ; then + if [ "$force$multiline$echo$nosymbols" != "0000" ] ; then echo "the $1 subcommand does not accept that option; run with -? for more information" >&2 ; exit 64 fi exec qubes-pass-client list ;; *) - if [ "$force$multiline$echo$nosymbols" != "000" ] ; then + if [ "$force$multiline$echo$nosymbols" != "0000" ] ; then echo "the get subcommand does not accept that option; run with -? for more information" >&2 ; exit 64 fi exec qubes-pass-client get "$1" diff --git a/etc/qubes-rpc/ruddo.PassManage b/etc/qubes-rpc/ruddo.PassManage index f5cc461..a8a1aca 100644 --- a/etc/qubes-rpc/ruddo.PassManage +++ b/etc/qubes-rpc/ruddo.PassManage @@ -45,8 +45,8 @@ elif [ "$cmd" == "get-or-generate" ] ; then if [ "$ret" == "1" ] && echo "$out" | grep -q "not in the password store" ; then logger -t ruddo.PassManage "creating password entry $entry" ret=0 - if [ "$nosymbols" != "" ] ; then - out=$(pass generate -n "$nosymbols" -- "$entry" 32) || ret=$? + if [ "$nosymbols" == "1" ] ; then + out=$(pass generate -n -- "$entry" 32) || ret=$? else out=$(pass generate -- "$entry" 32) || ret=$? fi diff --git a/qubes-pass.spec b/qubes-pass.spec index 779b987..369c3f4 100644 --- a/qubes-pass.spec +++ b/qubes-pass.spec @@ -3,7 +3,7 @@ %define mybuildnumber %{?build_number}%{?!build_number:1} Name: qubes-pass -Version: 0.0.10 +Version: 0.0.11 Release: %{mybuildnumber}%{?dist} Summary: Inter-VM pass password management for Qubes OS AppVMs and StandaloneVMs BuildArch: noarch