password.subr (ab2043b81eaba0d7d7769b4a58b2b6d17bc464a3) password.subr (89498fdf4174b08bb67d684d14886539aff698b4)
1if [ ! "$_PASSWORD_PASSWORD_SUBR" ]; then _PASSWORD_PASSWORD_SUBR=1
2#
3# Copyright (c) 2012 Devin Teske
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 54 unchanged lines hidden (view full) ---

63 "" \
64 "$hline" )
65
66 #
67 # Loop until the user provides taint-free/valid input
68 #
69 local retval _password1 _password2
70 while :; do
1if [ ! "$_PASSWORD_PASSWORD_SUBR" ]; then _PASSWORD_PASSWORD_SUBR=1
2#
3# Copyright (c) 2012 Devin Teske
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 54 unchanged lines hidden (view full) ---

63 "" \
64 "$hline" )
65
66 #
67 # Loop until the user provides taint-free/valid input
68 #
69 local retval _password1 _password2
70 while :; do
71 eval $DIALOG \
71 local dialog_inputbox
72 dialog_inputbox=$( eval $DIALOG \
72 --title \"\$DIALOG_TITLE\" \
73 --backtitle \"\$DIALOG_BACKTITLE\" \
74 --hline \"\$hline\" \
75 --ok-label \"\$msg_ok\" \
76 --cancel-label \"\$msg_cancel\" \
77 --insecure \
78 --passwordbox \"\$msg\" $size \
73 --title \"\$DIALOG_TITLE\" \
74 --backtitle \"\$DIALOG_BACKTITLE\" \
75 --hline \"\$hline\" \
76 --ok-label \"\$msg_ok\" \
77 --cancel-label \"\$msg_cancel\" \
78 --insecure \
79 --passwordbox \"\$msg\" $size \
79 2> $DIALOG_TMPDIR/dialog.inputbox.$$
80 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
81 )
80
81 retval=$?
82
83 retval=$?
84 setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
82 _password1=$( f_dialog_inputstr )
83
84 # Return if user has either pressed ESC or chosen Cancel/No
85 [ $retval -eq $SUCCESS ] || return $retval
86
85 _password1=$( f_dialog_inputstr )
86
87 # Return if user has either pressed ESC or chosen Cancel/No
88 [ $retval -eq $SUCCESS ] || return $retval
89
87 eval $DIALOG \
90 dialog_inputbox=$( eval $DIALOG \
88 --title \"\$DIALOG_TITLE\" \
89 --backtitle \"\$DIALOG_BACKTITLE\" \
90 --hline \"\$hline\" \
91 --ok-label \"\$msg_ok\" \
92 --cancel-label \"\$msg_cancel\" \
93 --insecure \
94 --passwordbox \"\$rmsg\" $rsize \
91 --title \"\$DIALOG_TITLE\" \
92 --backtitle \"\$DIALOG_BACKTITLE\" \
93 --hline \"\$hline\" \
94 --ok-label \"\$msg_ok\" \
95 --cancel-label \"\$msg_cancel\" \
96 --insecure \
97 --passwordbox \"\$rmsg\" $rsize \
95 2> $DIALOG_TMPDIR/dialog.inputbox.$$
98 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
99 )
96
97 retval=$?
100
101 retval=$?
102 setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
98 _password2=$( f_dialog_inputstr )
99
100 # Return if user has either pressed ESC or chosen Cancel/No
101 [ $retval -eq $SUCCESS ] || return $retval
102
103 # Check for NULL entry
104 if ! [ "$_password1" -o "$_password2" ]; then
105 f_show_msg "$msg_password_is_empty"

--- 17 unchanged lines hidden ---
103 _password2=$( f_dialog_inputstr )
104
105 # Return if user has either pressed ESC or chosen Cancel/No
106 [ $retval -eq $SUCCESS ] || return $retval
107
108 # Check for NULL entry
109 if ! [ "$_password1" -o "$_password2" ]; then
110 f_show_msg "$msg_password_is_empty"

--- 17 unchanged lines hidden ---