cvsdist d3f1371
diff -uNr bsd-finger-0.17/CVS/Entries bsd-finger/CVS/Entries
cvsdist d3f1371
--- bsd-finger-0.17/CVS/Entries	Thu Jan  1 02:00:00 1970
cvsdist d3f1371
+++ bsd-finger/CVS/Entries	Fri Mar  9 00:00:29 2001
cvsdist d3f1371
@@ -0,0 +1,11 @@
cvsdist d3f1371
+/.cvsignore/1.1.1.1/Fri Nov  3 19:18:15 2000//
cvsdist d3f1371
+/BUGS/1.1.1.1/Fri Nov  3 19:18:15 2000//
cvsdist d3f1371
+/ChangeLog/1.1.1.1/Fri Nov  3 19:18:15 2000//
cvsdist d3f1371
+/MCONFIG.in/1.3/Sat Jan 27 04:14:52 2001//
cvsdist d3f1371
+/MRULES/1.1.1.1/Fri Nov  3 19:18:15 2000//
cvsdist d3f1371
+/Makefile/1.1.1.1/Fri Nov  3 19:18:15 2000//
cvsdist d3f1371
+/README/1.1.1.1/Fri Nov  3 19:18:15 2000//
cvsdist d3f1371
+/configure/1.5/Sat Jan 27 04:14:52 2001//
cvsdist d3f1371
+/version.h/1.1.1.1/Fri Nov  3 19:18:15 2000//
cvsdist d3f1371
+D/finger////
cvsdist d3f1371
+D/fingerd////
cvsdist d3f1371
diff -uNr bsd-finger-0.17/CVS/Repository bsd-finger/CVS/Repository
cvsdist d3f1371
--- bsd-finger-0.17/CVS/Repository	Thu Jan  1 02:00:00 1970
cvsdist d3f1371
+++ bsd-finger/CVS/Repository	Mon Feb 19 06:50:43 2001
cvsdist d3f1371
@@ -0,0 +1 @@
cvsdist d3f1371
+usagi/src/bsd-finger
cvsdist d3f1371
diff -uNr bsd-finger-0.17/CVS/Root bsd-finger/CVS/Root
cvsdist d3f1371
--- bsd-finger-0.17/CVS/Root	Thu Jan  1 02:00:00 1970
cvsdist d3f1371
+++ bsd-finger/CVS/Root	Mon Feb 19 06:50:43 2001
cvsdist d3f1371
@@ -0,0 +1 @@
cvsdist d3f1371
+:pserver:anoncvs@anoncvs.linux-ipv6.org:/cvsroot/usagi
cvsdist d3f1371
diff -uNr bsd-finger-0.17/configure bsd-finger/configure
cvsdist d3f1371
--- bsd-finger-0.17/configure	Sat Jul 29 21:00:27 2000
cvsdist d3f1371
+++ bsd-finger/configure	Sat Jan 27 06:14:52 2001
cvsdist d3f1371
@@ -25,6 +25,7 @@
cvsdist d3f1371
     --daemonmode=mode     Mode for daemon binaries [same as binmode]
cvsdist d3f1371
     --manmode=mode        Mode for manual pages [644]
cvsdist d3f1371
     --with-c-compiler=cc  Program for compiling C source [guessed]
cvsdist d3f1371
+    --enable-ipv6         Enable IPv6 support
cvsdist d3f1371
 EOF
cvsdist d3f1371
 	exit 0;;
cvsdist d3f1371
 	--verbose) ;;
cvsdist d3f1371
@@ -40,6 +41,11 @@
cvsdist d3f1371
 	--daemonmode=*) DAEMONMODE=`echo $1 | sed 's/^[^=]*=//'` ;;
cvsdist d3f1371
 	--manmode=*) MANMODE=`echo $1 | sed 's/^[^=]*=//'` ;;
cvsdist d3f1371
 	--with-c-compiler=*) CC=`echo $1 | sed 's/^[^=]*=//'` ;;
cvsdist d3f1371
+
cvsdist d3f1371
+	--disable-ipv6) ENABLE_IPV6=no;;
cvsdist d3f1371
+	--enable-ipv6=*) ENABLE_IPV6=`echo $1 | sed 's/^[^=]*=//'`;;
cvsdist d3f1371
+	--enable-ipv6) ENABLE_IPV6=yes;;
cvsdist d3f1371
+
cvsdist d3f1371
 	*) echo "Unrecognized option: $1"; exit 1;;
cvsdist d3f1371
 esac 
cvsdist d3f1371
 shift
cvsdist d3f1371
@@ -148,6 +154,42 @@
cvsdist d3f1371
 
