Sudo 1.9: accessing terminal data from Python
Sudo 1.9 is now feature complete. One of the new features is Python support, meaning that you can easily extend sudo functionality using Python scripts. It supports the very same APIs as the regular C plugin API, only the language is different. One of the more interesting APIs is the IO logging API, which provides access to terminal data in real-time, both input and output. This way you can check if a sudo user is accessing data that he should not, or analyze the commands entered and terminate a session before a disaster occurs. In this blog you will find two simple examples for the above use cases. Both are over simplified but functional. You can use them to test out the new functionality, or as a basis for your own code.
Sudo