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:
Todd C. Miller
2013-08-03 08:30:06 -06:00
parent 8c867be419
commit 1f3ea50afd
34 changed files with 371 additions and 233 deletions

View File

@@ -210,14 +210,6 @@ struct sudo_user {
#endif
#define ROOT_GID 0
/*
* We used to use the system definition of PASS_MAX or _PASSWD_LEN,
* but that caused problems with various alternate authentication
* methods. So, we just define our own and assume that it is >= the
* system max.
*/
#define SUDO_PASS_MAX 256
struct lbuf;
struct passwd;
struct stat;
@@ -287,9 +279,6 @@ void dump_auth_methods(void);
/* getspwuid.c */
char *sudo_getepw(const struct passwd *);
/* zero_bytes.c */
void zero_bytes(volatile void *, size_t);
/* sudo_nss.c */
void display_privs(struct sudo_nss_list *, struct passwd *);
bool display_cmnd(struct sudo_nss_list *, struct passwd *);