HP-UX Reference (11i v3 07/02) - 3 Library Functions N-Z (vol 7)

s
smfi_setconn(3N) smfi_setconn(3N)
NAME
smfi_setconn() - sets the socket for filter to communicate with sendmail
SYNOPSIS
#include #include <libmilter/mfapi.h>
int smfi_setconn(
char *
oconn;
};
xxx
PARAMETERS
oconn Specifies the address of the desired communication socket. The address must be a NULL-
terminated string in the following proto:address
format:
{
unix|local}:path_to_file
Specifies a named pipe.
inet:port@{hostname|ip-address}
Specifies an IPV4 socket, using either a hostname or an ip-address.
inet6:port@{hostname|ip-address}
Specifies an IPV6 socket, using either a hostname or an ip-address..
DESCRIPTION
The
smfi_setconn() routine sets the socket through which the filter must communicate with
send-
mail
. smfi_setconn() must be called only once before the
smfi_main() function.
Notes
Filters must not be run as root when communicating over UNIX/local domain sockets.
The permissions for UNIX/local sockets must be set to 0600 (read/write permission only for the owner of the
socket) or 0660 (read/write permission for the owner and group of the socket). These permissions are useful
when the
sendmail RunAsUser option is used.
The permissions for a UNIX/local domain socket are determined using the the umask command, which
must be set to 007 or 077.
Some operating systems, such as Solaris, do not use the permissions of the socket. Therefore, place the
socket in a protected directory in such systems.
RETURN VALUE
smfi_setconn() does not fail due to an invalid address. The failure can only be detected in the
smfi_main() routine.
AUTHOR
smfi_setconn() was developed by the Sendmail Inc.
SEE ASLO
smfi_main(3N), smfi_register(3N), smfi_settimeout(3N), smfi_opensocket(3N), smfi_setbacklog(3N),
smfi_setdbg(3N), smfi_stop(3N).
Sendmail 8.13.3 Programmer’s Guide on
docs.hp.com .
HP-UX 11i Version 3: February 2007 1 Hewlett-Packard Company 449