Skip to content

Commit fbe3c76

Browse files
zoobamiss-islington
authored andcommitted
bpo-38418: Fixes audit event for os.system to be named 'os.system' (GH-16670)
https://bugs.python.org/issue38418 Automerge-Triggered-By: @zooba
1 parent b1fa72a commit fbe3c76

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
@@ -4324,7 +4324,7 @@ os_system_impl(PyObject *module, const Py_UNICODE *command)
43244324
{
43254325
long result;
43264326

4327-
if (PySys_Audit("system", "(u)", command) < 0) {
4327+
if (PySys_Audit("os.system", "(u)", command) < 0) {
43284328
return -1;
43294329
}
43304330

@@ -4351,7 +4351,7 @@ os_system_impl(PyObject *module, PyObject *command)
43514351
long result;
43524352
const char *bytes = PyBytes_AsString(command);
43534353

4354-
if (PySys_Audit("system", "(O)", command) < 0) {
4354+
if (PySys_Audit("os.system", "(O)", command) < 0) {
43554355
return -1;
43564356
}
43574357

0 commit comments

Comments
 (0)