logo

skeud

Simple and portable utilities to deal with user accounts (su, login)
commit: 4a1139533c9d8d767cd221414ad0fc5dddab684c
parent 758bc621bdf930e9a62401f9600dafdabbbdd870
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu,  3 Nov 2022 00:40:19 +0100

common: Fix enabling back ECHO

Diffstat:

Mcommon.c5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/common.c b/common.c @@ -100,9 +100,6 @@ skeud_getpass(char **password) fprintf(tty, "\n"); if(got < 0) { - t.c_lflag &= ECHO; - tcsetattr(tty_fd, TCSANOW, &t); - if(errno != 0) perror("skeud_getpass: getline"); goto getpass_clean; } @@ -111,7 +108,7 @@ skeud_getpass(char **password) got--; getpass_clean: - t.c_lflag &= ECHO; + t.c_lflag ^= ECHO; if(tcsetattr(tty_fd, TCSANOW, &t) < 0) { perror("skeud_getpass: tcsetattr(ECHO)");