Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/fingerd Add a switch for easy enabling of single-byt...
details: https://anonhg.NetBSD.org/src/rev/d886e7a87c8c
branches: trunk
changeset: 536165:d886e7a87c8c
user: kim <kim%NetBSD.org@localhost>
date: Tue Sep 10 03:29:01 2002 +0000
description:
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).
diffstat:
libexec/fingerd/fingerd.8 | 5 ++++-
libexec/fingerd/fingerd.c | 18 +++++++++++++++---
2 files changed, 19 insertions(+), 4 deletions(-)
diffs (72 lines):
diff -r 7224eb719969 -r d886e7a87c8c libexec/fingerd/fingerd.8
--- a/libexec/fingerd/fingerd.8 Tue Sep 10 03:02:40 2002 +0000
+++ b/libexec/fingerd/fingerd.8 Tue Sep 10 03:29:01 2002 +0000
@@ -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 @@
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 -r 7224eb719969 -r d886e7a87c8c libexec/fingerd/fingerd.c
--- a/libexec/fingerd/fingerd.c Tue Sep 10 03:02:40 2002 +0000
+++ b/libexec/fingerd/fingerd.c Tue Sep 10 03:29:01 2002 +0000
@@ -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 @@
#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 @@
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 @@
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";
Home |
Main Index |
Thread Index |
Old Index