diff options
| author | Alejandro Colomar <alx@kernel.org> | 2024-06-11 02:14:33 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2024-06-13 23:54:50 +0200 |
| commit | 421f0aff99e4ca16035f841ce87bc472cce359ca (patch) | |
| tree | 84087a6c069523bbe8fee4a459c3ae5971d50bcb | |
| parent | ebc5e0a8bc89552f9fc92f34e8e9301fee58c17f (diff) | |
| download | man-pages-421f0aff99e4ca16035f841ce87bc472cce359ca.tar.gz | |
NS_GET_OWNER_UID.2const: Tweak after split
Signed-off-by: Alejandro Colomar <alx@kernel.org>
| -rw-r--r-- | man/man2const/NS_GET_OWNER_UID.2const | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/man/man2const/NS_GET_OWNER_UID.2const b/man/man2const/NS_GET_OWNER_UID.2const index 3b92537407..f64d607bb4 100644 --- a/man/man2const/NS_GET_OWNER_UID.2const +++ b/man/man2const/NS_GET_OWNER_UID.2const @@ -1,4 +1,5 @@ .\" Copyright 2017, Michael Kerrisk <mtk.manpages@gmail.com> +.\" Copyright 2024, Alejandro Colomar <alx@kernel.org> .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" @@ -7,21 +8,19 @@ NS_GET_OWNER_UID \- discovering the owner of a user namespace +.SH SYNOPSIS +.nf +.BR "#include <linux/nsfs.h>" " /* Definition of " NS_GET_OWNER_UID " */" +.B #include <sys/ioctl.h> +.P +.BI "int ioctl(int " fd ", NS_GET_OWNER_UID, uid_t *" uid ); +.fi .SH DESCRIPTION The .B NS_GET_OWNER_UID -.\" commit 015bb305b8ebe8d601a238ab70ebdc394c7a19ba -operation (available since Linux 4.11) can be used to discover +operation can be used to discover the owner user ID of a user namespace (i.e., the effective user ID of the process that created the user namespace). -The form of the call is: -.P -.in +4n -.EX -uid_t uid; -ioctl(fd, NS_GET_OWNER_UID, &uid); -.EE -.in .P .I fd refers to a @@ -31,16 +30,23 @@ file. The owner user ID is returned in the .I uid_t pointed to by the third argument. -.P -This operation can fail with the following error: +.SH RETURN VALUE +On success, +0 is returned. +On error, +\-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS .TP .B EINVAL .I fd does not refer to a user namespace. -.SH ERRORS .SH STANDARDS Linux. .SH HISTORY +Linux 4.11. +.\" linux.git 015bb305b8ebe8d601a238ab70ebdc394c7a19ba .SH SEE ALSO .BR ioctl (2), .BR ioctl_nsfs (2) |
