Changeset View
Changeset View
Standalone View
Standalone View
head/share/man/man4/unix.4
Show All 22 Lines | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" @(#)unix.4 8.1 (Berkeley) 6/9/93 | .\" @(#)unix.4 8.1 (Berkeley) 6/9/93 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd August 3, 2020 | .Dd November 2, 2020 | ||||
.Dt UNIX 4 | .Dt UNIX 4 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm unix | .Nm unix | ||||
.Nd UNIX-domain protocol family | .Nd UNIX-domain protocol family | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.In sys/types.h | .In sys/types.h | ||||
.In sys/un.h | .In sys/un.h | ||||
▲ Show 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | |||||
.Sh SOCKET OPTIONS | .Sh SOCKET OPTIONS | ||||
.Tn UNIX | .Tn UNIX | ||||
domain sockets support a number of socket options for the options level | domain sockets support a number of socket options for the options level | ||||
.Dv SOL_LOCAL , | .Dv SOL_LOCAL , | ||||
which can be set with | which can be set with | ||||
.Xr setsockopt 2 | .Xr setsockopt 2 | ||||
and tested with | and tested with | ||||
.Xr getsockopt 2 : | .Xr getsockopt 2 : | ||||
.Bl -tag -width ".Dv LOCAL_CONNWAIT" | .Bl -tag -width ".Dv LOCAL_CREDS_PERSISTENT" | ||||
.It Dv LOCAL_CREDS | .It Dv LOCAL_CREDS | ||||
This option may be enabled on | This option may be enabled on | ||||
.Dv SOCK_DGRAM , | .Dv SOCK_DGRAM , | ||||
.Dv SOCK_SEQPACKET , | .Dv SOCK_SEQPACKET , | ||||
or a | or a | ||||
.Dv SOCK_STREAM | .Dv SOCK_STREAM | ||||
socket. | socket. | ||||
This option provides a mechanism for the receiver to | This option provides a mechanism for the receiver to | ||||
▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | |||||
.Pp | .Pp | ||||
Many setuid programs will | Many setuid programs will | ||||
.Xr write 2 | .Xr write 2 | ||||
data at least partially controlled by the invoker, | data at least partially controlled by the invoker, | ||||
such as error messages. | such as error messages. | ||||
Therefore, a message accompanied by a particular | Therefore, a message accompanied by a particular | ||||
.Fa sc_euid | .Fa sc_euid | ||||
value should not be trusted as being from that user. | value should not be trusted as being from that user. | ||||
.It Dv LOCAL_CREDS_PERSISTENT | |||||
This option is similar to | |||||
.Dv LOCAL_CREDS , | |||||
except that socket credentials are passed on every read from a | |||||
.Dv SOCK_STREAM | |||||
or | |||||
.Dv SOCK_SEQPACKET | |||||
socket, instead of just the first read. | |||||
The | |||||
.Dv LOCAL_CREDS | |||||
and | |||||
.Dv LOCAL_CREDS_PERSISTENT | |||||
options are mutually exclusive. | |||||
.It Dv LOCAL_CONNWAIT | .It Dv LOCAL_CONNWAIT | ||||
Used with | Used with | ||||
.Dv SOCK_STREAM | .Dv SOCK_STREAM | ||||
sockets, this option causes the | sockets, this option causes the | ||||
.Xr connect 2 | .Xr connect 2 | ||||
function to block until | function to block until | ||||
.Xr accept 2 | .Xr accept 2 | ||||
has been called on the listening socket. | has been called on the listening socket. | ||||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |