--- XFree86-3.3.3.1/xc/programs/xterm/main.c.nosuidxterm Sun Mar 28 20:12:51 1999 +++ XFree86-3.3.3.1/xc/programs/xterm/main.c Sun Mar 28 20:13:58 1999 @@ -1862,7 +1862,7 @@ static int get_pty (int *pty) { -#ifdef __osf__ +#if defined(__osf__) || defined(__linux__) int tty; return (openpty(pty, &tty, ttydev, NULL, NULL)); #endif @@ -2502,6 +2502,9 @@ #endif /* TIOCSWINSZ */ #endif /* sun */ +#undef UTMP + addToUtmp(ttydev, NULL, screen->respond); + if (!am_slave) { #ifdef USE_HANDSHAKE if (pipe(pc_pipe) || pipe(cp_pipe)) @@ -3088,6 +3091,7 @@ if (pw && pw->pw_name) Setenv ("LOGNAME=", pw->pw_name); /* for POSIX */ #ifdef USE_SYSV_UTMP + /* Set up our utmp entry now. We need to do it here ** for the following reasons: ** - It needs to have our correct process id (for @@ -3185,7 +3189,6 @@ #endif /* close the file */ (void) endutent(); - #else /* USE_SYSV_UTMP */ /* We can now get our ttyslot! We can also set the initial * UTMP entry. @@ -3921,6 +3924,7 @@ Exit(int n) { register TScreen *screen = &term->screen; + removeFromUtmp(); #ifdef UTMP #ifdef USE_SYSV_UTMP #if defined(SVR4) || defined(SCO325) --- XFree86-3.3.3.1/xc/programs/xterm/Imakefile.nosuidxterm Sat Oct 24 03:58:19 1998 +++ XFree86-3.3.3.1/xc/programs/xterm/Imakefile Sun Mar 28 20:13:58 1999 @@ -20,6 +20,10 @@ #define XkbClientDefines /**/ #endif +#if InstallXtermSetUID +#undef InstallXtermSetUID +#endif + #ifndef XkbClientDepLibs #define XkbClientDepLibs /**/ #endif @@ -48,6 +52,8 @@ PUCCPTYDDEF = -DPUCC_PTYD /* does not need to be setuid */ PTYLIB = -lpucc #endif + + PTYLIB = -lutil -lutempter #if XtermWithI18N I18NDEF = -DI18N