priv_bind - bind a privileged port to a socket |
#include <privman.h> |
int priv_bind(int sockfd, struct sockaddr *my_addr, socklen_t addrlen); |
priv_bind gives the socket sockfd the local address my_addr. my_addr is addrlen bytes long. Traditionally, this is called "assigning a name to a socket." See bind(2) for more details, as this method parallels bind(2). |
On success, zero is returned. On error, -1 is returned and errno is set appropriately. |
See bind(2) for more detail. In addition to the errors listed there, priv_bind may set errno to EPERM if the port is not listed in the application's Privman configuration file. |
${prefix}/etc/privman.d/appname |
The application's configuration file. See privman_conf(5) |
priv_bind only supports IPv4 |
Network Associates. Send email to <privman@nailabs.com> |
priv_daemon(3) priv_execve(3) priv_fopen(3) priv_wait4(3) priv_fork(3) priv_init(3) privman_conf(5) priv_open(3) priv_pam(3) priv_rerunas(3) priv_respawn_as(3) privman(7) |