]> git.pld-linux.org Git - packages/XFree86.git/blob - XFree86-nosuidxterm.patch
- new spec syntax is so cool
[packages/XFree86.git] / XFree86-nosuidxterm.patch
1 diff -urN XFree86-3.3.5.orig/xc/programs/xterm/Imakefile XFree86-3.3.5/xc/programs/xterm/Imakefile
2 --- XFree86-3.3.5.orig/xc/programs/xterm/Imakefile      Wed Jul 28 15:37:50 1999
3 +++ XFree86-3.3.5/xc/programs/xterm/Imakefile   Thu Sep  2 18:51:23 1999
4 @@ -20,6 +20,10 @@
5  #define XkbClientDefines /**/
6  #endif
7  
8 +#if InstallXtermSetUID
9 +#undef InstallXtermSetUID
10 +#endif
11 +
12  #ifndef XkbClientDepLibs
13  #define XkbClientDepLibs /**/
14  #endif
15 @@ -48,6 +52,8 @@
16      PUCCPTYDDEF = -DPUCC_PTYD          /* does not need to be setuid */
17           PTYLIB = -lpucc
18  #endif
19 +
20 +         PTYLIB = -lutil -lutempter
21  
22  #if ((LinuxCLibMajorVersion == 6) && (LinuxCLibMinorVersion < 1))
23           PTYLIB = -lutil
24 diff -urN XFree86-3.3.5.orig/xc/programs/xterm/main.c XFree86-3.3.5/xc/programs/xterm/main.c
25 --- XFree86-3.3.5.orig/xc/programs/xterm/main.c Thu Sep  2 16:49:51 1999
26 +++ XFree86-3.3.5/xc/programs/xterm/main.c      Thu Sep  2 18:52:41 1999
27 @@ -1934,7 +1934,7 @@
28  static int
29  get_pty (int *pty)
30  {
31 -#if defined(__osf__) || (defined(__GLIBC__) && !defined(USE_USG_PTYS))
32 +#if defined(__osf__) || (defined(__GLIBC__) && !defined(USE_USG_PTYS)) || defined(__linux__)
33      int tty;
34      return (openpty(pty, &tty, ttydev, NULL, NULL));
35  #elif (defined(SYSV) && defined(i386) && !defined(SVR4)) || defined(__QNXNTO__)
36 @@ -2611,6 +2611,9 @@
37         }
38  #endif /* sun vs TIOCSWINSZ */
39  
40 +#undef UTMP
41 +       addToUtmp(ttydev, NULL, screen->respond);
42 +
43         if (!am_slave) {
44  #ifdef USE_HANDSHAKE
45             if (pipe(pc_pipe) || pipe(cp_pipe))
46 @@ -3230,6 +3233,7 @@
47                 if (pw && pw->pw_name)
48                     Setenv ("LOGNAME=", pw->pw_name); /* for POSIX */
49  #ifdef USE_SYSV_UTMP
50 +
51                 /* Set up our utmp entry now.  We need to do it here
52                 ** for the following reasons:
53                 **   - It needs to have our correct process id (for
54 @@ -3328,7 +3332,6 @@
55  #endif
56                 /* close the file */
57                 (void) endutent();
58 -
59  #else  /* USE_SYSV_UTMP */
60                 /* We can now get our ttyslot!  We can also set the initial
61                  * UTMP entry.
62 @@ -4063,6 +4066,7 @@
63  Exit(int n)
64  {
65         register TScreen *screen = &term->screen;
66 +       removeFromUtmp();
67  #ifdef UTMP
68  #ifdef USE_SYSV_UTMP
69  #if defined(SVR4) || defined(SCO325)
This page took 0.05482 seconds and 3 git commands to generate.