PRIV_BIND(3) Subroutines PRIV_BIND(3)NAMEpriv_bind - bind a privileged port to a socket
SYNOPSIS
#include <privman.h>
int priv_bind(int sockfd, struct sockaddr *my_addr, socklen_t addrlen);
DESCRIPTIONpriv_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).
RETURN VALUE
On success, zero is returned. On error, -1 is returned and errno is
set appropriately.
ERRORS
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.
FILES
${prefix}/etc/privman.d/appname
The application's configuration file. See privman_conf(5)BUGSpriv_bind only supports IPv4
AUTHOR
Network Associates. Send email to <privman@nailabs.com>
SEE ALSOpriv_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)Unix SEPTEMBER 2002 PRIV_BIND(3)