summaryrefslogtreecommitdiffstats
path: root/usr.bin/login/login.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/login/login.c')
-rw-r--r--usr.bin/login/login.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c
index f23467d..b7aa278 100644
--- a/usr.bin/login/login.c
+++ b/usr.bin/login/login.c
@@ -343,6 +343,8 @@ main(int argc, char *argv[])
(void)printf("Login incorrect\n");
failures++;
+ pwd = NULL;
+
/*
* Allow up to 'retry' (10) attempts, but start
* backing off after 'backoff' (3) attempts.
@@ -951,7 +953,8 @@ bail(int sec, int eval)
{
pam_cleanup();
- audit_logout();
+ if (pwd != NULL)
+ audit_logout();
(void)sleep(sec);
exit(eval);
}
OpenPOWER on IntegriCloud