|
NAMEcap_ioctls_limit , cap_ioctls_get
—
manage allowed ioctl commands
LIBRARYStandard C Library (libc, -lc)SYNOPSIS#include <sys/capsicum.h>
int
ssize_t
DESCRIPTIONIf a file descriptor is granted theCAP_IOCTL capability
right, the list of allowed
ioctl(2)
commands can be selectively reduced (but never expanded) with the
cap_ioctls_limit () system call. The
cmds argument is an array of
ioctl(2)
commands and the ncmds argument specifies the number of
elements in the array. There can be up to 256 elements
in the array. Including an element that has been previously revoked will
generate an error. After a successful call only those listed in the array may
be used.
The list of allowed ioctl commands for a given file descriptor can
be obtained with the RETURN VALUESThecap_ioctls_limit () function returns the
value 0 if successful; otherwise the value -1 is returned and
the global variable errno is set to indicate the error.
The ERRORScap_ioctls_limit () succeeds unless:
SEE ALSOcap_fcntls_limit(2), cap_rights_limit(2), ioctl(2)HISTORYThecap_ioctls_get () and
cap_ioctls_limit () system calls first appeared in
FreeBSD 8.3. Support for capabilities and capabilities
mode was developed as part of the TrustedBSD Project.
AUTHORSThis function was created by Pawel Jakub Dawidek <pawel@dawidek.net> under sponsorship of the FreeBSD Foundation.
Visit the GSP FreeBSD Man Page Interface. |