Closed diabonas closed 5 years ago
Merging #23 into master will decrease coverage by
0.07%
. The diff coverage is77.02%
.
@@ Coverage Diff @@
## master #23 +/- ##
==========================================
- Coverage 80.53% 80.46% -0.08%
==========================================
Files 4 5 +1
Lines 745 819 +74
==========================================
+ Hits 600 659 +59
- Misses 145 160 +15
Impacted Files | Coverage Δ | |
---|---|---|
src/plymouth-tpm2-totp.c | 77.02% <77.02%> (ø) |
|
src/tpm2-totp.c | 82.03% <0%> (+0.97%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update ac23908...f20c5e0. Read the comment docs.
This PR adds a binary
plymouth-tpm2-totp
that calculates the TOTP and displays it as a plymouth message. Depending on the theme, this will look somewhat like this (the password prompt is for the disk encryption):The application is intended to be installed and run in the background in the initial ramdisk and will automatically exit when plymouth is stopped after booting is complete.
One plymouth message with the TOTP is displayed when the application is started, after that a new message is displayed after each full 30 seconds when the TOTP changes. If there are other plymouth messages, these will overwrite the TOTP. Since this usually only happens if there are errors during boot, the user will probably want to see these instead of the TOTP.
There are also some integration tests with the plymouth daemon. They check whether
plymouth-tpm2-totp
is successfully able to send messages to the daemon and if it exits with the correct status if plymouth quits or the TOTP calculation fails.Also included are mkinitpio hooks to add the binary to the initial ramdisk and start it in the background. They replace the already existing hooks on systems with plymouth installed.
I have successfully been testing this PR on my own computer for the last week.
Closes #5.