cap_bind(3N)

cap_bind - bind a privileged name to a socket

As shipped in IRIX 6.5.22. Unchanged since IRIX 6.5.

NAME
     cap_bind - bind a privileged name to a socket

SYNOPSIS
     #include <cap_net.h>

     int cap_bind(int s, const struct sockaddr *name,
                  int namelen);

DESCRIPTION
     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.

RETURN VALUES
     cap_bind returns 0 if successful, -1 otherwise.

ERRORS
     cap_bind has the same error codes as bind(2).

SEE ALSO
     capability(4), bind(2), sysconf(3c).