CAP_NETWORK_IOCTL(3N) CAP_NETWORK_IOCTL(3N)
cap_network_ioctl - execute an I/O control operation with privilege
#include <cap_net.h>
int cap_network_ioctl(int fd, int request, ...);
cap_network_ioctl asserts appropriate privilege when executing an I/O
control operation.
If _POSIX_CAP is in effect, the appropriate privilege depends upon the
request.
These requests require CAP_NETWORK_MGT capability: SIOCSIFNETMASK
SIOCSIFADDR
SIOCSIFBRDADDR
SIOCSIFHEAD
SIOCSIFDSTADDR
SIOCSIFFLAGS
SIOCSIFMETRIC
SIOCGIFLABEL
SIOCSIFLABEL
SIOCSIFUID
SIOC_EP_EXEC
SIOC_EP_FET
SIOC_EP_POKE
SIOC_EP_STO
SIOC_EP_SIGNAL
SIOCIFISPSCTL
cap_network_ioctl returns 0 if successful, -1 otherwise.
EINVAL The requested operation is not supported.
Otherwise, cap_network_ioctl has the same error codes as ioctl(2).
capability(4), ioctl(2), sysconf(3c).
PPPPaaaaggggeeee 1111 [ Back ]
|