Merge pull request #36 from c-edw/feature/ShadowBackendSleep

Sleep on incorrect password with shadow backend.
This commit is contained in:
Drew DeVault 2019-01-27 18:03:29 -05:00 committed by GitHub
commit 6a7e3a16f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,8 +93,12 @@ void run_pw_backend_child(void) {
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
// We don't want to keep it in memory longer than necessary,
// so clear *before* sleeping.
clear_buffer(buf, size); clear_buffer(buf, size);
free(buf); free(buf);
sleep(2);
} }
clear_buffer(encpw, strlen(encpw)); clear_buffer(encpw, strlen(encpw));