summaryrefslogtreecommitdiff
path: root/shadow.c
diff options
context:
space:
mode:
authorConnor E <38229097+c-edw@users.noreply.github.com>2019-01-27 18:12:54 +0000
committerConnor E <38229097+c-edw@users.noreply.github.com>2019-01-27 18:12:54 +0000
commit6fd9cd22469bf3f525a7fa15acca00edf5330554 (patch)
tree61f00659d0ff62b2bda099d5e8354d8229fe9296 /shadow.c
parent52eeb9fc1e145a121fdbdaab56446ada26367903 (diff)
Sleep on incorrect password with shadow backend.
Diffstat (limited to 'shadow.c')
-rw-r--r--shadow.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shadow.c b/shadow.c
index 70d00a8..76dd7ae 100644
--- a/shadow.c
+++ b/shadow.c
@@ -92,8 +92,12 @@ void run_pw_backend_child(void) {
exit(EXIT_FAILURE);
}
+ // We don't want to keep it in memory longer than necessary,
+ // so clear *before* sleeping.
clear_buffer(buf, size);
free(buf);
+
+ sleep(2);
}
clear_buffer(encpw, strlen(encpw));