[New-bugs-announce] [issue26835] Add file-sealing ops to fcntl
Christian Heimes
report at bugs.python.org
Sun Apr 24 09:53:19 EDT 2016
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 <report at bugs.python.org>
<http://bugs.python.org/issue26835>
_______________________________________
More information about the New-bugs-announce
mailing list