blob: 1a3ca79f466bb2cd7ea70f3bd1dc38f4fa2d2151 [file] [log] [blame]
Andrey Vagin67867412016-09-06 00:47:14 -07001#ifndef __LINUX_NSFS_H
2#define __LINUX_NSFS_H
3
4#include <linux/ioctl.h>
5
6#define NSIO 0xb7
7
8/* Returns a file descriptor that refers to an owning user namespace */
Michael Kerrisk (man-pages)d95fa3c2017-01-25 14:04:15 +13009#define NS_GET_USERNS _IO(NSIO, 0x1)
Andrey Vagina7306ed2016-09-06 00:47:15 -070010/* Returns a file descriptor that refers to a parent namespace */
Michael Kerrisk (man-pages)d95fa3c2017-01-25 14:04:15 +130011#define NS_GET_PARENT _IO(NSIO, 0x2)
Michael Kerrisk (man-pages)e5ff5ce2017-01-25 14:03:36 +130012/* Returns the type of namespace (CLONE_NEW* value) referred to by
13 file descriptor */
Michael Kerrisk (man-pages)d95fa3c2017-01-25 14:04:15 +130014#define NS_GET_NSTYPE _IO(NSIO, 0x3)
15/* Get owner UID (in the caller's user namespace) for a user namespace */
16#define NS_GET_OWNER_UID _IO(NSIO, 0x4)
Andrey Vagin67867412016-09-06 00:47:14 -070017
18#endif /* __LINUX_NSFS_H */