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:
Robert Manner
2020-02-05 10:29:54 +01:00
committed by Todd C. Miller
parent 99f99e8a56
commit a7eb9d3412
2 changed files with 2 additions and 2 deletions

View File

@@ -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));
}

View File

@@ -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));
}