From: Richard Basch Date: Fri, 12 Apr 1996 01:51:34 +0000 (+0000) Subject: Call a krb5 cleanup routine to cleanup forwarded credentials, if necessary X-Git-Tag: krb5-1.0-beta6~218 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=effb3cff956d9f66b28c1241bde054263206cbce;p=krb5.git Call a krb5 cleanup routine to cleanup forwarded credentials, if necessary git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7798 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/telnet/telnetd/ChangeLog b/src/appl/telnet/telnetd/ChangeLog index 53b881b09..2c66434f8 100644 --- a/src/appl/telnet/telnetd/ChangeLog +++ b/src/appl/telnet/telnetd/ChangeLog @@ -1,3 +1,7 @@ +Thu Apr 11 21:44:39 1996 Richard Basch + + * sys_term.c (cleanup): Call the Kerberos 5 cleanup routine, also. + Wed Mar 27 00:27:32 1996 Tom Yu * telnetd.c: remove inclusion of netdb.h; it's already in defs.h, diff --git a/src/appl/telnet/telnetd/ext.h b/src/appl/telnet/telnetd/ext.h index 53d90698d..2f577da49 100644 --- a/src/appl/telnet/telnetd/ext.h +++ b/src/appl/telnet/telnetd/ext.h @@ -225,7 +225,11 @@ extern int needtermstat; # define DEFAULT_IM "\r\n\r\nCray UNICOS (%h) (%t)\r\n\r\r\n\r" # else # ifdef sun -# define DEFAULT_IM "\r\n\r\nSunOS UNIX (%h) (%t)\r\n\r\r\n\r" +# ifdef __SVR4 +# define DEFAULT_IM "\r\n\r\nUNIX(r) System V Release 4.0 (%h) (%t)\r\n\r\r\n\r" +# else +# define DEFAULT_IM "\r\n\r\nSunOS UNIX (%h) (%t)\r\n\r\r\n\r" +# endif # else # ifdef ultrix # define DEFAULT_IM "\r\n\r\nULTRIX (%h) (%t)\r\n\r\r\n\r" diff --git a/src/appl/telnet/telnetd/sys_term.c b/src/appl/telnet/telnetd/sys_term.c index e6d9786d1..ac76cd864 100644 --- a/src/appl/telnet/telnetd/sys_term.c +++ b/src/appl/telnet/telnetd/sys_term.c @@ -1090,7 +1090,7 @@ startslave(host, autologin, autoname) int autologin; char *autoname; { -int syncpipe[2]; + int syncpipe[2]; register int i; #ifdef NEWINIT extern char *ptyip; @@ -1099,8 +1099,8 @@ int syncpipe[2]; register int n; #endif /* NEWINIT */ -if ( pipe(syncpipe) < 0 ) - fatal(net, "failed getting synchronization pipe"); + if ( pipe(syncpipe) < 0 ) + fatal(net, "failed getting synchronization pipe"); #if defined(AUTHENTICATION) if (!autoname || !autoname[0]) @@ -1117,31 +1117,30 @@ if ( pipe(syncpipe) < 0 ) if ((i = fork()) < 0) fatalperror(net, "fork"); if (i) { -char c; + char c; void sigjob P((int)); -slavepid = i; /* So we can clean it up later */ + slavepid = i; /* So we can clean it up later */ #ifdef CRAY (void) signal(WJSIGNAL, sigjob); #endif /* Wait for child before writing to parent side of pty.*/ -(void) close(syncpipe[1]); -if ( read(syncpipe[0], &c, 1) == 0 ) { - /* Slave side died */ - fatal ( net, "Slave failed to initialize"); -} + (void) close(syncpipe[1]); + if ( read(syncpipe[0], &c, 1) == 0 ) { + /* Slave side died */ + fatal ( net, "Slave failed to initialize"); + } close(syncpipe[0]); - - } else { + } else { pty_update_utmp (PTY_LOGIN_PROCESS, getpid(), "LOGIN", line, host, PTY_TTYSLOT_USABLE); getptyslave(autologin); -/* Notify our parent we're ready to continue.*/ + /* Notify our parent we're ready to continue.*/ write(syncpipe[1],"y",1); close(syncpipe[0]); close(syncpipe[1]); @@ -1474,7 +1473,10 @@ addarg(argv, val) cleanup(sig) int sig; { - pty_cleanup(line,slavepid,1); + pty_cleanup(line,slavepid,1); +#ifdef KRB5 + kerberos5_cleanup(); +#endif (void) shutdown(net, 2); exit(1);