Commit graph

7 commits

Author SHA1 Message Date
Vladimir Stoiakin
d8214b522a unl0kr-agent: check exit code of a child process
If the call to execv() is failed (/usr/bin/unl0kr is absent, for example), the child process will exit with EXIT_FAILURE.
But since the agent does not check the exit code, it will not notice the problem and will return an empty password to systemd.
When the password is used to unlock a PKCS#11 or FIDO2 token, we can waste a limited number of tries or lock the token entirely.
The patch adds a check to avoid this sutuation.
2025-05-06 15:03:58 +03:00
Vladimir Stoiakin
5c782575f2 misc: fix warnings 2025-04-17 14:08:19 +03:00
Vladimir Stoiakin
0989ee5800 unl0kr-agent: ignore keys without a value in requests 2025-04-08 11:11:20 +03:00
Vladimir Stoiakin
84d47d2824 unl0kr: add a CLI option to show a custom message
Fixes: #33
2025-04-02 17:40:46 +03:00
Vladimir Stoiakin
9bb6b3acdf unl0kr: add the CLI option to avoid suffixing a password with a newline character
Appending the newline character '\n' is the right thing to do when you print a password to a tty or a text file.
But different tools process it differently. For example, cryptsetup strips the newline character, but systemd-cryptsetup with a password agent does not.
This commit allows to control the newline character with an option.
2025-03-13 18:25:26 +03:00
Vladimir Stoiakin
a573643403 unl0kr-agent: add more debug output 2025-02-24 11:57:13 +03:00
Vladimir Stoiakin
ee8e31ad4b unl0kr: add a systemd password agent 2024-11-05 11:33:53 +03:00