All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Incorporated
plugin_name
andplugin_version
into thePlugin
struct Drop::drop
is called on plugins when sudo exits- Support for the
change_winsize
callback. Requires sudo 1.8.21 or greater.
- Wrapped
printf_facility
plugin argument into a dedicatedPrintFacility
struct to wrap all user communication. - Moved much of the work done in the
sudo_io_plugin!
macro to non-macro code. - Almost complete rewrite of the internals to be more Rust-like, and use traits to reduce the amount of macro magic necessary.
- Autodetect what version of the
sudo_plugin
API is supported by the version ofsudo_plugin-sys
we're linked against. - Now uses a prelude-style import.
- Replaced error-chain with thiserror.
- Completely reworked error handling. Plugin implementations may now provide
coercions from sudo_plugin internal errors to appropriate return codes. The
provided
Error
type defaults to aborting the session on error. - Plugins no longer mutable when calling
log_*
functions.
-
Panics inside of plugins no longer cause undefined behavior by crossing FFI boundaries. All panics are caught at the boundaries and turned into an appropriate error type.
-
No longer segfaults against sudo >= 1.9 which introduced API changes that require the ability to write into the plugin.
1.2.0 - 2020-03-26
- Automatic support for
-V
flag, which prints the version ofsudo
and any active plugins
- Builds using Rust 2018
- No longer fails to build on warnings, unless being run in CI
- Allows plugins to use any error library they wish, as long as the error
types returned in
Result
s implementInto<sudo_plugin::errors::Error>
.
1.1.0 - 2018-05-18
- Support writing directly to the user's TTY
UserInfo::tty
is now aPathBuf
instead of aString
.- Depends on
sudo_plugin-sys
~1.1, which changed mutability of pointer arguments due to bindgen 0.37
- Macros to simplify writing sudo plugins
- Full compatibility with plugin API versions up to 1.12