This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients christian.heimes
Date 2016-04-24.13:53:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461505999.3.0.387096384665.issue26835@psf.upfronthosting.co.za>
In-reply-to
Content
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 */
History
Date User Action Args
2016-04-24 13:53:19christian.heimessetrecipients: + christian.heimes
2016-04-24 13:53:19christian.heimessetmessageid: <1461505999.3.0.387096384665.issue26835@psf.upfronthosting.co.za>
2016-04-24 13:53:19christian.heimeslinkissue26835 messages
2016-04-24 13:53:18christian.heimescreate