blob: a0c8552b64ee04375cf9409b3a48f1b5230bc11e [file] [log] [blame]
Greg Kroah-Hartman6f52b162017-11-01 15:08:43 +01001/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
Andrey Vagin67867412016-09-06 00:47:14 -07002#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 */
Michael Kerrisk (man-pages)d95fa3c2017-01-25 14:04:15 +130010#define NS_GET_USERNS _IO(NSIO, 0x1)
Andrey Vagina7306ed2016-09-06 00:47:15 -070011/* Returns a file descriptor that refers to a parent namespace */
Michael Kerrisk (man-pages)d95fa3c2017-01-25 14:04:15 +130012#define NS_GET_PARENT _IO(NSIO, 0x2)
Michael Kerrisk (man-pages)e5ff5ce2017-01-25 14:03:36 +130013/* Returns the type of namespace (CLONE_NEW* value) referred to by
14 file descriptor */
Michael Kerrisk (man-pages)d95fa3c2017-01-25 14:04:15 +130015#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)
Andrey Vagin67867412016-09-06 00:47:14 -070018
19#endif /* __LINUX_NSFS_H */