Save a pointer to the event_alloc parameter in the plugin open function.
That way we don't need to pass event_alloc around to the log client functions.
This commit is contained in:
@@ -54,6 +54,7 @@ static const char *interfaces_string;
|
||||
bool sudoers_recovery = true;
|
||||
sudo_conv_t sudo_conv;
|
||||
sudo_printf_t sudo_printf;
|
||||
struct sudo_plugin_event * (*plugin_event_alloc)(void);
|
||||
const char *path_ldap_conf = _PATH_LDAP_CONF;
|
||||
const char *path_ldap_secret = _PATH_LDAP_SECRET;
|
||||
static bool session_opened;
|
||||
@@ -1021,6 +1022,8 @@ sudoers_policy_open(unsigned int version, sudo_conv_t conversation,
|
||||
sudo_version = version;
|
||||
sudo_conv = conversation;
|
||||
sudo_printf = plugin_printf;
|
||||
if (sudoers_policy.event_alloc != NULL)
|
||||
plugin_event_alloc = sudoers_policy.event_alloc;
|
||||
|
||||
/* Plugin args are only specified for API version 1.2 and higher. */
|
||||
if (sudo_version < SUDO_API_MKVERSION(1, 2))
|
||||
|
Reference in New Issue
Block a user