diff --git a/common/hsm_encryption.c b/common/hsm_encryption.c index c52fa8d6c..7e5778854 100644 --- a/common/hsm_encryption.c +++ b/common/hsm_encryption.c @@ -103,7 +103,7 @@ char *read_stdin_pass(char **reason) } temp_term = current_term; temp_term.c_lflag &= ~ECHO; - if (tcsetattr(fileno(stdin), TCSAFLUSH, &temp_term) != 0) { + if (tcsetattr(fileno(stdin), TCSANOW, &temp_term) != 0) { *reason = "Could not disable pass echoing."; return NULL; } @@ -114,7 +114,7 @@ char *read_stdin_pass(char **reason) } /* Restore the original terminal */ - if (tcsetattr(fileno(stdin), TCSAFLUSH, ¤t_term) != 0) { + if (tcsetattr(fileno(stdin), TCSANOW, ¤t_term) != 0) { *reason = "Could not restore terminal options."; free(passwd); return NULL;