plugins/python/pyhelpers: have a default sudo_printf function
Adapted the default sudo_printf from sudoers plugin to be able to print errors before plugin open() gets called. (This is used by the multiple io plugin loading to display error for too much plugin load.) Since this makes us always have a sudo_log, I have removed the logic about whether it is available or not.
This commit is contained in:

committed by
Todd C. Miller

parent
74f559155a
commit
d67c64bb37
@@ -194,7 +194,8 @@ python_plugin_register_logging(sudo_conv_t conversation,
|
||||
if (py_ctx.sudo_conv == NULL)
|
||||
py_ctx.sudo_conv = conversation;
|
||||
|
||||
py_ctx.sudo_log = sudo_printf;
|
||||
if (sudo_printf)
|
||||
py_ctx.sudo_log = sudo_printf;
|
||||
|
||||
struct sudo_conf_debug_file_list debug_files = TAILQ_HEAD_INITIALIZER(debug_files);
|
||||
struct sudo_conf_debug_file_list *debug_files_ptr = &debug_files;
|
||||
|
Reference in New Issue
Block a user