aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-04-07 19:49:43 +0200
committerMattias Andrée <maandree@operamail.com>2014-04-07 19:49:43 +0200
commitb2244a851a1efbbe01264d010e1a303519c5fecd (patch)
treec897646bbe9cbf55eedeb8dfbcf2ab1fa420b112
parentfix some warnings (diff)
downloadcerberus-b2244a851a1efbbe01264d010e1a303519c5fecd.tar.gz
cerberus-b2244a851a1efbbe01264d010e1a303519c5fecd.tar.bz2
cerberus-b2244a851a1efbbe01264d010e1a303519c5fecd.tar.xz
fix warnings and errors
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--src/cerberus.c4
-rw-r--r--src/quit.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/src/cerberus.c b/src/cerberus.c
index 49fbe66..a67a9ef 100644
--- a/src/cerberus.c
+++ b/src/cerberus.c
@@ -240,7 +240,9 @@ void do_login(int argc, char** argv)
/* Verify passphrase or other token, if -f has not been used */
- #if AUTH > 0
+ #if AUTH == 0
+ (void) hostname;
+ #else
initialise_login(hostname, username, read_passphrase);
if ((skip_auth == 0) && authenticate_login())
#endif
diff --git a/src/quit.c b/src/quit.c
index 4ce09dc..196fb60 100644
--- a/src/quit.c
+++ b/src/quit.c
@@ -35,7 +35,9 @@ void timeout_quit(int signal)
{
(void) signal;
printf("\nTimed out.\n");
+ #if AUTH != 0
passphrase_reenable_echo();
+ #endif
sleep(ERROR_SLEEP);
_exit(10);
}
@@ -50,7 +52,9 @@ void user_quit(int signal)
{
(void) signal;
printf("\n");
+ #if AUTH != 0
passphrase_reenable_echo();
+ #endif
_exit(130);
}