+Wed Feb 24 20:05:40 1999 Tom Yu <tlyu@mit.edu>
+
+ * klogind.M: Resync manpage.
+
+ * krlogind.c: Rework flags for hostname logging.
+
Mon Feb 22 22:26:32 1999 Tom Yu <tlyu@mit.edu>
* kcmd.c (kcmd): Fix up to not call sname_to_principal until after
.SH SYNOPSIS
.B klogind
[
-.B \-kr54cpPesI
+.B \-kr54cpPe
]
[
-.B \-u
-.I utmp_hostname_length
-]
+[ \fB\-w\fP[\fBip\fP|\fImaxhostlen\fP[\fB,\fP[\fBno\fP]\fBstriplocal\fP]] ]
.SH DESCRIPTION
.I Klogind
is the server for the
.PP
.I Klogind
supports the following options to control the form of the hostname
-passed to the login program:
-
-.IP \fB-u\ utmp_hostname_length\fP
-Set the maximum length of hostname passed to login to
-\fIutmp_hostname_length\fP bytes, including terminating nul.
-
-.IP \fB-I\fP
-Always pass a numeric IP address to login.
-
-.IP \fB-s\fP
-Don't strip the local domain off hostnames.
+passed to login(1):
+
+.TP
+\fB\-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.
.PP
.I Klogind
krb5_keytab keytab = NULL;
-#define ARGSTR "k54ciepPD:S:M:L:fu:Is?"
+#define ARGSTR "k54ciepPD:S:M:L:fw:?"
#else /* !KERBEROS */
#define ARGSTR "rpPD:f?"
#endif /* KERBEROS */
case 'f':
do_fork = 1;
break;
- case 'u':
- maxhostlen = atoi(optarg);
- break;
- case 'I':
- always_ip = 1;
- break;
- case 's':
- stripdomain = 0;
+ 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();
+ exit(1);
+ }
+ *(--cp) = '\0';
+ maxhostlen = atoi(optarg);
+ }
+ }
break;
case '?':
default:
{
#ifdef KERBEROS
syslog(LOG_ERR,
- "usage: klogind [-ke45pPf] [-D port] or [r/R][k/K][x/e][p/P]logind");
+ "usage: klogind [-ke45pPf] [-D port] [-w[ip|maxhostlen[,[no]striplocal]]] or [r/R][k/K][x/e][p/P]logind");
#else
syslog(LOG_ERR,
"usage: rlogind [-rpPf] [-D port] or [r/R][p/P]logind");