Todd C. Miller
1a00423afd
Add free function for sudo Python module.
...
This reduces the amount of memory leaked on unload.
2023-07-25 09:33:03 -06:00
Todd C. Miller
56b829f66b
sudo_module_register_conv_message: fix copy pasta in debug_decl
2023-07-24 10:47:15 -06:00
Todd C. Miller
0462a4ee8c
sudo_module_register_loghandler: clear sudo_type_LogHandler on error
...
Also add comments about PyModule_AddObject stealing a ref on success.
2023-07-22 08:33:04 -06:00
Todd C. Miller
ba5ef624f2
Make sudo_type_ConvMessage and sudo_type_LogHandler static.
...
They are not used outside their respective compilation units.
2023-07-21 10:46:16 -06:00
Todd C. Miller
0c85f10c80
python plugin: silence -Wconversion warnings.
2023-07-07 15:07:04 -06:00
Todd C. Miller
13672f28df
Make sudo pass -Wwrite-strings
2022-06-28 16:33:15 -06:00
Todd C. Miller
bca213959b
Remove Py_SSIZE2SIZE to quiet cppcheck warnings.
...
Tuple size cannot be negative and we already handle the case where
it is zero.
2021-01-26 11:33:06 -07:00
Todd C. Miller
4e11bc0e26
Suppress PVS Studio false positives.
2021-01-06 14:27:09 -07:00
Todd C. Miller
84e6e6ccf9
Update copyright year on some files where it was out of date.
2020-08-31 14:09:36 -06:00
Robert Manner
c039a99c10
plugins/python/sudo_module: add sudo.LogHandler
...
so python log system can be used with sudo logsystem.
Loggers use it by default (the handler is set on the root logger).
If that is not the intent, it can be overridden explicitly.
2020-02-28 05:46:54 -07:00
Todd C. Miller
4d1454ebab
Add missing check for calloc(3) failure.
2020-02-20 11:31:27 -07:00
Robert Manner
62524416eb
plugins/python/pyhelpers: add helpers for attribute handling
...
to simplify code a bit.
2020-02-10 05:24:16 -07:00
Robert Manner
3128cc97ca
plugins/python: fix return value typo for the error case
2020-01-23 12:46:14 -07:00
Robert Manner
9b49d44e84
plugins/python: add a sudo python module
2019-12-14 12:55:42 -07:00