cvsdist d3f1371
 LDFLAGS=
cvsdist d3f1371
 LIBS=
cvsdist d3f1371
+
cvsdist d3f1371
+rm -f __conftest*
cvsdist d3f1371
+
cvsdist d3f1371
+##################################################
cvsdist d3f1371
+## Enable IPv6
cvsdist d3f1371
+echo -n "Whether to enable IPv6 support... "
cvsdist d3f1371
+if [ x"$ENABLE_IPV6" = x"yes" ]; then
cvsdist d3f1371
+    echo yes
cvsdist d3f1371
+    CFLAGS="$CFLAGS -DINET6"
cvsdist d3f1371
+else
cvsdist d3f1371
+    echo no
cvsdist d3f1371
+fi
cvsdist d3f1371
+
cvsdist d3f1371
+rm -f __conftest*
cvsdist d3f1371
+
cvsdist d3f1371
+## Search IPv6 Library / Headers
cvsdist d3f1371
+if [ x"$ENABLE_IPV6" = x"yes" ]; then
cvsdist d3f1371
+    echo -n "Search for IPv6 library... "
cvsdist d3f1371
+    inet6libdirs="/usr/local/v6/lib /usr/local/lib /usr /usr/inet6/lib"
cvsdist d3f1371
+    inet6libs="inet6"
cvsdist d3f1371
+    inet6found=no
cvsdist d3f1371
+    for inet6libdir in $inet6libdirs; do
cvsdist d3f1371
+        for inet6lib in $inet6libs; do
cvsdist d3f1371
+            if [ -d $inet6libdir ] && [ -f $inet6libdir/lib$inet6lib.a ]; then
cvsdist d3f1371
+                inet6found=yes
cvsdist d3f1371
+                break 2
cvsdist d3f1371
+            fi
cvsdist d3f1371
+        done
cvsdist d3f1371
+    done
cvsdist d3f1371
+    if [ x"$inet6found" = x"yes" ]; then
cvsdist d3f1371
+        echo "$inet6libdir/lib$inet6lib.a"
cvsdist d3f1371
+        LIBS="$LIBS -L$inet6libdir -l$inet6lib"
cvsdist d3f1371
+    else
cvsdist d3f1371
+        echo "not found"
cvsdist d3f1371
+    fi
cvsdist d3f1371
+fi
cvsdist d3f1371
 
cvsdist d3f1371
 rm -f __conftest*
cvsdist d3f1371
 
cvsdist d3f1371
diff -uNr bsd-finger-0.17/finger/CVS/Entries bsd-finger/finger/CVS/Entries
cvsdist d3f1371
--- bsd-finger-0.17/finger/CVS/Entries	Thu Jan  1 02:00:00 1970
cvsdist d3f1371
+++ bsd-finger/finger/CVS/Entries	Mon Feb 19 06:50:43 2001
cvsdist d3f1371
@@ -0,0 +1,11 @@
cvsdist d3f1371
+/.cvsignore/1.1.1.1/Fri Nov  3 19:18:15 2000//
cvsdist d3f1371
+/Makefile/1.4/Sat Jan 27 05:57:07 2001//
cvsdist d3f1371
+/display.c/1.1.1.1/Fri Nov  3 19:18:15 2000//
cvsdist d3f1371
+/finger.1/1.1.1.1/Fri Nov  3 19:18:15 2000//
cvsdist d3f1371
+/finger.c/1.3/Sun Feb 11 09:33:52 2001//
cvsdist d3f1371
+/finger.h/1.1.1.1/Fri Nov  3 19:18:15 2000//
cvsdist d3f1371
+/lprint.c/1.1.1.1/Fri Nov  3 19:18:15 2000//
cvsdist d3f1371
+/net.c/1.3/Fri Jan 26 18:08:21 2001//
cvsdist d3f1371
+/sprint.c/1.1.1.1/Fri Nov  3 19:18:15 2000//
cvsdist d3f1371
+/util.c/1.1.1.1/Fri Nov  3 19:18:15 2000//
cvsdist d3f1371
+D
cvsdist d3f1371
diff -uNr bsd-finger-0.17/finger/CVS/Repository bsd-finger/finger/CVS/Repository
cvsdist d3f1371
--- bsd-finger-0.17/finger/CVS/Repository	Thu Jan  1 02:00:00 1970
cvsdist d3f1371
+++ bsd-finger/finger/CVS/Repository	Mon Feb 19 06:50:43 2001
cvsdist d3f1371
@@ -0,0 +1 @@
cvsdist d3f1371
+usagi/src/bsd-finger/finger
cvsdist d3f1371
diff -uNr bsd-finger-0.17/finger/CVS/Root bsd-finger/finger/CVS/Root
cvsdist d3f1371
--- bsd-finger-0.17/finger/CVS/Root	Thu Jan  1 02:00:00 1970
cvsdist d3f1371
+++ bsd-finger/finger/CVS/Root	Mon Feb 19 06:50:43 2001
cvsdist d3f1371
@@ -0,0 +1 @@
cvsdist d3f1371
+:pserver:anoncvs@anoncvs.linux-ipv6.org:/cvsroot/usagi
cvsdist d3f1371
diff -uNr bsd-finger-0.17/finger/Makefile bsd-finger/finger/Makefile
cvsdist d3f1371
--- bsd-finger-0.17/finger/Makefile	Sun Dec 12 20:04:52 1999
cvsdist d3f1371
+++ bsd-finger/finger/Makefile	Sat Jan 27 07:57:07 2001
cvsdist d3f1371
@@ -10,7 +10,9 @@
cvsdist d3f1371
 finger.o: ../version.h
