summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2015-10-27 15:23:28 +0000
committermillert <millert@openbsd.org>2015-10-27 15:23:28 +0000
commite5ffb51bc29f43663d195b85d5a9bbce768dfd41 (patch)
treed53eafeec65cc5bdadf052cd09235ef277bba8df /usr.sbin/lpr
parentRIP arp_ifinit(). (diff)
downloadwireguard-openbsd-e5ffb51bc29f43663d195b85d5a9bbce768dfd41.tar.xz
wireguard-openbsd-e5ffb51bc29f43663d195b85d5a9bbce768dfd41.zip
Use AF_UNIX instead of AF_LOCAL.
Diffstat (limited to 'usr.sbin/lpr')
-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);