diff options
author | Saiyang Gou <gousaiyang@163.com> | 2020-02-05 00:15:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-05 00:15:00 (GMT) |
commit | 95f60010219e142a436fae18e1695cbc45407afe (patch) | |
tree | f908dd8bad7c24219c72f6602d47f1496a4baf86 /Doc/library | |
parent | 40e547dfbb9052ca0c667b242f6825ed1c23c195 (diff) | |
download | cpython-95f60010219e142a436fae18e1695cbc45407afe.zip cpython-95f60010219e142a436fae18e1695cbc45407afe.tar.gz cpython-95f60010219e142a436fae18e1695cbc45407afe.tar.bz2 |
bpo-39184: Add audit events to command execution functions in os and pty modules (GH-17824)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/os.rst | 10 | ||||
-rw-r--r-- | Doc/library/pty.rst | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index f59423c..bfc0322 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -3314,6 +3314,8 @@ to be ignored. you can check whether or not it is available using :data:`os.supports_fd`. If it is unavailable, using it will raise a :exc:`NotImplementedError`. + .. audit-event:: os.exec path,args,env os.execl + .. availability:: Unix, Windows. .. versionadded:: 3.3 @@ -3670,6 +3672,8 @@ written in Python, such as a mail server's external command delivery program. :c:data:`POSIX_SPAWN_SETSCHEDPARAM` and :c:data:`POSIX_SPAWN_SETSCHEDULER` flags. + .. audit-event:: os.posix_spawn path,argv,env os.posix_spawn + .. versionadded:: 3.8 .. availability:: Unix. @@ -3684,6 +3688,8 @@ written in Python, such as a mail server's external command delivery program. for the *executable* file in the list of directories specified by the :envvar:`PATH` environment variable (in the same way as for ``execvp(3)``). + .. audit-event:: os.posix_spawn path,argv,env os.posix_spawnp + .. versionadded:: 3.8 .. availability:: See :func:`posix_spawn` documentation. @@ -3784,6 +3790,8 @@ written in Python, such as a mail server's external command delivery program. L = ['cp', 'index.html', '/dev/null'] os.spawnvpe(os.P_WAIT, 'cp', L, os.environ) + .. audit-event:: os.spawn mode,path,args,env os.spawnl + .. availability:: Unix, Windows. :func:`spawnlp`, :func:`spawnlpe`, :func:`spawnvp` and :func:`spawnvpe` are not available on Windows. :func:`spawnle` and :func:`spawnve` are not thread-safe on Windows; we advise you to use the @@ -3853,6 +3861,8 @@ written in Python, such as a mail server's external command delivery program. function is not resolved until this function is first called. If the function cannot be resolved, :exc:`NotImplementedError` will be raised. + .. audit-event:: os.startfile path,operation os.startfile + .. availability:: Windows. diff --git a/Doc/library/pty.rst b/Doc/library/pty.rst index 1226843..e85d2e2 100644 --- a/Doc/library/pty.rst +++ b/Doc/library/pty.rst @@ -69,6 +69,7 @@ The :mod:`pty` module defines the following functions: *select* throws an error on your platform when passed three empty lists. This is a bug, documented in `issue 26228 <https://bugs.python.org/issue26228>`_. + .. audit-event:: pty.spawn argv pty.spawn .. versionchanged:: 3.4 :func:`spawn` now returns the status value from :func:`os.waitpid` |