New submission from Christian Heimes: The file-sealing ops are useful for memfd_create(). The new syscall and ops are only available on Linux with a recent kernel.
http://man7.org/linux/man-pages/man2/fcntl.2.html http://man7.org/linux/man-pages/man2/memfd_create.2.html Code: #include <linux/fcntl.h> #ifndef F_ADD_SEALS /* * Set/Get seals */ #define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9) #define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10) /* * Types of seals */ #define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */ #define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */ #define F_SEAL_GROW 0x0004 /* prevent file from growing */ #define F_SEAL_WRITE 0x0008 /* prevent writes */ /* (1U << 31) is reserved for signed error codes */ #endif /* F_ADD_SEALS */ ---------- assignee: christian.heimes components: Extension Modules messages: 264108 nosy: christian.heimes priority: normal severity: normal stage: needs patch status: open title: Add file-sealing ops to fcntl type: enhancement versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26835> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com