# 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"
int autologin;
char *autoname;
{
-int syncpipe[2];
+ int syncpipe[2];
register int i;
#ifdef NEWINIT
extern char *ptyip;
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])
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]);
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);