summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2018-04-08 18:57:39 +0000
committerguenther <guenther@openbsd.org>2018-04-08 18:57:39 +0000
commit0c4143b58cc01c54b6213011c3331cd662195f4c (patch)
treed43d82e1cf362f097a2c58e3a1dbf4e5323a7ca6
parentActually describe the parameters rather than calling facts BUGS (diff)
downloadwireguard-openbsd-0c4143b58cc01c54b6213011c3331cd662195f4c.tar.xz
wireguard-openbsd-0c4143b58cc01c54b6213011c3331cd662195f4c.zip
AF_LOCAL was a failed attempt (by POSIX?) to seem less UNIX-specific, but
AF_UNIX is both the historical _and_ standard name, so prefer and recommend it in the headers, manpages, and kernel. ok miller@ deraadt@ schwarze@
-rw-r--r--share/man/man4/netintro.47
-rw-r--r--sys/kern/uipc_proto.c10
-rw-r--r--sys/kern/uipc_socket.c8
-rw-r--r--sys/kern/uipc_socket2.c8
-rw-r--r--sys/miscfs/fifofs/fifo_vnops.c6
-rw-r--r--sys/sys/socket.h8
-rw-r--r--usr.sbin/syslogd/syslogd.87
7 files changed, 27 insertions, 27 deletions
diff --git a/share/man/man4/netintro.4 b/share/man/man4/netintro.4
index 4340846662f..bcaf05c1d5f 100644
--- a/share/man/man4/netintro.4
+++ b/share/man/man4/netintro.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: netintro.4,v 1.50 2017/11/16 15:35:07 tb Exp $
+.\" $OpenBSD: netintro.4,v 1.51 2018/04/08 18:57:39 guenther Exp $
.\" $NetBSD: netintro.4,v 1.4 1995/10/19 08:03:40 jtc Exp $
.\"
.\" Copyright (c) 1983, 1990, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)netintro.4 8.2 (Berkeley) 11/30/93
.\"
-.Dd $Mdocdate: November 16 2017 $
+.Dd $Mdocdate: April 8 2018 $
.Dt NETINTRO 4
.Os
.Sh NAME
@@ -156,7 +156,7 @@ The following address values for
are known to the system
(and additional formats are defined for possible future implementation):
.Bd -literal
-#define AF_LOCAL 1 /* local to host */
+#define AF_UNIX 1 /* local to host */
#define AF_INET 2 /* internetwork: UDP, TCP, etc. */
#define AF_INET6 24 /* IPv6 */
#define AF_MPLS 33 /* Multiprotocol Label Switching */
@@ -519,6 +519,7 @@ from the group
.Xr pf 4 ,
.Xr tcp 4 ,
.Xr udp 4 ,
+.Xr unix 4 ,
.Xr hosts 5 ,
.Xr networks 5 ,
.Xr bgpd 8 ,
diff --git a/sys/kern/uipc_proto.c b/sys/kern/uipc_proto.c
index b4439849b1c..a3a1802575c 100644
--- a/sys/kern/uipc_proto.c
+++ b/sys/kern/uipc_proto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_proto.c,v 1.16 2017/11/04 16:48:09 mpi Exp $ */
+/* $OpenBSD: uipc_proto.c,v 1.17 2018/04/08 18:57:39 guenther Exp $ */
/* $NetBSD: uipc_proto.c,v 1.8 1996/02/13 21:10:47 christos Exp $ */
/*-
@@ -50,7 +50,7 @@ struct protosw unixsw[] = {
{
.pr_type = SOCK_STREAM,
.pr_domain = &unixdomain,
- .pr_protocol = PF_LOCAL,
+ .pr_protocol = PF_UNIX,
.pr_flags = PR_CONNREQUIRED|PR_WANTRCVD|PR_RIGHTS,
.pr_usrreq = uipc_usrreq,
.pr_attach = uipc_attach,
@@ -59,7 +59,7 @@ struct protosw unixsw[] = {
{
.pr_type = SOCK_SEQPACKET,
.pr_domain = &unixdomain,
- .pr_protocol = PF_LOCAL,
+ .pr_protocol = PF_UNIX,
.pr_flags = PR_ATOMIC|PR_CONNREQUIRED|PR_WANTRCVD|PR_RIGHTS,
.pr_usrreq = uipc_usrreq,
.pr_attach = uipc_attach,
@@ -68,7 +68,7 @@ struct protosw unixsw[] = {
{
.pr_type = SOCK_DGRAM,
.pr_domain = &unixdomain,
- .pr_protocol = PF_LOCAL,
+ .pr_protocol = PF_UNIX,
.pr_flags = PR_ATOMIC|PR_ADDR|PR_RIGHTS,
.pr_usrreq = uipc_usrreq,
.pr_attach = uipc_attach,
@@ -77,7 +77,7 @@ struct protosw unixsw[] = {
};
struct domain unixdomain = {
- .dom_family = AF_LOCAL,
+ .dom_family = AF_UNIX,
.dom_name = "unix",
.dom_externalize = unp_externalize,
.dom_dispose = unp_dispose,
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 7d125c7869c..c47209e8c2a 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket.c,v 1.219 2018/03/27 08:27:29 mpi Exp $ */
+/* $OpenBSD: uipc_socket.c,v 1.220 2018/04/08 18:57:39 guenther Exp $ */
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
/*
@@ -419,8 +419,8 @@ sosend(struct socket *so, struct mbuf *addr, struct uio *uio, struct mbuf *top,
* of space and clen.
*/
clen = control->m_len;
- /* reserve extra space for AF_LOCAL's internalize */
- if (so->so_proto->pr_domain->dom_family == AF_LOCAL &&
+ /* reserve extra space for AF_UNIX's internalize */
+ if (so->so_proto->pr_domain->dom_family == AF_UNIX &&
clen >= CMSG_ALIGN(sizeof(struct cmsghdr)) &&
mtod(control, struct cmsghdr *)->cmsg_type == SCM_RIGHTS)
clen = CMSG_SPACE(
@@ -454,7 +454,7 @@ restart:
if (flags & MSG_OOB)
space += 1024;
if ((atomic && resid > so->so_snd.sb_hiwat) ||
- (so->so_proto->pr_domain->dom_family != AF_LOCAL &&
+ (so->so_proto->pr_domain->dom_family != AF_UNIX &&
clen > so->so_snd.sb_hiwat))
snderr(EMSGSIZE);
if (space < clen ||
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c
index d90d9c906ce..ec2b099cace 100644
--- a/sys/kern/uipc_socket2.c
+++ b/sys/kern/uipc_socket2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket2.c,v 1.91 2018/02/18 19:11:27 kettenis Exp $ */
+/* $OpenBSD: uipc_socket2.c,v 1.92 2018/04/08 18:57:39 guenther Exp $ */
/* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */
/*
@@ -277,7 +277,7 @@ solock(struct socket *so)
{
int s = 0;
- if ((so->so_proto->pr_domain->dom_family != PF_LOCAL) &&
+ if ((so->so_proto->pr_domain->dom_family != PF_UNIX) &&
(so->so_proto->pr_domain->dom_family != PF_ROUTE) &&
(so->so_proto->pr_domain->dom_family != PF_KEY))
NET_LOCK();
@@ -302,7 +302,7 @@ soassertlocked(struct socket *so)
case PF_INET6:
NET_ASSERT_LOCKED();
break;
- case PF_LOCAL:
+ case PF_UNIX:
case PF_ROUTE:
case PF_KEY:
default:
@@ -314,7 +314,7 @@ soassertlocked(struct socket *so)
int
sosleep(struct socket *so, void *ident, int prio, const char *wmesg, int timo)
{
- if ((so->so_proto->pr_domain->dom_family != PF_LOCAL) &&
+ if ((so->so_proto->pr_domain->dom_family != PF_UNIX) &&
(so->so_proto->pr_domain->dom_family != PF_ROUTE) &&
(so->so_proto->pr_domain->dom_family != PF_KEY)) {
return rwsleep(ident, &netlock, prio, wmesg, timo);
diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c
index 7fcd631803b..1f45487fabb 100644
--- a/sys/miscfs/fifofs/fifo_vnops.c
+++ b/sys/miscfs/fifofs/fifo_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fifo_vnops.c,v 1.63 2018/02/19 11:35:41 mpi Exp $ */
+/* $OpenBSD: fifo_vnops.c,v 1.64 2018/04/08 18:57:39 guenther Exp $ */
/* $NetBSD: fifo_vnops.c,v 1.18 1996/03/16 23:52:42 christos Exp $ */
/*
@@ -130,13 +130,13 @@ fifo_open(void *v)
if ((fip = vp->v_fifoinfo) == NULL) {
fip = malloc(sizeof(*fip), M_VNODE, M_WAITOK);
vp->v_fifoinfo = fip;
- if ((error = socreate(AF_LOCAL, &rso, SOCK_STREAM, 0)) != 0) {
+ if ((error = socreate(AF_UNIX, &rso, SOCK_STREAM, 0)) != 0) {
free(fip, M_VNODE, sizeof *fip);
vp->v_fifoinfo = NULL;
return (error);
}
fip->fi_readsock = rso;
- if ((error = socreate(AF_LOCAL, &wso, SOCK_STREAM, 0)) != 0) {
+ if ((error = socreate(AF_UNIX, &wso, SOCK_STREAM, 0)) != 0) {
(void)soclose(rso);
free(fip, M_VNODE, sizeof *fip);
vp->v_fifoinfo = NULL;
diff --git a/sys/sys/socket.h b/sys/sys/socket.h
index a1ff94653f8..9911eab654c 100644
--- a/sys/sys/socket.h
+++ b/sys/sys/socket.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: socket.h,v 1.95 2017/05/31 08:55:10 markus Exp $ */
+/* $OpenBSD: socket.h,v 1.96 2018/04/08 18:57:39 guenther Exp $ */
/* $NetBSD: socket.h,v 1.14 1996/02/09 18:25:36 christos Exp $ */
/*
@@ -159,8 +159,8 @@ struct splice {
* Address families.
*/
#define AF_UNSPEC 0 /* unspecified */
-#define AF_LOCAL 1 /* local to host (pipes, portals) */
-#define AF_UNIX AF_LOCAL /* backward compatibility */
+#define AF_UNIX 1 /* local to host */
+#define AF_LOCAL AF_UNIX /* draft POSIX compatibility */
#define AF_INET 2 /* internetwork: UDP, TCP, etc. */
#define AF_IMPLINK 3 /* arpanet imp addresses */
#define AF_PUP 4 /* pup protocols: e.g. BSP */
@@ -246,7 +246,7 @@ struct sockproto {
*/
#define PF_UNSPEC AF_UNSPEC
#define PF_LOCAL AF_LOCAL
-#define PF_UNIX PF_LOCAL /* backward compatibility */
+#define PF_UNIX AF_UNIX
#define PF_INET AF_INET
#define PF_IMPLINK AF_IMPLINK
#define PF_PUP AF_PUP
diff --git a/usr.sbin/syslogd/syslogd.8 b/usr.sbin/syslogd/syslogd.8
index 5d9114d69ea..052814d9a05 100644
--- a/usr.sbin/syslogd/syslogd.8
+++ b/usr.sbin/syslogd/syslogd.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: syslogd.8,v 1.57 2018/01/27 08:38:06 anton Exp $
+.\" $OpenBSD: syslogd.8,v 1.58 2018/04/08 18:57:39 guenther Exp $
.\"
.\" Copyright (c) 1983, 1986, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -30,7 +30,7 @@
.\" from: @(#)syslogd.8 8.1 (Berkeley) 6/6/93
.\" $NetBSD: syslogd.8,v 1.3 1996/01/02 17:41:48 perry Exp $
.\"
-.Dd $Mdocdate: January 27 2018 $
+.Dd $Mdocdate: April 8 2018 $
.Dt SYSLOGD 8
.Os
.Sh NAME
@@ -145,8 +145,7 @@ The first
is also used to find a suitable server key and certificate in
.Pa /etc/ssl/ .
.It Fl s Ar reporting_socket
-Specify path to an
-.Dv AF_LOCAL
+Specify path to a UNIX-domain
socket for use in reporting logs stored in memory buffers using
.Xr syslogc 8 .
.It Fl T Ar listen_address