diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2013-04-19 17:23:19 +0200 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2013-04-19 17:23:19 +0200 |
commit | d7f115388096714df22052b4917427f7d9200dab (patch) | |
tree | 8b5c98550110bdebf23be46a0ae0254ff3e6bcf8 | |
parent | efe7535a87aaaa03442f18736d7c786a73d0924d (diff) | |
download | watch-bz-d7f115388096714df22052b4917427f7d9200dab.tar.gz watch-bz-d7f115388096714df22052b4917427f7d9200dab.tar.xz watch-bz-d7f115388096714df22052b4917427f7d9200dab.zip |
limit password prompt to 1 minute
This also means that python-bugzilla's native prompt should never be
used.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rwxr-xr-x | watch-bz | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -85,6 +85,9 @@ do_logout () { do_init () { # login when available if [ -n "$BZUSER" ] && [ ! -f "${BUGZILLA_COOKIE}" ]; then + [ -n "$BZPASSWORD" ] \ + || read -s -t 60 -p 'Password (1 min timeout): ' BZPASSWORD \ + || exit $? "$BUGZILLA" --cookiefile="${BUGZILLA_COOKIE}" login "$BZUSER" $BZPASSWORD if [ $? -ne 0 ]; then echo "Cannot log in" @@ -99,7 +102,7 @@ do_init () { # exclusively using globals do_watch () { #sh -c \ - ${WATCHCMD} -t --interval $REFRESH_INTERVAL --differences=cumulative \ + ${WATCHCMD} -t --interval $REFRESH_INTERVAL \ "$BUGZILLA --cookiefile="${BUGZILLA_COOKIE}" query -c $COMPONENT \ -t $STATUS --outputformat $OUTPUT_FMT \ | sed -u \ |