summaryrefslogtreecommitdiffstats
path: root/Modules/_io/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_io/fileio.c')
-rw-r--r--Modules/_io/fileio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c
index c502c43..52a6f49 100644
--- a/Modules/_io/fileio.c
+++ b/Modules/_io/fileio.c
@@ -358,6 +358,10 @@ _io_FileIO___init___impl(fileio *self, PyObject *nameobj, const char *mode,
flags |= O_CLOEXEC;
#endif
+ if (PySys_Audit("open", "Osi", nameobj, mode, flags) < 0) {
+ goto error;
+ }
+
if (fd >= 0) {
self->fd = fd;
self->closefd = closefd;