From: Tom Yu Date: Thu, 25 Feb 1999 01:06:42 +0000 (+0000) Subject: * klogind.M: Resync manpage X-Git-Tag: krb5-1.1-beta1~325 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e14582b474ac0df3121ff61bbaea17bbd97392ce;p=krb5.git * klogind.M: Resync manpage * krlogind.c: Rework flags for hostname logging. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11220 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 99b1ca0c5..a2ea0c6cb 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,9 @@ +Wed Feb 24 20:05:40 1999 Tom Yu + + * klogind.M: Resync manpage. + + * krlogind.c: Rework flags for hostname logging. + Mon Feb 22 22:26:32 1999 Tom Yu * kcmd.c (kcmd): Fix up to not call sname_to_principal until after diff --git a/src/appl/bsd/klogind.M b/src/appl/bsd/klogind.M index 10211b38e..0f1f302d1 100644 --- a/src/appl/bsd/klogind.M +++ b/src/appl/bsd/klogind.M @@ -10,12 +10,10 @@ klogind \- remote login server .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 @@ -134,17 +132,20 @@ size changes from the client are propagated to the pseudo terminal. .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 diff --git a/src/appl/bsd/krlogind.c b/src/appl/bsd/krlogind.c index b57b5a746..e37b84cc8 100644 --- a/src/appl/bsd/krlogind.c +++ b/src/appl/bsd/krlogind.c @@ -260,7 +260,7 @@ krb5_ccache ccache = NULL; 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 */ @@ -441,14 +441,27 @@ int main(argc, argv) 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: @@ -1301,7 +1314,7 @@ void usage() { #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");