cvsdist d3f1371
 
cvsdist d3f1371
 install: finger
cvsdist d3f1371
+	install -d $(INSTALLROOT)$(BINDIR)
cvsdist d3f1371
 	install -s -m$(BINMODE) finger $(INSTALLROOT)$(BINDIR)
cvsdist d3f1371
+	install -d $(INSTALLROOT)$(MANDIR)/man1
cvsdist d3f1371
 	install -m$(MANMODE) finger.1 $(INSTALLROOT)$(MANDIR)/man1
cvsdist d3f1371
 
cvsdist d3f1371
 clean:
cvsdist d3f1371
diff -uNr bsd-finger-0.17/finger/finger.1 bsd-finger/finger/finger.1
cvsdist d3f1371
--- bsd-finger-0.17/finger/finger.1	Mon Jul 31 02:56:57 2000
cvsdist d3f1371
+++ bsd-finger/finger/finger.1	Fri Nov  3 21:18:15 2000
cvsdist d3f1371
@@ -30,7 +30,7 @@
cvsdist d3f1371
 .\" SUCH DAMAGE.
cvsdist d3f1371
 .\"
cvsdist d3f1371
 .\"	from: @(#)finger.1	6.14 (Berkeley) 7/27/91
cvsdist d3f1371
-.\"	$Id: finger.1,v 1.18 2000/07/30 23:56:57 dholland Exp $
cvsdist d3f1371
+.\"	$Id: finger.1,v 1.1.1.1 2000/11/03 19:18:15 mk Exp $
cvsdist d3f1371
 .\"
cvsdist d3f1371
 .Dd August 15, 1999
cvsdist d3f1371
 .Dt FINGER 1
cvsdist d3f1371
diff -uNr bsd-finger-0.17/finger/finger.c bsd-finger/finger/finger.c
cvsdist d3f1371
--- bsd-finger-0.17/finger/finger.c	Sat Dec 18 18:41:51 1999
cvsdist d3f1371
+++ bsd-finger/finger/finger.c	Sun Feb 11 11:33:52 2001
cvsdist d3f1371
@@ -1,3 +1,5 @@
cvsdist d3f1371
+/* $USAGI$ */
cvsdist d3f1371
+
cvsdist d3f1371
 /*
cvsdist d3f1371
  * Copyright (c) 1989 The Regents of the University of California.
cvsdist d3f1371
  * All rights reserved.
cvsdist d3f1371
@@ -46,7 +48,7 @@
cvsdist d3f1371
  * from: @(#)finger.c	5.22 (Berkeley) 6/29/90 
cvsdist d3f1371
  */
cvsdist d3f1371
 char finger_rcsid[] = \
cvsdist d3f1371
-  "$Id: finger.c,v 1.15 1999/12/18 16:41:51 dholland Exp $";
cvsdist d3f1371
+  "$Id: finger.c,v 1.3 2001/02/11 09:33:52 yoshfuji Exp $";
cvsdist d3f1371
 
