blob: e95e795d2092b2ba5b1071e0d17663a907a3cae6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
Index: master/service.c
diff -u master/service.c.orig master/service.c
--- master/service.c.orig Thu Aug 15 06:02:41 2002
+++ master/service.c Fri Aug 16 00:28:31 2002
@@ -103,8 +103,13 @@
socklen_t len = sizeof(sin);
/* is this a connection from the local host? */
+ memset(&sin, 0, len);
if (getpeername(fd, (struct sockaddr *) &sin, &len) == 0) {
- if (((struct sockaddr *)&sin)->sa_family == AF_UNIX) {
+ switch (((struct sockaddr *)&sin)->sa_family) {
+ case AF_INET:
+ case AF_INET6:
+ break;
+ default:
return 1;
}
}
|