plugins/python: autodetect ClassName field

If "ClassName" is not specified, load the one and only sudo.Plugin from
the module (if so), otherwise display which plugins are available from
which the system admin can choose.
This commit is contained in:
Robert Manner
2020-02-26 16:59:18 +01:00
committed by Todd C. Miller
parent 5c96b4407d
commit 34b4bb72d6
6 changed files with 115 additions and 22 deletions

View File

@@ -1,2 +1,3 @@
No plugin class is specified for python module 'SRC_DIR/example_debugging.py'. Use 'ClassName' configuration option in 'sudo.conf'
No plugin class is specified for python module 'SRC_DIR/regress/plugin_errorstr.py'. Use 'ClassName' configuration option in 'sudo.conf'
Possible plugins: ErrorMsgPlugin, ConstructErrorPlugin
Failed during loading plugin class