From fa19a6cf9a3ad83df97b908672d61f529058cb92 Mon Sep 17 00:00:00 2001 From: Mark Eichin Date: Fri, 21 Apr 1995 16:49:00 +0000 Subject: [PATCH] From Ian Taylor . * telnetd.c (valid_opts): Add 'L'. If KRB5, add -R and -t. (main): Handle -L. If KRB5, handle -R and -t. * sys_term.c (login_program): New global variable. (start_login): Use login_program instead of LOGIN_PROGRAM. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5426 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/telnet/telnetd/ChangeLog | 8 ++++++++ src/appl/telnet/telnetd/sys_term.c | 8 +++++--- src/appl/telnet/telnetd/telnetd.c | 33 +++++++++++++++++++++++++++++- 3 files changed, 45 insertions(+), 4 deletions(-) diff --git a/src/appl/telnet/telnetd/ChangeLog b/src/appl/telnet/telnetd/ChangeLog index b35902ee9..cb49fd2f2 100644 --- a/src/appl/telnet/telnetd/ChangeLog +++ b/src/appl/telnet/telnetd/ChangeLog @@ -1,3 +1,11 @@ +Fri Apr 21 12:47:57 1995 Mark Eichin + + From Ian Taylor . + * telnetd.c (valid_opts): Add 'L'. If KRB5, add -R and -t. + (main): Handle -L. If KRB5, handle -R and -t. + * sys_term.c (login_program): New global variable. + (start_login): Use login_program instead of LOGIN_PROGRAM. + Wed Mar 29 15:39:39 1995 Theodore Y. Ts'o (tytso@dcl) * Makefile.in: Add dependency on libtelnet.a diff --git a/src/appl/telnet/telnetd/sys_term.c b/src/appl/telnet/telnetd/sys_term.c index 7fa67ff48..efd898883 100644 --- a/src/appl/telnet/telnetd/sys_term.c +++ b/src/appl/telnet/telnetd/sys_term.c @@ -48,6 +48,8 @@ #include "k5-int.h" #endif +char *login_program = LOGIN_PROGRAM; + #if defined(CRAY) || defined(__hpux) # define PARENT_DOES_UTMP #endif @@ -1711,10 +1713,10 @@ start_login(host, autologin, name) close(pty); #endif closelog(); - execv(LOGIN_PROGRAM, argv); + execv(login_program, argv); - syslog(LOG_ERR, "%s: %m\n", LOGIN_PROGRAM); - fatalperror(net, LOGIN_PROGRAM); + syslog(LOG_ERR, "%s: %m\n", login_program); + fatalperror(net, login_program); /*NOTREACHED*/ } diff --git a/src/appl/telnet/telnetd/telnetd.c b/src/appl/telnet/telnetd/telnetd.c index 0afe22eaf..8dbdaef3a 100644 --- a/src/appl/telnet/telnetd/telnetd.c +++ b/src/appl/telnet/telnetd/telnetd.c @@ -131,7 +131,7 @@ extern void usage P((void)); * passed off to getopt(). */ char valid_opts[] = { - 'd', ':', 'h', 'k', 'n', 'S', ':', 'u', ':', 'U', + 'd', ':', 'h', 'k', 'L', ':', 'n', 'S', ':', 'u', ':', 'U', #ifdef AUTHENTICATION 'a', ':', 'X', ':', #endif @@ -155,6 +155,9 @@ char valid_opts[] = { #endif #ifdef SecurID 's', +#endif +#ifdef KRB5 + 'R', ':', 't', ':', #endif '\0' }; @@ -296,6 +299,14 @@ main(argc, argv) #endif /* defined(LINEMODE) && defined(KLUDGELINEMODE) */ break; + case 'L': + { + extern char *login_program; + + login_program = optarg; + break; + } + case 'n': keepalive = 0; break; @@ -328,6 +339,16 @@ main(argc, argv) } #endif /* CRAY */ +#ifdef KRB5 + case 'R': + { + extern char *krb5_override_default_realm; + + krb5_override_default_realm = optarg; + break; + } +#endif /* KRB5 */ + #ifdef SecurID case 's': /* SecurID required */ @@ -346,6 +367,16 @@ main(argc, argv) #endif break; +#ifdef KRB5 + case 't': + { + extern char *telnet_srvtab; + + telnet_srvtab = optarg; + break; + } +#endif /* KRB5 */ + case 'u': utmp_len = atoi(optarg); break; -- 2.26.2