From: Tom Yu Date: Thu, 25 Feb 1999 01:12:46 +0000 (+0000) Subject: * telnetd.8: Resync manpage X-Git-Tag: krb5-1.1-beta1~324 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3d9e095875801aefc498453284ab8f8b478cfca2;p=krb5.git * telnetd.8: Resync manpage * telnetd.c: Rework flags controlling hostname logging. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11222 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/telnet/telnetd/ChangeLog b/src/appl/telnet/telnetd/ChangeLog index 446a99796..8ee29579f 100644 --- a/src/appl/telnet/telnetd/ChangeLog +++ b/src/appl/telnet/telnetd/ChangeLog @@ -1,3 +1,9 @@ +Wed Feb 24 20:12:10 1999 Tom Yu + + * telnetd.8: Resync manpage. + + * telnetd.c: Rework flags controlling hostname logging. + Mon Feb 22 18:27:38 1999 Tom Yu * telnetd.8: Document hostname logging changes. diff --git a/src/appl/telnet/telnetd/telnetd.8 b/src/appl/telnet/telnetd/telnetd.8 index 93c64ac30..7c9210625 100644 --- a/src/appl/telnet/telnetd/telnetd.8 +++ b/src/appl/telnet/telnetd/telnetd.8 @@ -42,7 +42,7 @@ protocol server [\fB\-edebug\fP] [\fB\-h\fP] [\fB\-I\fP\fIinitid\fP] [\fB\-l\fP] [\fB\-k\fP] [\fB\-n\fP] [\fB\-r\fP\fIlowpty-highpty\fP] [\fB\-s\fP] [\fB\-S\fP \fItos\fP] [\fB\-U\fP] [\fB\-X\fP \fIauthtype\fP] -[\fB\-u\fImaxhostlen\fP] [\fB\-i\fP] [\fB\-N\fP] +[\fB\-w\fP [\fBip\fP|\fImaxhostlen\fP[\fB,\fP[\fBno\fP]\fBstriplocal\fP]]] [\fB\-debug\fP [\fIport\fP]] .SH DESCRIPTION The @@ -197,9 +197,6 @@ to use when init starts login sessions. The default .SM ID is fe. .TP -.B \-i -Cuases the IP address to be unconditionally passed to login(8). -.TP .B \-k This option is only useful if .B telnetd @@ -231,9 +228,6 @@ mode. If the .SM LINEMODE option is not supported, it will go into kludge linemode. .TP -.B \-N -Don't strip the local domain name for passing to login(1). -.TP .B \-n Disable .SM TCP @@ -293,9 +287,17 @@ symbolic name via the .IR gethostbyaddr (3) routine. .TP -.B \-u -.I maxhostlen -Sets the maximum hostname length passed to login(1). +.B \-w \fP[\fBip\fP|\fImaxhostlen\fP[\fB,\fP[\fBno\fP]\fBstriplocal\fP]] +Controls the form of the remote hostname passed to login(1). +Specifying \fBip\fP results in the numeric IP address always being +passed to login(1). Specifying a number, \fImaxhostlen\fP, sets the +maximum length of the hostname passed to login(1) before it will be +passed as a numeric IP address. If \fImaxhostlen\fP is 0, then the +system default, as determined by the utmp or utmpx structures, is +used. The \fBnostriplocal\fP and \fBstriplocal\fP options, which must +be preceded by a comma, control whether or not the local host domain +is stripped from the remote hostname. By default, the equivalent of +\fBstriplocal\fP is in effect. .TP \fB\-X\fP \fIauthtype\fP This option is only valid if diff --git a/src/appl/telnet/telnetd/telnetd.c b/src/appl/telnet/telnetd/telnetd.c index f3ac95595..3c63d5c18 100644 --- a/src/appl/telnet/telnetd/telnetd.c +++ b/src/appl/telnet/telnetd/telnetd.c @@ -153,7 +153,7 @@ extern void usage P((void)); */ char valid_opts[] = { 'd', ':', 'h', 'k', 'L', ':', 'n', 'S', ':', 'U', - 'u', ':', 'i', 'N', + 'w', #ifdef AUTHENTICATION 'a', ':', 'X', ':', #endif @@ -443,6 +443,27 @@ main(argc, argv) auth_disable_name(optarg); break; #endif /* AUTHENTICATION */ + case 'w': + if (!strcmp(optarg, "ip")) + always_ip = 1; + else { + char *cp; + cp = strchr(optarg, ','); + if (cp == NULL) + maxhostlen = atoi(optarg); + else if (*(++cp)) { + if (!strcmp(cp, "striplocal")) + stripdomain = 1; + else if (!strcmp(cp, "nostriplocal")) + stripdomain = 0; + else { + usage(); + } + *(--cp) = '\0'; + maxhostlen = atoi(optarg); + } + } + break; case 'u': maxhostlen = atoi(optarg); break; @@ -661,7 +682,8 @@ usage() #ifdef AUTHENTICATION fprintf(stderr, " [-X auth-type]"); #endif - fprintf(stderr, " [-u utmp_hostname_length] [-U]"); + fprintf(stderr, " [-u utmp_hostname_length] [-U]\n"); + fprintf(stderr, " [-w [ip|maxhostlen[,[no]striplocal]]]\n"); fprintf(stderr, " [port]\n"); exit(1); }