diff -rc getty_ps-2.0.7e/Makefile getty_ps-2.0.7e-jpm/Makefile *** getty_ps-2.0.7e/Makefile Fri May 20 06:48:35 1994 --- getty_ps-2.0.7e-jpm/Makefile Fri Sep 2 08:41:34 1994 *************** *** 14,20 **** CC= gcc CFLAGS= -O2 -fpcc-struct-return ${FSSTND} ! LFLAGS= -s LIBS= -ltermcap LLIBS= --- 14,20 ---- CC= gcc CFLAGS= -O2 -fpcc-struct-return ${FSSTND} ! LFLAGS= -s -Xlinker -qmagic LIBS= -ltermcap LLIBS= diff -rc getty_ps-2.0.7e/config.h getty_ps-2.0.7e-jpm/config.h *** getty_ps-2.0.7e/config.h Fri May 20 06:40:06 1994 --- getty_ps-2.0.7e-jpm/config.h Thu Sep 1 18:07:41 1994 *************** *** 50,56 **** #define ASCIIPID /* PID stored in ASCII */ #define BOTHPID /* ... or perhaps not */ ! #define UUCPID 11 /* uid of UUCP account */ #ifndef FSSTND #define LOCK "/usr/spool/uucp/LCK..%s" /* lock file name */ #else --- 50,56 ---- #define ASCIIPID /* PID stored in ASCII */ #define BOTHPID /* ... or perhaps not */ ! #define UUCPID "uucp" /* name of UUCP account */ #ifndef FSSTND #define LOCK "/usr/spool/uucp/LCK..%s" /* lock file name */ #else diff -rc getty_ps-2.0.7e/extern.h getty_ps-2.0.7e-jpm/extern.h *** getty_ps-2.0.7e/extern.h Tue May 17 00:38:52 1994 --- getty_ps-2.0.7e-jpm/extern.h Thu Sep 1 18:29:34 1994 *************** *** 38,49 **** /* Global variables */ - #ifdef MAIN EXTERN char MsgBuf[80]; /* message buffer */ - #else - EXTERN char MsgBuf[]; - #endif /* MAIN */ - EXTERN boolean AutoBaud; /* autobauding requested? */ EXTERN char AutoRate[16]; /* AutoBaud digits buffer */ EXTERN boolean Check; /* check a gettytab file? */ --- 38,44 ---- diff -rc getty_ps-2.0.7e/funcs.c getty_ps-2.0.7e-jpm/funcs.c *** getty_ps-2.0.7e/funcs.c Tue May 17 04:33:36 1994 --- getty_ps-2.0.7e-jpm/funcs.c Thu Sep 1 18:17:26 1994 *************** *** 70,76 **** char c, n, tbuf[16], ubuf[32]; time_t clock; struct tm *lt, *localtime(); ! char *month_name[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; --- 70,76 ---- char c, n, tbuf[16], ubuf[32]; time_t clock; struct tm *lt, *localtime(); ! static char *month_name[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; *************** *** 465,471 **** /* look for escape chars in expected word */ ! for (p = word; (ch = (*s++ & 0177));) { if (ch == '\\') { if (*s == 'A') { /* spot for AutoBaud digits */ *p++ = AUTOBD; --- 465,471 ---- /* look for escape chars in expected word */ ! for (p = word; (ch = (*s++ & 0177)) && p<&word[MAXLINE+1];) { if (ch == '\\') { if (*s == 'A') { /* spot for AutoBaud digits */ *p++ = AUTOBD; *************** *** 495,506 **** oldalarm = signal(SIGALRM, expalarm); (void) alarm((unsigned) expfail); ! sprintf(MsgBuf, "EXPECT: <%d> (%s), GOT: ", expfail, dprint(word)); p = buf; while ((ch = getc(stdin)) != EOF) { sprintf(MsgBuf + strlen(MsgBuf), ch < ' ' ? "^%c" : "%c", ch < ' ' ? ch | 0100 : ch); *p++ = (char) ((int) ch & 0177); *p = '\0'; if (strlen(buf) >= strlen(word)) { --- 495,518 ---- oldalarm = signal(SIGALRM, expalarm); (void) alarm((unsigned) expfail); ! debug(D_INIT, "EXPECT: <%d> (%s)", expfail, dprint(word)); + MsgBuf[0] = '\0'; p = buf; while ((ch = getc(stdin)) != EOF) { + /* check if we have enough room for Msg */ + if (strlen(MsgBuf)>sizeof(MsgBuf)-3) { + debug(D_INIT, "GOT: %s", MsgBuf); + MsgBuf[0] = '\0'; + } sprintf(MsgBuf + strlen(MsgBuf), ch < ' ' ? "^%c" : "%c", ch < ' ' ? ch | 0100 : ch); + /* check if we have enough room */ + if (p==&buf[MAXBUF]) { + /* oops, move back HALF the buffer */ + p = &buf[MAXBUF/2]; + strcpy(buf,p); + } *p++ = (char) ((int) ch & 0177); *p = '\0'; if (strlen(buf) >= strlen(word)) { *************** *** 515,521 **** } (void) alarm((unsigned) 0); (void) signal(SIGALRM, oldalarm); ! debug(D_INIT, "%s -- %s", MsgBuf, (retval == SUCCESS) ? "got it" : "Failed"); return(retval); } --- 527,533 ---- } (void) alarm((unsigned) 0); (void) signal(SIGALRM, oldalarm); ! debug(D_INIT, "GOT: %s -- %s", MsgBuf, (retval == SUCCESS) ? "got it" : "Failed"); return(retval); } *************** *** 647,653 **** } if (ch == Erase) { if (count) { ! (void) fputs((Erase == '\010' ? " \b" : "\b \b"), stdout); (void) fflush(stdout); --p; --- 659,665 ---- } if (ch == Erase) { if (count) { ! (void) fputs((Erase == '\b' ? " \b" : "\b \b"), stdout); (void) fflush(stdout); --p; Only in getty_ps-2.0.7e: getty diff -rc getty_ps-2.0.7e/main.c getty_ps-2.0.7e-jpm/main.c *** getty_ps-2.0.7e/main.c Fri May 20 05:29:37 1994 --- getty_ps-2.0.7e-jpm/main.c Fri Sep 2 10:10:18 1994 *************** *** 900,906 **** Speed = speedtab[i].speed; #ifdef ISSUE ! if (clear && *clrscr) { (void) tputs(clrscr, 1, tputc); } fputc('\r', stdout); --- 900,906 ---- Speed = speedtab[i].speed; #ifdef ISSUE ! if (clear && clrscr && *clrscr) { (void) tputs(clrscr, 1, tputc); } fputc('\r', stdout); *************** *** 918,925 **** login_prompt: (void) ioctl(STDIN, TCFLSH, 0); #ifdef FIDO ! if (emsi && (strcmp(emsi,"yes") == 0)) ! (void) Fputs("**EMSI_REQA77E\r", stdout); #endif (void) Fputs(gtab->login, stdout); if(TimeOut > 0) { --- 918,925 ---- login_prompt: (void) ioctl(STDIN, TCFLSH, 0); #ifdef FIDO ! if (emsi && (strcmp(emsi,"yes") == 0)) ! (void) Fputs("**EMSI_REQA77E\r", stdout); #endif (void) Fputs(gtab->login, stdout); if(TimeOut > 0) { diff -rc getty_ps-2.0.7e/main.h getty_ps-2.0.7e-jpm/main.h *** getty_ps-2.0.7e/main.h Tue May 17 00:39:21 1994 --- getty_ps-2.0.7e-jpm/main.h Thu Sep 1 18:19:53 1994 *************** *** 19,24 **** --- 19,25 ---- #include #include #include + #include #ifdef PWD #include *************** *** 98,106 **** EXTERN boolean waitchar; /* TRUE, wait for a character */ EXTERN unsigned int delay; /* seconds to delay before the prompt */ EXTERN GTAB *gtab; /* terminal mode */ ! EXTERN char devname[MAXLINE + 1]; /* name of tty device */ ! EXTERN char initdevname[MAXLINE + 1]; /* name of init device */ #ifdef ISSUE --- 99,107 ---- EXTERN boolean waitchar; /* TRUE, wait for a character */ EXTERN unsigned int delay; /* seconds to delay before the prompt */ EXTERN GTAB *gtab; /* terminal mode */ ! EXTERN char devname[PATH_MAX + 1]; /* name of tty device */ ! EXTERN char initdevname[PATH_MAX + 1]; /* name of init device */ #ifdef ISSUE diff -rc getty_ps-2.0.7e/tune.h getty_ps-2.0.7e-jpm/tune.h *** getty_ps-2.0.7e/tune.h Fri May 20 06:03:38 1994 --- getty_ps-2.0.7e-jpm/tune.h Fri Sep 2 10:01:18 1994 *************** *** 53,62 **** /* Where to find things */ - #define CONSOLE "/usr/adm/getty.log" /* error log if not using syslog */ #ifndef FSSTND #define DEFAULTS "/etc/default/%s" /* name of defaults file */ #else #define DEFAULTS "/etc/conf.%s" /* FSSTND compliant defaults file */ #endif #define ISSUE "/etc/issue" /* name of the issue file; --- 53,63 ---- /* Where to find things */ #ifndef FSSTND + #define CONSOLE "/usr/adm/getty.log" /* error log if not using syslog */ #define DEFAULTS "/etc/default/%s" /* name of defaults file */ #else + #define CONSOLE "/var/adm/getty.log" /* error log if not using syslog */ #define DEFAULTS "/etc/conf.%s" /* FSSTND compliant defaults file */ #endif #define ISSUE "/etc/issue" /* name of the issue file; *************** *** 77,83 **** */ #define MAXDEF 100 /* max # lines in defaults file */ ! #define MAXLINE 8192 /* max # chars in a line */ #define MAXID 12 /* max # chars in Gtab Id */ #define MAXLOGIN 80 /* max # chars in Gtab Login */ --- 78,84 ---- */ #define MAXDEF 100 /* max # lines in defaults file */ ! #define MAXLINE 1024 /* max # chars in a line */ #define MAXID 12 /* max # chars in Gtab Id */ #define MAXLOGIN 80 /* max # chars in Gtab Login */ diff -rc getty_ps-2.0.7e/uufuncs.c getty_ps-2.0.7e-jpm/uufuncs.c *** getty_ps-2.0.7e/uufuncs.c Tue May 17 04:33:51 1994 --- getty_ps-2.0.7e-jpm/uufuncs.c Thu Sep 1 18:31:19 1994 *************** *** 8,13 **** --- 8,14 ---- #define UUFUNCS #define UUGETTY + #include #include "main.h" #include "uufuncs.h" #include "debug.h" *************** *** 79,84 **** --- 80,86 ---- #endif /* ASCIIPID */ int getpid(); char *mktemp(); + struct passwd *pw; debug(D_LOCK, "makelock(%s) called", name); *************** *** 102,107 **** --- 104,117 ---- (void) write(fd, (char *)&pid, sizeof(pid)); #endif /* ASCIIPID */ (void) close(fd); + + /* change owner of link */ + pw = getpwnam(UUCPID); + if (pw==NULL || chown(temp,pw->pw_uid,pw->pw_gid)<0) { + debug(D_LOCK, "lock NOT made -- chown failed"); + (void) unlink(temp); + return(FAIL); + } /* link it to the lock file */ Only in getty_ps-2.0.7e: uugetty