]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-115322: Add missing audit hooks (GH-115624)
authorRobin Jadoul <robin.jadoul@gmail.com>
Sun, 13 Apr 2025 21:46:20 +0000 (23:46 +0200)
committerGitHub <noreply@github.com>
Sun, 13 Apr 2025 21:46:20 +0000 (21:46 +0000)
commit2666a06d336675247e1602aeb64170b2443602ce
tree06a1a329ab1f5e17b81e2b799c437cd8082b8662
parentce753517a87eec776c176f3245ce5d1554a59341
GH-115322: Add missing audit hooks (GH-115624)

Add extra audit hooks to catch C function calling from ctypes,
reading/writing files through readline and executing external
programs through _posixsubprocess.

* Make audit-tests for open pass when readline.append_history_file is unavailable
* Less direct testing of _posixsubprocess for audit hooks
* Also remove the audit hook from call_cdeclfunction now that _ctypes_callproc does it instead.
* reword the NEWS entry.
* mention readline in NEWS
* add versionchanged markers
* fix audit_events.rst versionadded
* doc lint

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Doc/library/audit_events.rst
Doc/library/ctypes.rst
Doc/library/readline.rst
Lib/test/audit-tests.py
Lib/test/test_audit.py
Misc/NEWS.d/next/Security/2024-02-18-02-53-25.gh-issue-115322.Um2Sjx.rst [new file with mode: 0644]
Modules/_ctypes/callproc.c
Modules/_posixsubprocess.c
Modules/readline.c