aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-18 11:47:26 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-18 11:47:26 +0100
commitb8161e331b2f84b600322ad1d34755607d764f1f (patch)
tree38ae32ff6604672befc5bf531544a3c168d8febb /src
parentadd deps (update for next change) + bump year (diff)
downloadcerberus-b8161e331b2f84b600322ad1d34755607d764f1f.tar.gz
cerberus-b8161e331b2f84b600322ad1d34755607d764f1f.tar.bz2
cerberus-b8161e331b2f84b600322ad1d34755607d764f1f.tar.xz
update to new version of libpassphrase
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src')
-rw-r--r--src/cerberus.c10
-rw-r--r--src/quit.c4
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);
}