plugins/python_plugin_io,policy: fix version display in verbose mode
Unfortunately the test did not catch this mistake, because it only searches that "Python policy plugin API version" string is present and does not check the version.
This commit is contained in:

committed by
Todd C. Miller

parent
99f99e8a56
commit
a7eb9d3412
@@ -137,7 +137,7 @@ python_plugin_io_show_version(struct IOPluginContext *io_ctx, int verbose)
|
||||
PyThreadState_Swap(BASE_CTX(io_ctx)->py_interpreter);
|
||||
|
||||
if (verbose) {
|
||||
py_sudo_log(SUDO_CONV_INFO_MSG, "Python io plugin API version %d.%d\n", "%d.%d",
|
||||
py_sudo_log(SUDO_CONV_INFO_MSG, "Python io plugin API version %d.%d\n",
|
||||
SUDO_API_VERSION_GET_MAJOR(PY_IO_PLUGIN_VERSION),
|
||||
SUDO_API_VERSION_GET_MINOR(PY_IO_PLUGIN_VERSION));
|
||||
}
|
||||
|
@@ -195,7 +195,7 @@ python_plugin_policy_version(int verbose)
|
||||
PyThreadState_Swap(plugin_ctx.py_interpreter);
|
||||
|
||||
if (verbose) {
|
||||
py_sudo_log(SUDO_CONV_INFO_MSG, "Python policy plugin API version %d.%d\n", "%d.%d",
|
||||
py_sudo_log(SUDO_CONV_INFO_MSG, "Python policy plugin API version %d.%d\n",
|
||||
SUDO_API_VERSION_GET_MAJOR(PY_POLICY_PLUGIN_VERSION),
|
||||
SUDO_API_VERSION_GET_MINOR(PY_POLICY_PLUGIN_VERSION));
|
||||
}
|
||||
|
Reference in New Issue
Block a user