diff options
author | Nadeshiko Manju <me@manjusaka.me> | 2025-06-20 04:23:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-19 21:23:38 +0100 |
commit | 1ddfe593200fec992d283a9b4d6ad2f1b535c018 (patch) | |
tree | a2e98617d5ef33e5c69012850cd73c4c165ef907 /Python/sysmodule.c | |
parent | bb9596fcfa50eac31c728b23a614bcbbf0386cd9 (diff) | |
download | cpython-1ddfe593200fec992d283a9b4d6ad2f1b535c018.tar.gz cpython-1ddfe593200fec992d283a9b4d6ad2f1b535c018.zip |
gh-135543: Emit sys.remote_exec audit event when sys.remote_exec is called (GH-135544)
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index e5ae841d195..b3a2512a99d 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -2488,6 +2488,11 @@ sys_remote_exec_impl(PyObject *module, int pid, PyObject *script) if (PyUnicode_FSConverter(script, &path) == 0) { return NULL; } + + if (PySys_Audit("sys.remote_exec", "iO", pid, script) < 0) { + return NULL; + } + debugger_script_path = PyBytes_AS_STRING(path); #ifdef MS_WINDOWS PyObject *unicode_path; |