summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2015-10-27 15:23:29 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2015-10-27 15:23:29 +0000
commit1a4bf61aea2abac845e907cd3172e2b578c0806a (patch)
tree8c9a4ea67b6017f9565ed57226b0a2c3177ced0d
parentc3f0b4248068947da5066ae507de2e90f6ff07b8 (diff)
Use AF_UNIX instead of AF_LOCAL.
-rw-r--r--usr.sbin/lpr/common_source/startdaemon.c6
-rw-r--r--usr.sbin/lpr/lpd/lpd.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/lpr/common_source/startdaemon.c b/usr.sbin/lpr/common_source/startdaemon.c
index ca4acf98922..aec300c4910 100644
--- a/usr.sbin/lpr/common_source/startdaemon.c
+++ b/usr.sbin/lpr/common_source/startdaemon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: startdaemon.c,v 1.16 2015/10/11 20:23:49 guenther Exp $ */
+/* $OpenBSD: startdaemon.c,v 1.17 2015/10/27 15:23:28 millert Exp $ */
/* $NetBSD: startdaemon.c,v 1.10 1998/07/18 05:04:39 lukem Exp $ */
/*
@@ -56,13 +56,13 @@ startdaemon(char *printer)
size_t n;
char buf[BUFSIZ];
- s = socket(AF_LOCAL, SOCK_STREAM, 0);
+ s = socket(AF_UNIX, SOCK_STREAM, 0);
if (s < 0) {
warn("socket");
return(0);
}
memset(&un, 0, sizeof(un));
- un.sun_family = AF_LOCAL;
+ un.sun_family = AF_UNIX;
strlcpy(un.sun_path, _PATH_SOCKETNAME, sizeof(un.sun_path));
siginterrupt(SIGINT, 1);
PRIV_START;
diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c
index 0a778fc2604..17985c8cf06 100644
--- a/usr.sbin/lpr/lpd/lpd.c
+++ b/usr.sbin/lpr/lpd/lpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lpd.c,v 1.60 2015/10/11 20:23:49 guenther Exp $ */
+/* $OpenBSD: lpd.c,v 1.61 2015/10/27 15:23:28 millert Exp $ */
/* $NetBSD: lpd.c,v 1.33 2002/01/21 14:42:29 wiz Exp $ */
/*
@@ -259,7 +259,7 @@ main(int argc, char **argv)
PRIV_START;
(void)unlink(_PATH_SOCKETNAME);
PRIV_END;
- funix = socket(AF_LOCAL, SOCK_STREAM, 0);
+ funix = socket(AF_UNIX, SOCK_STREAM, 0);
if (funix < 0) {
syslog(LOG_ERR, "socket: %m");
exit(1);
@@ -277,7 +277,7 @@ main(int argc, char **argv)
signal(SIGQUIT, mcleanup);
signal(SIGTERM, mcleanup);
memset(&un, 0, sizeof(un));
- un.sun_family = AF_LOCAL;
+ un.sun_family = AF_UNIX;
strlcpy(un.sun_path, _PATH_SOCKETNAME, sizeof(un.sun_path));
PRIV_START;
if (bind(funix, (struct sockaddr *)&un, sizeof(un)) < 0) {
@@ -343,7 +343,7 @@ main(int argc, char **argv)
continue;
}
if (FD_ISSET(funix, &readfds)) {
- domain = AF_LOCAL;
+ domain = AF_UNIX;
fromlen = sizeof(fromunix);
s = accept(funix,
(struct sockaddr *)&fromunix, &fromlen);