summaryrefslogtreecommitdiff
path: root/docs/sudo_plugin_python.man.in
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@sudo.ws>2022-06-06 08:39:22 -0600
committerTodd C. Miller <Todd.Miller@sudo.ws>2022-06-06 08:39:22 -0600
commitcb7e93653394f337facff2a0558d36388a4894dc (patch)
tree2325316b0e9f52db8e6563d175caf9726c141d20 /docs/sudo_plugin_python.man.in
parent9e121ff521e80a0a6e26969399d349c06c480f6b (diff)
downloadsudo-cb7e93653394f337facff2a0558d36388a4894dc.tar.gz
Document how setting ModulePath affects the Python search path.
Also advise the user to use a unique prefix to avoid name space collisions with installed Python modules. Bug #1031.
Diffstat (limited to 'docs/sudo_plugin_python.man.in')
-rw-r--r--docs/sudo_plugin_python.man.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/sudo_plugin_python.man.in b/docs/sudo_plugin_python.man.in
index e3e68e878..98c0abbfc 100644
--- a/docs/sudo_plugin_python.man.in
+++ b/docs/sudo_plugin_python.man.in
@@ -186,6 +186,16 @@ The path of a python file which contains the class of the sudo Python plugin.
It must be either an absolute path or a path relative to the sudo Python plugin
directory,
\fI@plugindir@/python\fR.
+The parent directory of
+\fIModulePath\fR
+will be appended to Python's module search path (there is currently no
+way to force Python to load a module from a fully-qualified path).
+It is good practice to use a prefix for the module file that is unlikely
+to conflict with other installed Python modules, for example,
+\fIsudo_policy.py\fR.
+Otherwise, if the there is an installed Python module with the same
+file name as the sudo Python plugin file (without the directory),
+the wrong file will be loaded.
.TP 6n
ClassName
(Optional.) The name of the class implementing the sudo Python plugin.