~ubuntu-branches/ubuntu/quantal/xdm/quantal

« back to all changes in this revision

Viewing changes to debian/patches/xdm_fixes.diff

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2010-04-19 20:55:56 UTC
  • mfrom: (1.1.9 upstream) (9.2.1 sid)
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: james.westby@ubuntu.com-20100419205556-9tgxo1rdu2c7vy8y
Tags: 1:1.1.10-1
* New upstream release.
  - don't delete the pid file from child xdm processes, closes: #372114
  - clear the "Login incorrect" message properly on next login,
    closes: #525596.  Thanks, Martin Dickopp!
  - fix xdmcp with net.ipv6.bindv6only=1
* Patches merged upstream:
  - 02_xdm_zombie_no_error.diff
  - 15_xdm_openfiles.diff
  - 90_xdm_write_dummy_auth.diff
  - 91_xdm_saveserverauth_logging.diff
  - log_sourcing_better.diff
  - selinux_support.diff
  - storepid_rewrite.diff
* Xstartup: use id -u $USER, not id -u, since this script is run as root.
  See #118677.
* debian/rules: delete libtool m4 files on clean.
* Introduce virtual facility x-display-manager for insserv
  (closes: #554839).  Thanks, Jonas Meurer!
* debian/rules: kill gratuitous uses of $(CURDIR).
* debian/xdm.pam: @include common-* after pam_env and friends, so that we
  still set env vars if e.g. common-auth contains a 'sufficient' module
  (closes: #444483).
* debian/xdm.init: add Short-Description (closes: #510085).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# HG changeset patch
2
 
# User ejka@imfi.kspu.ru
3
 
# Node ID fbeb28a122da949d0e70dd30956800ae707700d3
4
 
# Parent  77625b567802c5b6977eddb845f391e65a8733d0
5
 
Applied 002_xdm_fixes.diff
6
 
 
7
 
Index: xdm/auth.c
8
 
===================================================================
9
 
--- xdm.orig/auth.c
10
 
+++ xdm/auth.c
11
 
@@ -48,6 +48,7 @@
12
 
 #include "dm_error.h"
13
 
 
14
 
 #include <errno.h>
15
 
+#include <fcntl.h>
16
 
 
17
 
 #include <sys/ioctl.h>
18
 
 
19
 
Index: xdm/dm.c
20
 
===================================================================
21
 
--- xdm.orig/dm.c
22
 
+++ xdm/dm.c
23
 
@@ -41,6 +41,7 @@
24
 
 # include      "dm_error.h"
25
 
 
26
 
 # include      <stdio.h>
27
 
+# include      <string.h>
28
 
 #ifdef X_POSIX_C_SOURCE
29
 
 #define _POSIX_C_SOURCE X_POSIX_C_SOURCE
30
 
 #include <signal.h>
31
 
@@ -569,9 +570,10 @@
32
 
                    RestartDisplay (d, FALSE);
33
 
                break;
34
 
            default:
35
 
-               Debug ("Display exited with unknown status %d\n", waitVal(status));
36
 
-               LogError ("Unknown session exit code %d from process %d\n",
37
 
-                         waitVal (status), pid);
38
 
+               Debug ("display %s exited with unknown status %d\n",
39
 
+                      d->name, waitVal(status));
40
 
+               LogError ("display %s (pid %ld) exited with unexpected status "
41
 
+                         "%d\n", d->name, waitVal (status), (long) pid);
42
 
                StopDisplay (d);
43
 
                break;
44
 
            }
45
 
Index: xdm/genauth.c
46
 
===================================================================
47
 
--- xdm.orig/genauth.c
48
 
+++ xdm/genauth.c
49
 
@@ -42,6 +42,8 @@
50
 
 # include   "dm_error.h"
51
 
 
52
 
 #include <errno.h>
53
 
+#include <fcntl.h>
54
 
+#include <string.h>
55
 
 
56
 
 #include <time.h>
57
 
 #define Time_t time_t
58
 
Index: xdm/session.c
59
 
===================================================================
60
 
--- xdm.orig/session.c
61
 
+++ xdm/session.c
62
 
@@ -878,12 +878,14 @@
63
 
     open ("/dev/null", O_RDONLY);
64
 
     /* make stdout follow stderr to the log file */
65
 
     dup2 (2,1);
66
 
+    Debug ("attempting to execve() %s\n", argv[0]);
67
 
     execve (argv[0], argv, environ);
68
 
     /*
69
 
      * In case this is a shell script which hasn't been
70
 
      * made executable (or this is a SYSV box), do
71
 
      * a reasonable thing
72
 
      */
73
 
+    Debug ("execve() of %s failed: %s\n", argv[0], _SysErrorMsg (errno));
74
 
     if (errno != ENOENT) {
75
 
        char    program[1024], *e, *p, *optarg;
76
 
        FILE    *f;
77
 
@@ -942,6 +944,7 @@
78
 
        while ((*av++ = *argv++))
79
 
            /* SUPPRESS 530 */
80
 
            ;
81
 
+       Debug ("attempting to execve() %s\n", newargv[0]);
82
 
        execve (newargv[0], newargv, environ);
83
 
     }
84
 
 }
85
 
Index: xdm/xdm.man.cpp
86
 
===================================================================
87
 
--- xdm.orig/xdm.man.cpp
88
 
+++ xdm/xdm.man.cpp
89
 
@@ -289,7 +289,7 @@
90
 
 this resource to ``false'' will disable this feature.
91
 
 .IP "\fBDisplayManager.pidFile\fP"
92
 
 The filename specified will be created to contain an ASCII
93
 
-representation of the process-id of the main
94
 
+representation of the process ID of the main
95
 
 .I xdm
96
 
 process.
97
 
 .I Xdm
98
 
@@ -353,9 +353,11 @@
99
 
 #ifdef DEV_RANDOM
100
 
 .IP \fBDisplayManager.randomDevice\fP
101
 
 A file to read 8 bytes from to generate the seed of authorization keys.
102
 
-The default is \fI DEV_RANDOM \fP. If this file cannot be read, or if a
103
 
-read blocks for more than 5 seconds, xdm falls back to using a checksum
104
 
-of \fBDisplayManager.randomFile\fP to generate the seed.
105
 
+The default is
106
 
+.IR DEV_RANDOM .
107
 
+If this file cannot be read, or if a read blocks for more than 5 seconds,
108
 
+xdm falls back to using a checksum of \fBDisplayManager.randomFile\fP to
109
 
+generate the seed.
110
 
 #endif
111
 
 #if !defined(ARC4_RANDOM)
112
 
 .IP \fBDisplayManager.prngdSocket\fP
113
 
Index: xdm/xdmauth.c
114
 
===================================================================
115
 
--- xdm.orig/xdmauth.c
116
 
+++ xdm/xdmauth.c
117
 
@@ -45,6 +45,18 @@
118
 
 static char    auth_name[256];
119
 
 static int     auth_name_len;
120
 
 
121
 
+static void XdmPrintDataHex (char *s, char *a, int l);
122
 
+# ifdef XDMCP
123
 
+static void XdmPrintArray8Hex (char *s, ARRAY8Ptr a);
124
 
+# endif
125
 
+static Xauth *XdmGetAuthHelper (unsigned short namelen,
126
 
+                               char *name,
127
 
+                               int includeRho);
128
 
+# ifdef XDMCP
129
 
+static int HexToBinary (char *key);
130
 
+static int XdmGetKey (struct protoDisplay *pdpy, ARRAY8Ptr displayID);
131
 
+# endif
132
 
+
133
 
 static void
134
 
 XdmPrintDataHex (char *s, char *a, int l)
135
 
 {
136
 
@@ -182,7 +194,9 @@
137
 
     XdmPrintDataHex ("Accept packet auth", xdmcpauth->data, xdmcpauth->data_length);
138
 
     XdmPrintDataHex ("Auth file auth", fileauth->data, fileauth->data_length);
139
 
     /* encrypt the session key for its trip back to the server */
140
 
-    XdmcpWrap (xdmcpauth->data, (unsigned char *)&pdpy->key, xdmcpauth->data, 8);
141
 
+    XdmcpWrap ((unsigned char *)&xdmcpauth->data,
142
 
+              (unsigned char *)&pdpy->key,
143
 
+              (unsigned char *)&xdmcpauth->data, 8);
144
 
     pdpy->fileAuthorization = fileauth;
145
 
     pdpy->xdmcpAuthorization = xdmcpauth;
146
 
 }
147
 
Index: xdm/xdmshell.c
148
 
===================================================================
149
 
--- xdm.orig/xdmshell.c
150
 
+++ xdm/xdmshell.c
151
 
@@ -41,6 +41,7 @@
152
 
 #include <stdio.h>
153
 
 #include "dm.h"
154
 
 #include <errno.h>
155
 
+#include <string.h>
156
 
 
157
 
 #ifdef macII
158
 
 #define ON_CONSOLE_ONLY