Christopher Ferris | 2598113 | 2017-11-14 16:53:49 -0800 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 2 | #ifndef __LINUX_NSFS_H |
| 3 | #define __LINUX_NSFS_H |
| 4 | |
| 5 | #include <linux/ioctl.h> |
| 6 | |
| 7 | #define NSIO 0xb7 |
| 8 | |
| 9 | /* Returns a file descriptor that refers to an owning user namespace */ |
Christopher Ferris | 0543f74 | 2017-07-26 13:09:46 -0700 | [diff] [blame] | 10 | #define NS_GET_USERNS _IO(NSIO, 0x1) |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 11 | /* Returns a file descriptor that refers to a parent namespace */ |
Christopher Ferris | 0543f74 | 2017-07-26 13:09:46 -0700 | [diff] [blame] | 12 | #define NS_GET_PARENT _IO(NSIO, 0x2) |
| 13 | /* Returns the type of namespace (CLONE_NEW* value) referred to by |
| 14 | file descriptor */ |
| 15 | #define NS_GET_NSTYPE _IO(NSIO, 0x3) |
| 16 | /* Get owner UID (in the caller's user namespace) for a user namespace */ |
| 17 | #define NS_GET_OWNER_UID _IO(NSIO, 0x4) |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 18 | |
| 19 | #endif /* __LINUX_NSFS_H */ |