plugins/python/sudo_module: add sudo.LogHandler

so python log system can be used with sudo logsystem.
Loggers use it by default (the handler is set on the root logger).
If that is not the intent, it can be overridden explicitly.
This commit is contained in:
Robert Manner
2020-02-27 11:19:05 +01:00
committed by Todd C. Miller
parent 34b4bb72d6
commit c039a99c10
11 changed files with 255 additions and 47 deletions

View File

@@ -178,7 +178,7 @@ sudo_module_register_importblocker(void)
}
Py_INCREF(py_meta_path);
py_import_blocker_cls = sudo_module_create_class("sudo.ImportBlocker", _sudo_ImportBlocker_class_methods);
py_import_blocker_cls = sudo_module_create_class("sudo.ImportBlocker", _sudo_ImportBlocker_class_methods, NULL);
if (py_import_blocker_cls == NULL)
goto cleanup;