bpo-38418: Fixes audit event for os.system to be named 'os.system' (GH-16670)

https://bugs.python.org/issue38418

Automerge-Triggered-By: @zooba
(cherry picked from commit fbe3c76c7c)

Co-authored-by: Steve Dower <steve.dower@python.org>
This commit is contained in:
Miss Islington (bot) 2019-10-18 09:32:14 -07:00 committed by GitHub
parent 0f3187c1ce
commit 5fb81420d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -0,0 +1 @@
Fixes audit event for :func:`os.system` to be named ``os.system``.

View File

@ -4316,7 +4316,7 @@ os_system_impl(PyObject *module, const Py_UNICODE *command)
{
long result;
if (PySys_Audit("system", "(u)", command) < 0) {
if (PySys_Audit("os.system", "(u)", command) < 0) {
return -1;
}
@ -4343,7 +4343,7 @@ os_system_impl(PyObject *module, PyObject *command)
long result;
const char *bytes = PyBytes_AsString(command);
if (PySys_Audit("system", "(O)", command) < 0) {
if (PySys_Audit("os.system", "(O)", command) < 0) {
return -1;
}