From b8161e331b2f84b600322ad1d34755607d764f1f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 18 Dec 2015 11:47:26 +0100 Subject: update to new version of libpassphrase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/cerberus.c | 10 +++++----- src/quit.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cerberus.c b/src/cerberus.c index b03c814..a5304a7 100644 --- a/src/cerberus.c +++ b/src/cerberus.c @@ -228,7 +228,7 @@ void do_login(int argc, char** argv) #if AUTH > 0 /* Disable echoing */ - passphrase_disable_echo(); + passphrase_disable_echo1(STDIN_FILENO /* Will be the terminal. */); /* This should be done as early and quickly as possible so as little as possible of the passphrase gets leaked to the output if the user begins entering the passphrase directly after the username. */ @@ -313,7 +313,7 @@ void do_login(int argc, char** argv) if (skip_auth) { /* Reset terminal settings */ - passphrase_reenable_echo(); + passphrase_reenable_echo1(STDIN_FILENO); /* Only root may bypass authentication */ if (getuid()) @@ -344,7 +344,7 @@ void do_login(int argc, char** argv) if (skip_auth == 0) { /* Redisable echoing */ - passphrase_disable_echo(); + passphrase_disable_echo1(STDIN_FILENO); } #endif @@ -468,7 +468,7 @@ void preexit(void) destroy_passphrase(); /* Reset terminal settings */ - passphrase_reenable_echo(); + passphrase_reenable_echo1(STDIN_FILENO); } } @@ -480,7 +480,7 @@ void preexit(void) */ char* read_passphrase(void) { - passphrase = passphrase_read(); + passphrase = passphrase_read2(STDIN_FILENO, PASSPHRASE_READ_EXISTING); if (passphrase == NULL) { perror("passphrase_read"); diff --git a/src/quit.c b/src/quit.c index f981fb1..ae225ee 100644 --- a/src/quit.c +++ b/src/quit.c @@ -36,7 +36,7 @@ void timeout_quit(int signal) (void) signal; printf("\nTimed out.\n"); #if AUTH != 0 - passphrase_reenable_echo(); + passphrase_reenable_echo1(STDIN_FILENO); #endif sleep(ERROR_SLEEP); _exit(10); @@ -53,7 +53,7 @@ void user_quit(int signal) (void) signal; printf("\n"); #if AUTH != 0 - passphrase_reenable_echo(); + passphrase_reenable_echo1(STDIN_FILENO); #endif _exit(130); } -- cgit v1.2.3-70-g09d2