*** empty log message ***
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@231 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -39,7 +39,7 @@
|
|||||||
#include <bsdsetjmp.h>
|
#include <bsdsetjmp.h>
|
||||||
#endif
|
#endif
|
||||||
/* not with SunOS 4 */
|
/* not with SunOS 4 */
|
||||||
#if defined(HAVE_SYS_IOCTL_H) && (defined(sun) && !defined(__svr4__))
|
#if defined(HAVE_SYS_IOCTL_H) && !(defined(sun) && !defined(__svr4__))
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SYS_FILIO_H
|
#ifdef HAVE_SYS_FILIO_H
|
||||||
|
@@ -86,7 +86,7 @@ extern int unpcc; /* characters left unprocessed by CRAY-2 terminal routine */
|
|||||||
extern char *unptyip; /* pointer to remaining characters in buffer */
|
extern char *unptyip; /* pointer to remaining characters in buffer */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int pty, net;
|
extern int ourpty, net;
|
||||||
extern char *line;
|
extern char *line;
|
||||||
extern int SYNCHing; /* we are in TELNET SYNCH mode */
|
extern int SYNCHing; /* we are in TELNET SYNCH mode */
|
||||||
|
|
||||||
|
@@ -91,7 +91,7 @@ int unpcc; /* characters left unprocessed by CRAY-2 terminal routine */
|
|||||||
char *unptyip; /* pointer to remaining characters in buffer */
|
char *unptyip; /* pointer to remaining characters in buffer */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int pty, net;
|
int ourpty, net;
|
||||||
int SYNCHing; /* we are in TELNET SYNCH mode */
|
int SYNCHing; /* we are in TELNET SYNCH mode */
|
||||||
|
|
||||||
#ifndef P
|
#ifndef P
|
||||||
|
@@ -94,6 +94,9 @@ extern struct sysv sysv;
|
|||||||
#define SCPYN(a, b) (void) strncpy(a, b, sizeof(a))
|
#define SCPYN(a, b) (void) strncpy(a, b, sizeof(a))
|
||||||
#define SCMPN(a, b) strncmp(a, b, sizeof(a))
|
#define SCMPN(a, b) strncmp(a, b, sizeof(a))
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_UIO_H
|
||||||
|
#include <sys/uio.h>
|
||||||
|
#endif
|
||||||
#ifdef HAVE_SYS_STREAM_H
|
#ifdef HAVE_SYS_STREAM_H
|
||||||
#include <sys/stream.h>
|
#include <sys/stream.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -181,7 +184,7 @@ init_termbuf()
|
|||||||
# ifdef STREAMSPTY
|
# ifdef STREAMSPTY
|
||||||
(void) tcgetattr(ttyfd, &termbuf);
|
(void) tcgetattr(ttyfd, &termbuf);
|
||||||
# else
|
# else
|
||||||
(void) tcgetattr(pty, &termbuf);
|
(void) tcgetattr(ourpty, &termbuf);
|
||||||
# endif
|
# endif
|
||||||
termbuf2 = termbuf;
|
termbuf2 = termbuf;
|
||||||
}
|
}
|
||||||
@@ -209,7 +212,7 @@ set_termbuf()
|
|||||||
# ifdef STREAMSPTY
|
# ifdef STREAMSPTY
|
||||||
(void) tcsetattr(ttyfd, TCSANOW, &termbuf);
|
(void) tcsetattr(ttyfd, TCSANOW, &termbuf);
|
||||||
# else
|
# else
|
||||||
(void) tcsetattr(pty, TCSANOW, &termbuf);
|
(void) tcsetattr(ourpty, TCSANOW, &termbuf);
|
||||||
# endif
|
# endif
|
||||||
# if defined(CRAY2) && defined(UNICOS5)
|
# if defined(CRAY2) && defined(UNICOS5)
|
||||||
needtermstat = 1;
|
needtermstat = 1;
|
||||||
@@ -543,7 +546,7 @@ tty_setlinemode(on)
|
|||||||
# else
|
# else
|
||||||
linestate = on;
|
linestate = on;
|
||||||
# endif
|
# endif
|
||||||
(void) ioctl(pty, TIOCEXT, (char *)&on);
|
(void) ioctl(ourpty, TIOCEXT, (char *)&on);
|
||||||
# ifndef convex
|
# ifndef convex
|
||||||
init_termbuf();
|
init_termbuf();
|
||||||
# endif
|
# endif
|
||||||
@@ -978,7 +981,7 @@ int getptyslave(void)
|
|||||||
char *ptymodules[] = { "pckt", NULL };
|
char *ptymodules[] = { "pckt", NULL };
|
||||||
|
|
||||||
maybe_push_modules(t, ttymodules);
|
maybe_push_modules(t, ttymodules);
|
||||||
maybe_push_modules(pty, ptymodules);
|
maybe_push_modules(ourpty, ptymodules);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
@@ -1044,9 +1047,9 @@ int getptyslave(void)
|
|||||||
* protocol for /bin/login, if the authentication works.
|
* protocol for /bin/login, if the authentication works.
|
||||||
*/
|
*/
|
||||||
#else
|
#else
|
||||||
if (pty > 2) {
|
if (ourpty > 2) {
|
||||||
(void) close(pty);
|
(void) close(ourpty);
|
||||||
pty = -1;
|
ourpty = -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -1351,7 +1354,7 @@ startslave(host, autologin, autoname)
|
|||||||
for (i = 0; ; i++) {
|
for (i = 0; ; i++) {
|
||||||
char tbuf[128];
|
char tbuf[128];
|
||||||
alarm(15);
|
alarm(15);
|
||||||
n = read(pty, ptyip, BUFSIZ);
|
n = read(ourpty, ptyip, BUFSIZ);
|
||||||
if (i == 3 || n >= 0 || !gotalarm)
|
if (i == 3 || n >= 0 || !gotalarm)
|
||||||
break;
|
break;
|
||||||
gotalarm = 0;
|
gotalarm = 0;
|
||||||
@@ -1547,7 +1550,7 @@ void start_login(char *host, int autologin, char *name)
|
|||||||
* local-user\0remote-user\0term/speed\0
|
* local-user\0remote-user\0term/speed\0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (pty > 2) {
|
if (ourpty > 2) {
|
||||||
register char *cp;
|
register char *cp;
|
||||||
char speed[128];
|
char speed[128];
|
||||||
int isecho, israw, xpty, len;
|
int isecho, israw, xpty, len;
|
||||||
@@ -1569,7 +1572,7 @@ void start_login(char *host, int autologin, char *name)
|
|||||||
addarg(&argv, "-r");
|
addarg(&argv, "-r");
|
||||||
addarg(&argv, LOGIN_HOST);
|
addarg(&argv, LOGIN_HOST);
|
||||||
|
|
||||||
xpty = pty;
|
xpty = ourpty;
|
||||||
# ifndef STREAMSPTY
|
# ifndef STREAMSPTY
|
||||||
pty = 0;
|
pty = 0;
|
||||||
# else
|
# else
|
||||||
@@ -1605,7 +1608,7 @@ void start_login(char *host, int autologin, char *name)
|
|||||||
write(xpty, "\n", 1);
|
write(xpty, "\n", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pty = xpty;
|
ourpty = xpty;
|
||||||
}
|
}
|
||||||
# else /* LOGIN_R */
|
# else /* LOGIN_R */
|
||||||
addarg(&argv, name);
|
addarg(&argv, name);
|
||||||
@@ -1636,8 +1639,8 @@ void start_login(char *host, int autologin, char *name)
|
|||||||
unsetenv("USER");
|
unsetenv("USER");
|
||||||
}
|
}
|
||||||
#if defined(AUTHENTICATION) && defined(NO_LOGIN_F) && defined(LOGIN_R)
|
#if defined(AUTHENTICATION) && defined(NO_LOGIN_F) && defined(LOGIN_R)
|
||||||
if (pty > 2)
|
if (ourpty > 2)
|
||||||
close(pty);
|
close(ourpty);
|
||||||
#endif
|
#endif
|
||||||
closelog();
|
closelog();
|
||||||
/*
|
/*
|
||||||
@@ -1770,7 +1773,7 @@ cleanup(sig)
|
|||||||
setutent(); /* just to make sure */
|
setutent(); /* just to make sure */
|
||||||
# endif /* CRAY */
|
# endif /* CRAY */
|
||||||
rmut(line);
|
rmut(line);
|
||||||
close(pty);
|
close(ourpty);
|
||||||
(void) shutdown(net, 2);
|
(void) shutdown(net, 2);
|
||||||
# ifdef CRAY
|
# ifdef CRAY
|
||||||
if (t == 0)
|
if (t == 0)
|
||||||
|
Reference in New Issue
Block a user