Implement memset_s() and use it instead of zero_bytes().
A new constant, SUDO_CONV_REPL_MAX, is defined by the plugin API as the max conversation reply length. This constant can be used as a max value for memset_s() when clearing passwords filled in by the conversation function.
This commit is contained in:
@@ -106,7 +106,7 @@ sudo_secureware_cleanup(pw, auth)
|
||||
debug_decl(sudo_secureware_cleanup, SUDO_DEBUG_AUTH)
|
||||
|
||||
if (pw_epasswd != NULL) {
|
||||
zero_bytes(pw_epasswd, strlen(pw_epasswd));
|
||||
memset_s(pw_epasswd, SUDO_CONV_REPL_MAX, 0, strlen(pw_epasswd));
|
||||
efree(pw_epasswd);
|
||||
}
|
||||
debug_return_int(AUTH_SUCCESS);
|
||||
|
Reference in New Issue
Block a user