Add a switch for easy enabling of single-byte 8-bit output.
This is somewhat of a hack, but I find it better than having to run env(1) from inetd(8), or changing the environment for inetd(8) itself (and thus all daemons started by it).
This commit is contained in:
parent
dfb75c5ad4
commit
5d2f386289
@ -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 ,
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user