]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
NS_GET_OWNER_UID.2const: Tweak after split
authorAlejandro Colomar <alx@kernel.org>
Tue, 11 Jun 2024 00:14:33 +0000 (02:14 +0200)
committerAlejandro Colomar <alx@kernel.org>
Thu, 13 Jun 2024 21:54:50 +0000 (23:54 +0200)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man2const/NS_GET_OWNER_UID.2const

index 3b9253740791830f72b9131f493f0a46d064e81f..f64d607bb4cd8985de8854447579695e0b5a10b9 100644 (file)
@@ -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)