diff options
author | Christian Heimes <christian@python.org> | 2019-05-31 16:32:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-31 16:32:33 (GMT) |
commit | 8cbb5b6625268400d6e9092b75b06d6f90398dc9 (patch) | |
tree | 20053207793db2b39580b721c848097e5f2fae14 /Modules/fcntlmodule.c | |
parent | ffed76b6fc4d7dd0244b662d6e5738eb496d9def (diff) | |
download | cpython-8cbb5b6625268400d6e9092b75b06d6f90398dc9.zip cpython-8cbb5b6625268400d6e9092b75b06d6f90398dc9.tar.gz cpython-8cbb5b6625268400d6e9092b75b06d6f90398dc9.tar.bz2 |
bpo-26835: Add file sealing constants to fcntl (GH-13694)
Co-authored-by: nanjekyejoannah <nanjekyejoannah@gmail.com>
Diffstat (limited to 'Modules/fcntlmodule.c')
-rw-r--r-- | Modules/fcntlmodule.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c index a938d9e..0fbf787 100644 --- a/Modules/fcntlmodule.c +++ b/Modules/fcntlmodule.c @@ -620,7 +620,15 @@ all_ins(PyObject* m) if (PyModule_AddIntMacro(m, I_PLINK)) return -1; if (PyModule_AddIntMacro(m, I_PUNLINK)) return -1; #endif - +#ifdef F_ADD_SEALS + /* Linux: file sealing for memfd_create() */ + if (PyModule_AddIntMacro(m, F_ADD_SEALS)) return -1; + if (PyModule_AddIntMacro(m, F_GET_SEALS)) return -1; + if (PyModule_AddIntMacro(m, F_SEAL_SEAL)) return -1; + if (PyModule_AddIntMacro(m, F_SEAL_SHRINK)) return -1; + if (PyModule_AddIntMacro(m, F_SEAL_GROW)) return -1; + if (PyModule_AddIntMacro(m, F_SEAL_WRITE)) return -1; +#endif return 0; } |