keyctl.2: Use syscall(SYS_...); for system calls without a glibc wrapper

Remove the libkeyutils prototype from the synopsis, which isn't
documented in the rest of the page, and as NOTES says, it's
probably better to use the various library functions.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar 2021-05-10 19:55:24 +02:00 committed by Michael Kerrisk
parent 1ad9eda841
commit 5b013bd50f
1 changed files with 7 additions and 10 deletions

View File

@ -30,22 +30,20 @@
keyctl \- manipulate the kernel's key management facility
.SH SYNOPSIS
.nf
.B #include <keyutils.h>
.PP
.BI "long keyctl(int " operation ", ...);"
.PP
.B "/* For direct call via syscall(2): */"
.B #include <asm/unistd.h>
.B #include <linux/keyctl.h>
.BR "#include <linux/keyctl.h>" " /* Definition of " KEY* " constants */"
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
.B #include <unistd.h>
.PP
.BI "long syscall(__NR_keyctl, int " operation ", unsigned long " arg2 ,
.BI "long syscall(SYS_keyctl, int " operation ", unsigned long " arg2 ,
.BI " unsigned long " arg3 ", unsigned long " arg4 ,
.BI " unsigned long " arg5 );
.fi
.PP
.IR Note :
There is no glibc wrapper for this system call; see NOTES.
glibc provides no wrapper for
.BR keyctl (),
necessitating the use of
.BR syscall (2).
.SH DESCRIPTION
.BR keyctl ()
allows user-space programs to perform key manipulation.
@ -1954,7 +1952,6 @@ This system call first appeared in Linux 2.6.10.
.SH CONFORMING TO
This system call is a nonstandard Linux extension.
.SH NOTES
Glibc does not provide a wrapper for this system call.
A wrapper is provided in the
.IR libkeyutils
library.