diff --git a/libexec/fingerd/fingerd.8 b/libexec/fingerd/fingerd.8 index ad2c10f265ae..e66da367a46a 100644 --- a/libexec/fingerd/fingerd.8 +++ b/libexec/fingerd/fingerd.8 @@ -1,4 +1,4 @@ -.\" $NetBSD: fingerd.8,v 1.12 2002/01/15 02:19:50 wiz Exp $ +.\" $NetBSD: fingerd.8,v 1.13 2002/09/10 03:29:01 kim Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -50,6 +50,7 @@ .Op Fl S .Op Fl g .Op Fl P Ar filename +.Op Fl i .Sh DESCRIPTION .Nm is a simple protocol based on @@ -157,6 +158,8 @@ By specifying a customized local server, this option allows a system manager to have more control over what information is provided to remote sites. +.It Fl i +Enable 8-bit output. .El .Sh SEE ALSO .Xr finger 1 , diff --git a/libexec/fingerd/fingerd.c b/libexec/fingerd/fingerd.c index a47696f27d8f..e99b9a114209 100644 --- a/libexec/fingerd/fingerd.c +++ b/libexec/fingerd/fingerd.c @@ -1,4 +1,4 @@ -/* $NetBSD: fingerd.c,v 1.16 2002/07/08 23:01:57 itojun Exp $ */ +/* $NetBSD: fingerd.c,v 1.17 2002/09/10 03:29:02 kim Exp $ */ /* * Copyright (c) 1983, 1993 @@ -44,7 +44,7 @@ __COPYRIGHT( #if 0 static char sccsid[] = "from: @(#)fingerd.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: fingerd.c,v 1.16 2002/07/08 23:01:57 itojun Exp $"); +__RCSID("$NetBSD: fingerd.c,v 1.17 2002/09/10 03:29:02 kim Exp $"); #endif #endif /* not lint */ @@ -84,7 +84,7 @@ main(argc, argv) logging = no_forward = user_required = short_list = 0; openlog("fingerd", LOG_PID, LOG_DAEMON); opterr = 0; - while ((ch = getopt(argc, argv, "gsluShmpP:")) != -1) + while ((ch = getopt(argc, argv, "gsluShmpP:i")) != -1) switch (ch) { case 'l': logging = 1; @@ -98,6 +98,18 @@ main(argc, argv) case 'u': user_required = 1; break; + case 'i': + /* + * This is a hack to enable single-byte 8-bit + * characters in the output of the default + * finger program. The character set is not + * communicated to the network client, and the + * exact value does not matter much as long + * as it enables as many 8-bit characters as + * possible. + */ + (void) putenv("LC_CTYPE=en_US.ISO8859-15"); + break; case 'S': short_list = 1; av[ac++] = "-s";