[\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
.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
.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
.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
*/
char valid_opts[] = {
'd', ':', 'h', 'k', 'L', ':', 'n', 'S', ':', 'U',
- 'u', ':', 'i', 'N',
+ 'w',
#ifdef AUTHENTICATION
'a', ':', 'X', ':',
#endif
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;
#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);
}