--- embedaddon/sudo/include/sudo_plugin.h 2013/07/22 10:46:12 1.1.1.3 +++ embedaddon/sudo/include/sudo_plugin.h 2014/06/15 16:12:54 1.1.1.5 @@ -19,7 +19,7 @@ /* API version major/minor */ #define SUDO_API_VERSION_MAJOR 1 -#define SUDO_API_VERSION_MINOR 3 +#define SUDO_API_VERSION_MINOR 5 #define SUDO_API_MKVERSION(x, y) ((x << 16) | y) #define SUDO_API_VERSION SUDO_API_MKVERSION(SUDO_API_VERSION_MAJOR, SUDO_API_VERSION_MINOR) @@ -46,6 +46,17 @@ struct sudo_conv_message { int timeout; const char *msg; }; + +/* + * Maximum length of a reply (not including the trailing NUL) when + * conversing with the user. In practical terms, this is the longest + * password sudo will support. This means that a buffer of size + * SUDO_CONV_REPL_MAX+1 is guaranteed to be able to hold any reply + * from the conversation function. It is also useful as a max value + * for memset_s() when clearing passwords returned by the conversation + * function. + */ +#define SUDO_CONV_REPL_MAX 255 struct sudo_conv_reply { char *reply;