Commit Graph

17 Commits

Author SHA1 Message Date
Robert Manner
87d76f4bbc plugins/python/example_conversation.py: make log path configurable
Similarly to IO plugin example. (It is easier to test it this way.)
2020-01-20 06:30:20 -07:00
Robert Manner
591d57ad28 plugins/python/example_io_plugin.py: fix backtrace during destructor
If the plugin fails to open the file for writing, constructor will raise
an exception and exit before creating the "_log" member variable.
So the destructor will also raise a backtrace. (Which python ignores, but
dumps out to stderr.)
2020-01-20 06:30:20 -07:00
Robert Manner
5be81eb25b plugins/python/python_plugin_common: raise debug level for module import 2020-01-20 06:30:20 -07:00
Robert Manner
8eab169098 plugins/python/example_debugging: fix typo in comment 2020-01-20 06:30:20 -07:00
Todd C. Miller
d2b7148b6c Using "libtool --clean" to remove regular files is slow.
We only need to use libtool's clean mode to remove files created by libtool.
2020-01-18 05:53:55 -07:00
Robert Manner
3e9d15a4da plugins/python/Makefile.in: fix the install path of examples
Examples are installed by default to "docdir", which refers to
PACKAGE_TARNAME variable which was empty for the python plugin Makefile.in

So the examples were installed to '.../share/doc/examples' instead
of '.../share/doc/sudo/examples'. This also made them be skipped from the
package.

Also the install target now depends on install-doc so the examples
gets installed also (similarly as other examples).
2020-01-02 11:53:08 -05:00
Todd C. Miller
486ee2b71f debug_decl and debug_decl_vars now require a semicolon at the end. 2019-12-22 08:48:16 -07:00
Robert Manner
4ad362dd8f plugins/python: example plugin demonstrating conversation and debug API 2019-12-14 12:55:42 -07:00
Robert Manner
523bcbedb6 plugins/python: add example python group plugin 2019-12-14 12:55:42 -07:00
Robert Manner
d8432fca34 plugins/python: add example python policy plugin 2019-12-14 12:55:42 -07:00
Robert Manner
ee856cc4ba plugins/python: add example io python plugin 2019-12-14 12:55:42 -07:00
Robert Manner
91e6bf8ccd Makefile.in, configure.ac: add python plugin build 2019-12-14 12:55:42 -07:00
Robert Manner
d888d44594 plugins/python: make group plugin able to debug
It does not get the debug settings, so it looks them up through
sudo_conf.
2019-12-14 12:55:42 -07:00
Robert Manner
9b49d44e84 plugins/python: add a sudo python module 2019-12-14 12:55:42 -07:00
Robert Manner
a6bac23bab plugins/python: add ImportBlocker which forbids loading unsafe python modules
If non root can alter any imported python modules, he is able to run
anything he would like to as root user.
This class is a helper to avoid such situation.

This feature can be disabled with 'DeveloperMode=1' plugin option.
2019-12-14 12:55:42 -07:00
Robert Manner
babdcbd031 plugins/python: a plugin which can load policy/io plugin written in python 2019-12-14 12:55:42 -07:00
Robert Manner
311cf122e2 plugins/python: add sudo debug helpers 2019-12-14 12:55:42 -07:00