cvsdist d3f1371
 /*
cvsdist d3f1371
  * Finger prints out information about users.  It is not portable since
cvsdist d3f1371
@@ -74,7 +76,11 @@
cvsdist d3f1371
 #include <time.h>
cvsdist d3f1371
 #include <getopt.h>
cvsdist d3f1371
 #include "finger.h"
cvsdist d3f1371
+#ifdef _USAGI
cvsdist d3f1371
+#include "version.h"
cvsdist d3f1371
+#else
cvsdist d3f1371
 #include "../version.h"
cvsdist d3f1371
+#endif
cvsdist d3f1371
 
cvsdist d3f1371
 static void loginlist(void);
cvsdist d3f1371
 static void userlist(int argc, char *argv[]);
cvsdist d3f1371
@@ -92,8 +98,12 @@
cvsdist d3f1371
 
cvsdist d3f1371
 int main(int argc, char *argv[]) {
cvsdist d3f1371
 	int ch;
cvsdist d3f1371
-	struct sockaddr_in sin;
cvsdist d3f1371
-	socklen_t slen = sizeof(sin);
cvsdist d3f1371
+#ifdef INET6
cvsdist d3f1371
+	struct sockaddr_storage sa;
cvsdist d3f1371
+#else
cvsdist d3f1371
+	struct sockaddr sa;
cvsdist d3f1371
+#endif
cvsdist d3f1371
+	socklen_t slen = sizeof(sa);
cvsdist d3f1371
 
cvsdist d3f1371
 	while ((ch = getopt(argc, argv, "lmps")) != EOF) {
cvsdist d3f1371
 		switch(ch) {
cvsdist d3f1371
@@ -119,7 +129,7 @@
cvsdist d3f1371
 	argc -= optind;
cvsdist d3f1371
 	argv += optind;
cvsdist d3f1371
 
cvsdist d3f1371
-	if (getsockname(STDOUT_FILENO, (struct sockaddr *)&sin, &slen)==0) {
cvsdist d3f1371
+	if (getsockname(STDOUT_FILENO, (struct sockaddr *)&sa, &slen)==0) {
cvsdist d3f1371
 		/*
cvsdist d3f1371
 		 * stdout is a socket. must be a network finger request,
cvsdist d3f1371
 		 * so emit CRs with our LFs at the ends of lines.
cvsdist d3f1371
@@ -136,7 +146,7 @@
cvsdist d3f1371
 	 * Also check stdin for nofinger processing, because of older
cvsdist d3f1371
 	 * fingerds that make stdout a pipe for CRLF handling.
cvsdist d3f1371
 	 */
