From: Alejandro Colomar Date: Tue, 11 Jun 2024 00:14:33 +0000 (+0200) Subject: NS_GET_OWNER_UID.2const: Tweak after split X-Git-Tag: man-pages-6.9~3^2~4^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=421f0aff99e4ca16035f841ce87bc472cce359ca;p=thirdparty%2Fman-pages.git NS_GET_OWNER_UID.2const: Tweak after split Signed-off-by: Alejandro Colomar --- diff --git a/man/man2const/NS_GET_OWNER_UID.2const b/man/man2const/NS_GET_OWNER_UID.2const index 3b9253740..f64d607bb 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 +.\" Copyright 2024, Alejandro Colomar .\" .\" 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 " " /* Definition of " NS_GET_OWNER_UID " */" +.B #include +.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)