CAP_SOCKET(3N) CAP_SOCKET(3N)
cap_socket - create a socket with privilege
#include <cap_net.h>
int cap_socket(int domain, int type, int protocol);
cap_socket asserts appropriate privilege for the creation of sockets with
privileged protocol types, like SOCK_RAW or SOCK_IGMP .
If _POSIX_CAP is in effect, a process calling this function should have
CAP_NETWORK_MGT capability in the permitted vector of its capability set.
cap_socket returns a descriptor referencing the socket if successful, -1
otherwise.
cap_socket has the same error codes as socket(2).
capability(4), socket(2), sysconf(3c).
PPPPaaaaggggeeee 1111 [ Back ]
|