cvsdist d3f1371
-	if (getsockname(STDIN_FILENO, (struct sockaddr *)&sin, &slen)==0) {
cvsdist d3f1371
+	if (getsockname(STDIN_FILENO, (struct sockaddr *)&sa, &slen)==0) {
cvsdist d3f1371
 		enable_nofinger = 1;
cvsdist d3f1371
 	}	
cvsdist d3f1371
 
cvsdist d3f1371
diff -uNr bsd-finger-0.17/finger/finger.h bsd-finger/finger/finger.h
cvsdist d3f1371
--- bsd-finger-0.17/finger/finger.h	Tue Sep 14 13:51:11 1999
cvsdist d3f1371
+++ bsd-finger/finger/finger.h	Fri Nov  3 21:18:15 2000
cvsdist d3f1371
@@ -34,7 +34,7 @@
cvsdist d3f1371
  * SUCH DAMAGE.
cvsdist d3f1371
  *
cvsdist d3f1371
  *	from: @(#)finger.h	5.5 (Berkeley) 6/1/90
cvsdist d3f1371
- *	$Id: finger.h,v 1.7 1999/09/14 10:51:11 dholland Exp $
cvsdist d3f1371
+ *	$Id: finger.h,v 1.1.1.1 2000/11/03 19:18:15 mk Exp $
cvsdist d3f1371
  */
cvsdist d3f1371
 
cvsdist d3f1371
 #include <pwd.h>
cvsdist d3f1371
diff -uNr bsd-finger-0.17/finger/lprint.c bsd-finger/finger/lprint.c
cvsdist d3f1371
--- bsd-finger-0.17/finger/lprint.c	Tue Sep 14 13:51:11 1999
cvsdist d3f1371
+++ bsd-finger/finger/lprint.c	Fri Nov  3 21:18:15 2000
cvsdist d3f1371
@@ -38,7 +38,7 @@
cvsdist d3f1371
  * from: @(#)lprint.c	5.13 (Berkeley) 10/31/90
cvsdist d3f1371
  */
cvsdist d3f1371
 char lprint_rcsid[] = 
cvsdist d3f1371
-  "$Id: lprint.c,v 1.11 1999/09/14 10:51:11 dholland Exp $";
cvsdist d3f1371
+  "$Id: lprint.c,v 1.1.1.1 2000/11/03 19:18:15 mk Exp $";
cvsdist d3f1371
 
cvsdist d3f1371
 #include <stdio.h>
cvsdist d3f1371
 #include <ctype.h>
cvsdist d3f1371
diff -uNr bsd-finger-0.17/finger/net.c bsd-finger/finger/net.c
cvsdist d3f1371
--- bsd-finger-0.17/finger/net.c	Tue Sep 14 13:51:11 1999
cvsdist d3f1371
+++ bsd-finger/finger/net.c	Fri Jan 26 20:08:21 2001
cvsdist d3f1371
@@ -1,3 +1,5 @@
cvsdist d3f1371
+/* $USAGI: net.c,v 1.2 2000/11/17 08:00:44 yoshfuji Exp $ */
cvsdist d3f1371
+
cvsdist d3f1371
 /*
cvsdist d3f1371
  * Copyright (c) 1989 The Regents of the University of California.
cvsdist d3f1371
  * All rights reserved.
cvsdist d3f1371
@@ -36,7 +38,7 @@
cvsdist d3f1371
 
cvsdist d3f1371
 #ifndef lint
cvsdist d3f1371
 /*static char sccsid[] = "from: @(#)net.c	5.5 (Berkeley) 6/1/90";*/
cvsdist d3f1371
-char net_rcsid[] = "$Id: net.c,v 1.9 1999/09/14 10:51:11 dholland Exp $";
cvsdist d3f1371
+char net_rcsid[] = "$Id: net.c,v 1.3 2001/01/26 18:08:21 yoshfuji Exp $";
cvsdist d3f1371
 #endif /* not lint */
cvsdist d3f1371
 
cvsdist d3f1371
 #include <sys/types.h>
cvsdist d3f1371
@@ -53,18 +55,53 @@
cvsdist d3f1371
 
cvsdist d3f1371
 void netfinger(const char *name) {
cvsdist d3f1371
 	register FILE *fp;
cvsdist d3f1371
-	struct in_addr defaddr;
cvsdist d3f1371
 	register int c, sawret, ateol;
cvsdist d3f1371
+#ifdef INET6
cvsdist d3f1371
+	struct addrinfo hints, *res0, *res;
cvsdist d3f1371
+	int gai;
cvsdist d3f1371
+#else
cvsdist d3f1371
+	struct in_addr defaddr;
cvsdist d3f1371
 	struct hostent *hp, def;
cvsdist d3f1371
 	struct servent *sp;
cvsdist d3f1371
 	struct sockaddr_in sn;
cvsdist d3f1371
+	char *alist[1];
cvsdist d3f1371
+#endif
cvsdist d3f1371
 	int s;
cvsdist d3f1371
-	char *alist[1], *host;
cvsdist d3f1371
+	char *host;
cvsdist d3f1371
 
cvsdist d3f1371
 	host = strrchr(name, '@');
cvsdist d3f1371
 	if (!host) return;
cvsdist d3f1371
 	*host++ = '\0';
cvsdist d3f1371
 
cvsdist d3f1371
+#ifdef INET6
cvsdist d3f1371
+	memset(&hints, 0, sizeof(hints));
cvsdist d3f1371
+	hints.ai_family = PF_UNSPEC;
cvsdist d3f1371
+	hints.ai_socktype = SOCK_STREAM;
cvsdist d3f1371
+	gai = getaddrinfo(host, "finger", &hints, &res0);
cvsdist d3f1371
+	if (gai) {
cvsdist d3f1371
+		eprintf("finger: %s: host '%s', service '%s'\n",
cvsdist d3f1371
+			gai_strerror(gai), host, "finger");
cvsdist d3f1371
+		return;
cvsdist d3f1371
+	}
cvsdist d3f1371
+	s = -1;
cvsdist d3f1371
+	errno = 0;
cvsdist d3f1371
+	for (res=res0; res; res=res->ai_next) {
cvsdist d3f1371
+		s = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
cvsdist d3f1371
+		if (s < 0)
cvsdist d3f1371
+			continue;
cvsdist d3f1371
+		if (connect(s, res->ai_addr, res->ai_addrlen) < 0){
cvsdist d3f1371
+			close(s);
cvsdist d3f1371
+			s = -1;
cvsdist d3f1371
+			continue;
cvsdist d3f1371
+		}
cvsdist d3f1371
+		break;
cvsdist d3f1371
+	}
cvsdist d3f1371
+	freeaddrinfo(res0);
cvsdist d3f1371
+	if (s < 0) {
cvsdist d3f1371
+		eprintf("finger: cannot create socket / connet host\n");
cvsdist d3f1371
+		return;
cvsdist d3f1371
+	}
cvsdist d3f1371
+#else
cvsdist d3f1371
 	memset(&sn, 0, sizeof(sn));
cvsdist d3f1371
 
cvsdist d3f1371
 	sp = getservbyname("finger", "tcp");
cvsdist d3f1371
@@ -106,6 +143,7 @@
cvsdist d3f1371
 		close(s);
cvsdist d3f1371
 		return;
cvsdist d3f1371
 	}
cvsdist d3f1371
+#endif
cvsdist d3f1371
 
cvsdist d3f1371
 	/* -l flag for remote fingerd  */
cvsdist d3f1371
 	if (lflag) write(s, "/W ", 3);
cvsdist d3f1371
diff -uNr bsd-finger-0.17/finger/sprint.c bsd-finger/finger/sprint.c
cvsdist d3f1371
--- bsd-finger-0.17/finger/sprint.c	Sun Dec 12 20:59:33 1999
cvsdist d3f1371
+++ bsd-finger/finger/sprint.c	Fri Nov  3 21:18:15 2000
cvsdist d3f1371
@@ -36,7 +36,7 @@
cvsdist d3f1371
 
cvsdist d3f1371
 #ifndef lint
cvsdist d3f1371
 /*static char sccsid[] = "from: @(#)sprint.c	5.8 (Berkeley) 12/4/90";*/
cvsdist d3f1371
-char sprint_rcsid[] = "$Id: sprint.c,v 1.10 1999/12/12 18:59:33 dholland Exp $";
cvsdist d3f1371
+char sprint_rcsid[] = "$Id: sprint.c,v 1.1.1.1 2000/11/03 19:18:15 mk Exp $";
cvsdist d3f1371
 #endif /* not lint */
cvsdist d3f1371
 
cvsdist d3f1371
 #include <sys/types.h>
cvsdist d3f1371
diff -uNr bsd-finger-0.17/finger/util.c bsd-finger/finger/util.c
cvsdist d3f1371
--- bsd-finger-0.17/finger/util.c	Wed Sep 29 01:53:58 1999
cvsdist d3f1371
+++ bsd-finger/finger/util.c	Fri Nov  3 21:18:15 2000
cvsdist d3f1371
@@ -36,7 +36,7 @@
cvsdist d3f1371
 
cvsdist d3f1371
 #ifndef lint
cvsdist d3f1371
 /*static char sccsid[] = "from: @(#)util.c	5.14 (Berkeley) 1/17/91";*/
cvsdist d3f1371
-char util_rcsid[] = "$Id: util.c,v 1.18 1999/09/28 22:53:58 netbug Exp $";
cvsdist d3f1371
+char util_rcsid[] = "$Id: util.c,v 1.1.1.1 2000/11/03 19:18:15 mk Exp $";
cvsdist d3f1371
 #endif /* not lint */
cvsdist d3f1371
 
cvsdist d3f1371
 #include <sys/types.h>
cvsdist d3f1371
diff -uNr bsd-finger-0.17/fingerd/CVS/Entries bsd-finger/fingerd/CVS/Entries
cvsdist d3f1371
--- bsd-finger-0.17/fingerd/CVS/Entries	Thu Jan  1 02:00:00 1970
cvsdist d3f1371
+++ bsd-finger/fingerd/CVS/Entries	Mon Feb 19 06:50:43 2001
cvsdist d3f1371
@@ -0,0 +1,6 @@
cvsdist d3f1371
+/.cvsignore/1.1.1.1/Fri Nov  3 19:18:15 2000//
cvsdist d3f1371
+/Makefile/1.4/Sat Jan 27 05:57:07 2001//
cvsdist d3f1371
+/fingerd.8/1.1.1.1/Fri Nov  3 19:18:15 2000//
cvsdist d3f1371
+/fingerd.c/1.5/Sun Feb 11 09:33:52 2001//
cvsdist d3f1371
+/pathnames.h/1.1.1.1/Fri Nov  3 19:18:15 2000//
cvsdist d3f1371
+D
cvsdist d3f1371
diff -uNr bsd-finger-0.17/fingerd/CVS/Repository bsd-finger/fingerd/CVS/Repository
cvsdist d3f1371
--- bsd-finger-0.17/fingerd/CVS/Repository	Thu Jan  1 02:00:00 1970
cvsdist d3f1371
+++ bsd-finger/fingerd/CVS/Repository	Mon Feb 19 06:50:43 2001
cvsdist d3f1371
@@ -0,0 +1 @@
cvsdist d3f1371
+usagi/src/bsd-finger/fingerd
cvsdist d3f1371
diff -uNr bsd-finger-0.17/fingerd/CVS/Root bsd-finger/fingerd/CVS/Root
cvsdist d3f1371
--- bsd-finger-0.17/fingerd/CVS/Root	Thu Jan  1 02:00:00 1970
cvsdist d3f1371
+++ bsd-finger/fingerd/CVS/Root	Mon Feb 19 06:50:43 2001
cvsdist d3f1371
@@ -0,0 +1 @@
cvsdist d3f1371
+:pserver:anoncvs@anoncvs.linux-ipv6.org:/cvsroot/usagi
cvsdist d3f1371
diff -uNr bsd-finger-0.17/fingerd/Makefile bsd-finger/fingerd/Makefile
cvsdist d3f1371
--- bsd-finger-0.17/fingerd/Makefile	Sun Dec 12 20:04:57 1999
cvsdist d3f1371
+++ bsd-finger/fingerd/Makefile	Sat Jan 27 07:57:07 2001
cvsdist d3f1371
@@ -9,7 +9,9 @@
cvsdist d3f1371
 fingerd.o: pathnames.h ../version.h
cvsdist d3f1371
 
cvsdist d3f1371
 install: fingerd
cvsdist d3f1371
+	install -d $(INSTALLROOT)$(SBINDIR)
cvsdist d3f1371
 	install -s -m$(DAEMONMODE) fingerd $(INSTALLROOT)$(SBINDIR)/in.fingerd
cvsdist d3f1371
+	install -d $(INSTALLROOT)$(MANDIR)/man8
cvsdist d3f1371
 	install -m$(MANMODE) fingerd.8 $(INSTALLROOT)$(MANDIR)/man8/in.fingerd.8
cvsdist d3f1371
 	ln -sf in.fingerd.8 $(INSTALLROOT)$(MANDIR)/man8/fingerd.8
cvsdist d3f1371
 
cvsdist d3f1371
diff -uNr bsd-finger-0.17/fingerd/fingerd.8 bsd-finger/fingerd/fingerd.8
cvsdist d3f1371
--- bsd-finger-0.17/fingerd/fingerd.8	Mon Jul 31 02:56:57 2000
cvsdist d3f1371
+++ bsd-finger/fingerd/fingerd.8	Fri Nov  3 21:18:15 2000
cvsdist d3f1371
@@ -30,7 +30,7 @@
cvsdist d3f1371
 .\" SUCH DAMAGE.
cvsdist d3f1371
 .\"
cvsdist d3f1371
 .\"     from: @(#)fingerd.8	6.4 (Berkeley) 3/16/91
cvsdist d3f1371
-.\"	$Id: fingerd.8,v 1.18 2000/07/30 23:56:57 dholland Exp $
cvsdist d3f1371
+.\"	$Id: fingerd.8,v 1.1.1.1 2000/11/03 19:18:15 mk Exp $
cvsdist d3f1371
 .\"
cvsdist d3f1371
 .Dd August 29, 1996
cvsdist d3f1371
 .Dt FINGERD 8
cvsdist d3f1371
diff -uNr bsd-finger-0.17/fingerd/fingerd.c bsd-finger/fingerd/fingerd.c
cvsdist d3f1371
--- bsd-finger-0.17/fingerd/fingerd.c	Sun Dec 12 20:46:28 1999
cvsdist d3f1371
+++ bsd-finger/fingerd/fingerd.c	Sun Feb 11 11:33:52 2001
cvsdist d3f1371
@@ -1,3 +1,5 @@
cvsdist d3f1371
+/* $USAGI: fingerd.c,v 1.3 2000/11/17 08:13:01 yoshfuji Exp $ */
cvsdist d3f1371
+
cvsdist d3f1371
 /*
cvsdist d3f1371
  * Copyright (c) 1983 The Regents of the University of California.
cvsdist d3f1371
  * All rights reserved.
cvsdist d3f1371
@@ -39,7 +41,7 @@
cvsdist d3f1371
  * from: @(#)fingerd.c	5.6 (Berkeley) 6/1/90"
cvsdist d3f1371
  */
cvsdist d3f1371
 char rcsid[] = 
cvsdist d3f1371
-  "$Id: fingerd.c,v 1.23 1999/12/12 18:46:28 dholland Exp $";
cvsdist d3f1371
+  "$Id: fingerd.c,v 1.5 2001/02/11 09:33:52 yoshfuji Exp $";
cvsdist d3f1371
 
cvsdist d3f1371
 #include <pwd.h>
cvsdist d3f1371
 #include <grp.h>
cvsdist d3f1371
@@ -57,7 +59,11 @@
cvsdist d3f1371
 #include <sys/wait.h>
cvsdist d3f1371
 
cvsdist d3f1371
 #include "pathnames.h"
cvsdist d3f1371
+#ifdef _USAGI
cvsdist d3f1371
+#include "version.h"
cvsdist d3f1371
+#else
cvsdist d3f1371
 #include "../version.h"
cvsdist d3f1371
+#endif
cvsdist d3f1371
 
cvsdist d3f1371
 #define	ENTRIES	50
cvsdist d3f1371
 #define WS " \t\r\n"
cvsdist d3f1371
@@ -111,7 +117,11 @@
cvsdist d3f1371
 	int k, nusers;
cvsdist d3f1371
 	char *s, *t;
cvsdist d3f1371
 	const char *fingerpath = NULL;
cvsdist d3f1371
-	struct sockaddr_in sn;
cvsdist d3f1371
+#ifdef INET6
cvsdist d3f1371
+	struct sockaddr_storage sn;
cvsdist d3f1371
+#else
cvsdist d3f1371
+	struct sockaddr sn;
cvsdist d3f1371
+#endif
cvsdist d3f1371
 	socklen_t sval = sizeof(sn);
cvsdist d3f1371
 
cvsdist d3f1371
 
cvsdist d3f1371
@@ -182,18 +192,35 @@
cvsdist d3f1371
 
cvsdist d3f1371
 	if (welcome) {
cvsdist d3f1371
 		char buf[256];
cvsdist d3f1371
+#ifdef INET6
cvsdist d3f1371
+		struct addrinfo hints, *res0;
cvsdist d3f1371
+#else
cvsdist d3f1371
 		struct hostent *hp;
cvsdist d3f1371
+#endif
cvsdist d3f1371
 		struct utsname utsname;
cvsdist d3f1371
+		const char *cname = buf;
cvsdist d3f1371
 
cvsdist d3f1371
 		uname(&utsname);
cvsdist d3f1371
 		gethostname(buf, sizeof(buf));
cvsdist d3f1371
+#ifdef INET6
cvsdist d3f1371
+		memset(&hints, 0, sizeof(hints));
cvsdist d3f1371
+		hints.ai_family = PF_UNSPEC;
cvsdist d3f1371
+		hints.ai_flags = AI_CANONNAME;
cvsdist d3f1371
+		if (getaddrinfo(buf, NULL, &hints, &res0)) {
cvsdist d3f1371
+			/* paranoia: dns spoofing? */
cvsdist d3f1371
+			cname = res0->ai_canonname;
cvsdist d3f1371
+		}
cvsdist d3f1371
+#else
cvsdist d3f1371
 		if ((hp = gethostbyname(buf))) {
cvsdist d3f1371
 			/* paranoia: dns spoofing? */
cvsdist d3f1371
-			strncpy(buf, hp->h_name, sizeof(buf));
cvsdist d3f1371
-			buf[sizeof(buf)-1] = 0;
cvsdist d3f1371
+			cname = hp->h_name;
cvsdist d3f1371
 		}
cvsdist d3f1371
+#endif
cvsdist d3f1371
 		printf("\r\nWelcome to %s version %s at %s !\r\n\n",
cvsdist d3f1371
-				utsname.sysname, utsname.release, buf);
cvsdist d3f1371
+				utsname.sysname, utsname.release, cname);
cvsdist d3f1371
+#ifdef INET6
cvsdist d3f1371
+		freeaddrinfo(res0);
cvsdist d3f1371
+#endif
cvsdist d3f1371
 		fflush(stdout);
cvsdist d3f1371
 		switch (fork()) {
cvsdist d3f1371
 		 case -1: /* fork failed, oh well */
cvsdist d3f1371
diff -uNr bsd-finger-0.17/fingerd/pathnames.h bsd-finger/fingerd/pathnames.h
cvsdist d3f1371
--- bsd-finger-0.17/fingerd/pathnames.h	Sun Jul 14 02:21:42 1996
cvsdist d3f1371
+++ bsd-finger/fingerd/pathnames.h	Fri Nov  3 21:18:15 2000
cvsdist d3f1371
@@ -31,7 +31,7 @@
cvsdist d3f1371
  * SUCH DAMAGE.
cvsdist d3f1371
  *
cvsdist d3f1371
  *	from: @(#)pathnames.h	5.3 (Berkeley) 6/1/90
cvsdist d3f1371
- *	$Id: pathnames.h,v 1.3 1996/07/13 23:21:42 dholland Exp $
cvsdist d3f1371
+ *	$Id: pathnames.h,v 1.1.1.1 2000/11/03 19:18:15 mk Exp $
cvsdist d3f1371
  */
cvsdist d3f1371
 
cvsdist d3f1371
 /*