Use a prompt reflecting password or smart card pin
This commit is contained in:
parent
8586cfc8cb
commit
c07bfffabf
13
rdesktop.c
13
rdesktop.c
@ -424,11 +424,22 @@ read_password(char *password, int size)
|
|||||||
struct termios tios;
|
struct termios tios;
|
||||||
RD_BOOL ret = False;
|
RD_BOOL ret = False;
|
||||||
int istty = 0;
|
int istty = 0;
|
||||||
|
const char *prompt;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
|
|
||||||
|
if (g_use_password_as_pin)
|
||||||
|
{
|
||||||
|
prompt = "Smart card PIN: ";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
prompt = "Password: ";
|
||||||
|
}
|
||||||
|
|
||||||
if (tcgetattr(STDIN_FILENO, &tios) == 0)
|
if (tcgetattr(STDIN_FILENO, &tios) == 0)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Password: ");
|
fprintf(stderr, prompt);
|
||||||
tios.c_lflag &= ~ECHO;
|
tios.c_lflag &= ~ECHO;
|
||||||
tcsetattr(STDIN_FILENO, TCSANOW, &tios);
|
tcsetattr(STDIN_FILENO, TCSANOW, &tios);
|
||||||
istty = 1;
|
istty = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user