summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_proto.c
diff options
context:
space:
mode:
authordd <dd@FreeBSD.org>2001-08-17 22:01:18 +0000
committerdd <dd@FreeBSD.org>2001-08-17 22:01:18 +0000
commit5e416567e18401664948a984b8208f0d39a1f0fd (patch)
treea9fd833a0d5be8077a8bafc85a497fe0bae21cfa /sys/kern/uipc_proto.c
parent90eec3a264887cf9fc47c0654b2012231223b681 (diff)
downloadFreeBSD-src-5e416567e18401664948a984b8208f0d39a1f0fd.zip
FreeBSD-src-5e416567e18401664948a984b8208f0d39a1f0fd.tar.gz
Implement a LOCAL_PEERCRED socket option which returns a
`struct xucred` with the credentials of the connected peer. Obviously this only works (and makes sense) on SOCK_STREAM sockets. This works for both the connect(2) and listen(2) callers. There is precise documentation of the semantics in unix(4). Reviewed by: dwmalone (eyeballed)
Diffstat (limited to 'sys/kern/uipc_proto.c')
-rw-r--r--sys/kern/uipc_proto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/uipc_proto.c b/sys/kern/uipc_proto.c
index ac01aaf..74dab78 100644
--- a/sys/kern/uipc_proto.c
+++ b/sys/kern/uipc_proto.c
@@ -51,7 +51,7 @@
static struct protosw localsw[] = {
{ SOCK_STREAM, &localdomain, 0, PR_CONNREQUIRED|PR_WANTRCVD|PR_RIGHTS,
- 0, 0, 0, 0,
+ 0, 0, 0, &uipc_ctloutput,
0,
0, 0, 0, 0,
&uipc_usrreqs
OpenPOWER on IntegriCloud