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:
11
src/sudo.h
11
src/sudo.h
@@ -75,14 +75,6 @@
|
||||
#define MODE_NONINTERACTIVE 0x00800000
|
||||
#define MODE_LONG_LIST 0x01000000
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
||||
/*
|
||||
* Flags for tgetpass()
|
||||
*/
|
||||
@@ -178,9 +170,6 @@ void cleanup(int);
|
||||
char *tgetpass(const char *, int, int);
|
||||
int tty_present(void);
|
||||
|
||||
/* zero_bytes.c */
|
||||
void zero_bytes(volatile void *, size_t);
|
||||
|
||||
/* exec.c */
|
||||
int pipe_nonblock(int fds[2]);
|
||||
int sudo_execute(struct command_details *details, struct command_status *cstat);
|
||||
|
Reference in New Issue
Block a user