Index: finger.1
===================================================================
RCS file: /cvs/src/usr.bin/finger/finger.1,v
retrieving revision 1.3
diff -u -r1.3 finger.1
--- finger.1	16 Jul 2004 19:07:08 -0000	1.3
+++ finger.1	30 Aug 2004 18:06:32 -0000
@@ -33,7 +33,7 @@
 .\" $FreeBSD: src/usr.bin/finger/finger.1,v 1.9.2.12 2003/02/25 20:31:18 trhodes Exp $
 .\" $DragonFly: src/usr.bin/finger/finger.1,v 1.3 2004/07/16 19:07:08 hmp Exp $
 .\"
-.Dd July 22, 2002
+.Dd August 30, 2004
 .Dt FINGER 1
 .Os
 .Sh NAME
@@ -41,7 +41,7 @@
 .Nd user information lookup program
 .Sh SYNOPSIS
 .Nm
-.Op Fl 46glmpshoT
+.Op Fl 468glmpshoT
 .Op Ar user ...\&
 .Op Ar user@host ...\&
 .Sh DESCRIPTION
@@ -59,6 +59,13 @@
 Forces
 .Nm
 to use IPv6 addresses only.
+.It Fl 8
+Pass through 8-bit data.  This option is intended for enabling 8-bit
+data output in the
+.Xr fingerd 8
+service.  Using this from the command line is
+.Em dangerous ,
+as the output data may include control characters for your terminal.
 .It Fl s
 Display the user's login name, real name, terminal name and write
 status (as a ``*'' before the terminal name if write permission is
Index: finger.c
===================================================================
RCS file: /cvs/src/usr.bin/finger/finger.c,v
retrieving revision 1.4
diff -u -r1.4 finger.c
--- finger.c	30 Aug 2004 18:06:49 -0000	1.4
+++ finger.c	30 Aug 2004 18:15:54 -0000
@@ -81,7 +81,7 @@
 
 DB *db;
 time_t now;
-int entries, gflag, lflag, mflag, pplan, sflag, oflag, Tflag;
+int entries, gflag, lflag, mflag, pplan, sflag, oflag, Tflag, eightflag;
 sa_family_t family = PF_UNSPEC;
 int d_first = -1;
 char tbuf[1024];
@@ -106,6 +106,9 @@
 		case '6':
 			family = AF_INET6;
 			break;
+		case '8':
+			eightflag = 1;		/* allow 8-bit passthrough */
+			break;
 		case 'g':
 			gflag = 1;
 			break;
@@ -141,7 +144,7 @@
 static void
 usage(void)
 {
-	(void)fprintf(stderr, "usage: finger [-46lmpshoT] [login ...]\n");
+	fprintf(stderr, "usage: finger [-468lmpshoT] [login ...]\n");
 	exit(1);
 }
 
@@ -175,14 +178,14 @@
 		envargc = 2;
 		envargv[0] = myname;
 		envargv[2] = NULL;
-		(void) option(envargc, envargv);
+		option(envargc, envargv);
 	}
 
 	argcnt = option(argc, argv);
 	argc -= argcnt;
 	argv += argcnt;
 
