mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
init: use explicit_bzero() for clearing passwords
This is a nop in practice, because it cannot be proven that this
particular bzero() is not significant. Make it explicit anyways, rather
than relying on an implementation detail of how the password is
collected.
Discussed with: Andrew Gierth <andrew tao146 riddles org uk>
(cherry picked from commit 852f70b240)
This commit is contained in:
parent
f7488064d9
commit
223d6caabd
1 changed files with 1 additions and 1 deletions
|
|
@ -908,7 +908,7 @@ single_user(void)
|
|||
if (clear == NULL || *clear == '\0')
|
||||
_exit(0);
|
||||
password = crypt(clear, pp->pw_passwd);
|
||||
bzero(clear, _PASSWORD_LEN);
|
||||
explicit_bzero(clear, _PASSWORD_LEN);
|
||||
if (password != NULL &&
|
||||
strcmp(password, pp->pw_passwd) == 0)
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue