]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
KEYCTL_DESCRIBE.2const: Tweak after split
authorAlejandro Colomar <alx@kernel.org>
Wed, 10 Jul 2024 20:42:59 +0000 (22:42 +0200)
committerAlejandro Colomar <alx@kernel.org>
Wed, 21 Aug 2024 21:51:08 +0000 (23:51 +0200)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man2const/KEYCTL_DESCRIBE.2const

index f0f2e90a2efb3305fa88417e9fa791213c6c03ed..621706d1cd2b2203a496aca6ec3b8d528d4926e0 100644 (file)
@@ -20,39 +20,30 @@ Standard C library
 .BR "#include <sys/syscall.h>" "   /* Definition of " SYS_* " constants */"
 .B #include <unistd.h>
 .P
-.BI "long syscall(SYS_keyctl, KEYCTL_DESCRIBE, unsigned long " arg2 ,
-.BI "             unsigned long " arg3 ", unsigned long " arg4 ,
-.BI "             unsigned long " arg5 );
+.BI "long syscall(SYS_keyctl, KEYCTL_DESCRIBE, key_serial_t " key ,
+.BI "             char " desc "[_Nullable ." size "], size_t " size );
 .fi
 .SH DESCRIPTION
-.TP
-.BR KEYCTL_DESCRIBE " (since Linux 2.6.10)"
 Obtain a string describing the attributes of a specified key.
-.IP
+.P
 The ID of the key to be described is specified in
-.I arg2
-(cast to
-.IR key_serial_t ).
+.IR key .
 The descriptive string is returned in the buffer pointed to by
-.I arg3
-(cast to
-.IR char\~* );
-.I arg4
-(cast to
-.IR size_t )
+.IR desc ;
+.I size
 specifies the size of that buffer in bytes.
-.IP
+.P
 The key must grant the caller
 .I view
 permission.
-.IP
+.P
 The returned string is null-terminated and
 contains the following information about the key:
-.IP
+.P
 .in +4n
 .IR type ; uid ; gid ; perm ; description
 .in
-.IP
+.P
 In the above,
 .I type
 and
@@ -65,13 +56,13 @@ are decimal strings, and
 .I perm
 is a hexadecimal permissions mask.
 The descriptive string is written with the following format:
-.IP
+.P
 .in +4n
 .EX
 %s;%d;%d;%08x;%s
 .EE
 .in
-.IP
+.P
 .B Note: the intention is that the descriptive string should
 .B be extensible in future kernel versions.
 In particular, the
@@ -86,9 +77,9 @@ it should be parsed by working backwards from the end of the string
 to find the last semicolon.
 This allows future semicolon-delimited fields to be inserted
 in the descriptive string in the future.
-.IP
+.P
 Writing to the buffer is attempted only when
-.I arg3
+.I desc
 is non-NULL and the specified buffer size
 is large enough to accept the descriptive string
 (including the terminating null byte).
@@ -97,20 +88,10 @@ is large enough to accept the descriptive string
 .\" security/keyctl.c
 In order to determine whether the buffer size was too small,
 check to see if the return value of the operation is greater than
-.IR arg4 .
-.IP
-The
-.I arg5
-argument is ignored.
-.IP
-This operation is exposed by
-.I libkeyutils
-via the function
-.BR keyctl_describe (3).
+.IR size .
 .SH RETURN VALUE
-.TP
-.B KEYCTL_DESCRIBE
-The size of the description (including the terminating null byte),
+On success,
+the size of the description (including the terminating null byte),
 irrespective of the provided buffer size.
 .P
 On error, \-1 is returned, and