-	(void)time(&now);
+	time(&now);
 	setpassent(1);
 	if (!*argv) {
 		/*
@@ -194,7 +197,7 @@
 			sflag = 1;	/* if -l not explicit, force -s */
 		loginlist();
 		if (entries == 0)
-			(void)printf("No one logged on.\n");
+			printf("No one logged on.\n");
 	} else {
 		userlist(argc, argv);
 		/*
@@ -316,7 +319,7 @@
 		    }
 		}
 	    }
-	    (void)fclose(conf_fp);
+	    fclose(conf_fp);
 	}
 
 	/*
Index: lprint.c
===================================================================
RCS file: /cvs/src/usr.bin/finger/lprint.c,v
retrieving revision 1.3
diff -u -r1.3 lprint.c
--- lprint.c	4 Oct 2003 20:36:44 -0000	1.3
+++ lprint.c	30 Aug 2004 18:00:03 -0000
@@ -84,12 +84,12 @@
 			putchar('\n');
 		lprint(pn);
 		if (!pplan) {
-			(void)show_text(pn->dir,
+			show_text(pn->dir,
 			    _PATH_FORWARD, "Mail forwarded to");
-			(void)show_text(pn->dir, _PATH_PROJECT, "Project");
+			show_text(pn->dir, _PATH_PROJECT, "Project");
 			if (!show_text(pn->dir, _PATH_PLAN, "Plan"))
 				(void)printf("No Plan.\n");
-			(void)show_text(pn->dir,
+			show_text(pn->dir,
 			    _PATH_PUBKEY, "Public key");
 		}
 	}
@@ -117,9 +117,9 @@
 	 *	office, office phone, home phone if available
 	 *	mail status
 	 */
-	(void)printf("Login: %-15s\t\t\tName: %s\nDirectory: %-25s",
+	printf("Login: %-15s\t\t\tName: %s\nDirectory: %-25s",
 	    pn->name, pn->realname, pn->dir);
-	(void)printf("\tShell: %-s\n", *pn->shell ? pn->shell : _PATH_BSHELL);
+	printf("\tShell: %-s\n", *pn->shell ? pn->shell : _PATH_BSHELL);
 
 	if (gflag)
 		goto no_gecos;
@@ -133,23 +133,23 @@
 	if (pn->office && pn->officephone &&
 	    strlen(pn->office) + strlen(pn->officephone) +
 	    sizeof(OFFICE_TAG) + 2 <= 5 * TAB_LEN) {
-		(void)snprintf(tbuf, sizeof(tbuf), "%s: %s, %s",
+		snprintf(tbuf, sizeof(tbuf), "%s: %s, %s",
 		    OFFICE_TAG, pn->office, prphone(pn->officephone));
 		oddfield = demi_print(tbuf, oddfield);
 	} else {
 		if (pn->office) {
-			(void)snprintf(tbuf, sizeof(tbuf), "%s: %s",
+			snprintf(tbuf, sizeof(tbuf), "%s: %s",
 			    OFFICE_TAG, pn->office);
 			oddfield = demi_print(tbuf, oddfield);
 		}
 		if (pn->officephone) {
-			(void)snprintf(tbuf, sizeof(tbuf), "%s: %s",
+			snprintf(tbuf, sizeof(tbuf), "%s: %s",
 			    OFFICE_PHONE_TAG, prphone(pn->officephone));
 			oddfield = demi_print(tbuf, oddfield);
 		}
 	}
 	if (pn->homephone) {
-		(void)snprintf(tbuf, sizeof(tbuf), "%s: %s", "Home Phone",
+		snprintf(tbuf, sizeof(tbuf), "%s: %s", "Home Phone",
 		    prphone(pn->homephone));
 		oddfield = demi_print(tbuf, oddfield);
 	}
@@ -277,13 +277,13 @@
 				putchar('\t');
 				lenlast += TAB_LEN;
 			}
-			(void)printf("\t%s\n", str);	/* force one tab */
+			printf("\t%s\n", str);	/* force one tab */
 		} else {
-			(void)printf("\n%s", str);	/* go to next line */
+			printf("\n%s", str);	/* go to next line */
 			oddfield = !oddfield;	/* this'll be undone below */
 		}
 	} else
-		(void)printf("%s", str);
+		printf("%s", str);
 	oddfield = !oddfield;			/* toggle odd/even marker */
 	lenlast = lenthis;
 	return(oddfield);
@@ -348,16 +348,16 @@
 	int meta;
 
 	if (!isprint(ch) && !isascii(ch)) {
-		(void)putchar('M');
-		(void)putchar('-');
+		putchar('M');
+		putchar('-');
 		ch = toascii(ch);
 		meta = 1;
 	} else
 		meta = 0;
-	if (isprint(ch) || (!meta && (ch == ' ' || ch == '\t' || ch == '\n')))
-		(void)putchar(ch);
+	if ( eightflag || isprint(ch) || (!meta && (ch == ' ' || ch == '\t' || ch == '\n')))
+		putchar(ch);
 	else {
-		(void)putchar('^');
-		(void)putchar(ch == '\177' ? '?' : ch | 0100);
+		putchar('^');
+		putchar(ch == '\177' ? '?' : ch | 0100);
 	}
 }
Index: net.c
===================================================================
RCS file: /cvs/src/usr.bin/finger/net.c,v
retrieving revision 1.4
diff -u -r1.4 net.c
--- net.c	16 Jul 2004 19:07:56 -0000	1.4
+++ net.c	30 Aug 2004 17:52:37 -0000
@@ -189,7 +189,7 @@
 				c = '\n';
 				lastc = '\r';
 			} else {
-				if (!isprint(c) && !isspace(c)) {
+				if (!(eightflag || isprint(c) || isspace(c))) {
 					c &= 0x7f;
 					c |= 0x40;
 				}
