summaryrefslogtreecommitdiff
path: root/debian/patches/03-468454-fingerd-ipv6.patch
blob: 854643e0988ea14166fa78bfc047d1186ef8ee61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468454

Description: Implement IPv6 capacity for the server Fingerd.
Author: Mats Erik Andersson <debian@gisladisker.se>
Forwarded: no
Last-Update: 2010-02-09

--- a/fingerd/fingerd.c
+++ b/fingerd/fingerd.c
@@ -112,7 +112,7 @@ main(int argc, char *argv[])
 	int k, nusers;
 	char *s, *t;
 	const char *fingerpath = NULL;
-	struct sockaddr_in sn;
+	struct sockaddr_storage sn;
 	socklen_t sval = sizeof(sn);
 
 
@@ -182,11 +182,13 @@ main(int argc, char *argv[])
 	}
 
 	if (welcome) {
-		char buf[256];
+		char buf[256] = "";
 		struct hostent *hp;
 		struct utsname utsname;
 
 		uname(&utsname);
+		/* gethostbyname() only retrieves the local hostname.
+		 * This does not disturb IPv6 in any manner. */
 		gethostname(buf, sizeof(buf));
 		if ((hp = gethostbyname(buf))) {
 			/* paranoia: dns spoofing? */