CAP_BIND(3N) CAP_BIND(3N)
cap_bind - bind a privileged name to a socket
#include <cap_net.h>
int cap_bind(int s, const struct sockaddr *name,
int namelen);
cap_bind asserts appropriate privilege when assigning a name to a socket.
This is necessary when a process wishes to bind an Internet Domain socket
to a port whose numeric value is less than 1024, for example.
If _POSIX_CAP is in effect, a process calling this function should have
CAP_PRIV_PORT capability in the permitted vector of its capability set.
cap_bind returns 0 if successful, -1 otherwise.
cap_bind has the same error codes as bind(2).
capability(4), bind(2), sysconf(3c).
PPPPaaaaggggeeee 1111 [ Back ]
|