diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-02-14 18:41:37 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-02-14 18:47:20 +0100 |
commit | fd6ac62c717dcef472b9b50f5e54f89b0105a7e2 (patch) | |
tree | e74fc09fa4e4701ff6df097b1a8d1e8e250dc671 /src/basic/ratelimit.h | |
parent | 65ee8660dfe6991ef15dee9cc588a91f317be059 (diff) | |
download | systemd-fd6ac62c717dcef472b9b50f5e54f89b0105a7e2.tar.gz |
ask-password-api: many fixes to ask_password_tty()
A couple of fixes:
1. always bzero_explicit() away what we remove from the passphrase
buffer. The UTF-8 code assumes the string remains NUL-terminated, and
we hence should enforce that. memzero() would do too here, but let's
be paranoid after all this is key material.
2. when clearing '*' characters from string, do so counting UTF-8
codepoints properly. We already have code in place to count UTF-8
codepoints when generating '*' characters, hence we should take the
same care when clearing them again.
3. Treat NUL on input as an alternative terminator to newline or EOF.
4. When removing characters from the password always also reset the
"codepoint" index properly.
Diffstat (limited to 'src/basic/ratelimit.h')
0 files changed, 0 insertions, 0 deletions