Skip to content

Commit 5fb8142

Browse files
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 fbe3c76) Co-authored-by: Steve Dower <steve.dower@python.org>
1 parent 0f3187c commit 5fb8142

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixes audit event for :func:`os.system` to be named ``os.system``.

Modules/posixmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4316,7 +4316,7 @@ os_system_impl(PyObject *module, const Py_UNICODE *command)
43164316
{
43174317
long result;
43184318

4319-
if (PySys_Audit("system", "(u)", command) < 0) {
4319+
if (PySys_Audit("os.system", "(u)", command) < 0) {
43204320
return -1;
43214321
}
43224322

@@ -4343,7 +4343,7 @@ os_system_impl(PyObject *module, PyObject *command)
43434343
long result;
43444344
const char *bytes = PyBytes_AsString(command);
43454345

4346-
if (PySys_Audit("system", "(O)", command) < 0) {
4346+
if (PySys_Audit("os.system", "(O)", command) < 0) {
43474347
return -1;
43484348
}
43494349

0 commit comments

Comments
 (0)