diff options
Diffstat (limited to 'meta-emenlow/recipes-graphics/xorg-xserver/files/fix-bogus-stack-variables.patch')
-rw-r--r-- | meta-emenlow/recipes-graphics/xorg-xserver/files/fix-bogus-stack-variables.patch | 211 |
1 files changed, 0 insertions, 211 deletions
diff --git a/meta-emenlow/recipes-graphics/xorg-xserver/files/fix-bogus-stack-variables.patch b/meta-emenlow/recipes-graphics/xorg-xserver/files/fix-bogus-stack-variables.patch deleted file mode 100644 index cb937b07..00000000 --- a/meta-emenlow/recipes-graphics/xorg-xserver/files/fix-bogus-stack-variables.patch +++ /dev/null | |||
@@ -1,211 +0,0 @@ | |||
1 | Upstream is here: | ||
2 | https://bugs.freedesktop.org/show_bug.cgi?id=18451 | ||
3 | |||
4 | Upstream-status: Backport | ||
5 | |||
6 | Signed-off-by: Christopher Hallinan <challinan (a] gmail.com> | ||
7 | |||
8 | diff --git a/Xext/xace.c b/Xext/xace.c | ||
9 | index e10d837..c757cad 100644 | ||
10 | --- a/Xext/xace.c | ||
11 | +++ b/Xext/xace.c | ||
12 | @@ -87,7 +87,18 @@ void XaceHookAuditEnd(ClientPtr ptr, int result) | ||
13 | */ | ||
14 | int XaceHook(int hook, ...) | ||
15 | { | ||
16 | - pointer calldata; /* data passed to callback */ | ||
17 | + union { | ||
18 | + XaceResourceAccessRec res; | ||
19 | + XaceDeviceAccessRec dev; | ||
20 | + XaceSendAccessRec send; | ||
21 | + XaceReceiveAccessRec recv; | ||
22 | + XaceClientAccessRec client; | ||
23 | + XaceExtAccessRec ext; | ||
24 | + XaceServerAccessRec server; | ||
25 | + XaceScreenAccessRec screen; | ||
26 | + XaceAuthAvailRec auth; | ||
27 | + XaceKeyAvailRec key; | ||
28 | + } u; | ||
29 | int *prv = NULL; /* points to return value from callback */ | ||
30 | va_list ap; /* argument list */ | ||
31 | va_start(ap, hook); | ||
32 | @@ -99,117 +110,86 @@ int XaceHook(int hook, ...) | ||
33 | */ | ||
34 | switch (hook) | ||
35 | { | ||
36 | - case XACE_RESOURCE_ACCESS: { | ||
37 | - XaceResourceAccessRec rec; | ||
38 | - rec.client = va_arg(ap, ClientPtr); | ||
39 | - rec.id = va_arg(ap, XID); | ||
40 | - rec.rtype = va_arg(ap, RESTYPE); | ||
41 | - rec.res = va_arg(ap, pointer); | ||
42 | - rec.ptype = va_arg(ap, RESTYPE); | ||
43 | - rec.parent = va_arg(ap, pointer); | ||
44 | - rec.access_mode = va_arg(ap, Mask); | ||
45 | - rec.status = Success; /* default allow */ | ||
46 | - calldata = &rec; | ||
47 | - prv = &rec.status; | ||
48 | + case XACE_RESOURCE_ACCESS: | ||
49 | + u.res.client = va_arg(ap, ClientPtr); | ||
50 | + u.res.id = va_arg(ap, XID); | ||
51 | + u.res.rtype = va_arg(ap, RESTYPE); | ||
52 | + u.res.res = va_arg(ap, pointer); | ||
53 | + u.res.ptype = va_arg(ap, RESTYPE); | ||
54 | + u.res.parent = va_arg(ap, pointer); | ||
55 | + u.res.access_mode = va_arg(ap, Mask); | ||
56 | + u.res.status = Success; /* default allow */ | ||
57 | + prv = &u.res.status; | ||
58 | break; | ||
59 | - } | ||
60 | - case XACE_DEVICE_ACCESS: { | ||
61 | - XaceDeviceAccessRec rec; | ||
62 | - rec.client = va_arg(ap, ClientPtr); | ||
63 | - rec.dev = va_arg(ap, DeviceIntPtr); | ||
64 | - rec.access_mode = va_arg(ap, Mask); | ||
65 | - rec.status = Success; /* default allow */ | ||
66 | - calldata = &rec; | ||
67 | - prv = &rec.status; | ||
68 | + case XACE_DEVICE_ACCESS: | ||
69 | + u.dev.client = va_arg(ap, ClientPtr); | ||
70 | + u.dev.dev = va_arg(ap, DeviceIntPtr); | ||
71 | + u.dev.access_mode = va_arg(ap, Mask); | ||
72 | + u.dev.status = Success; /* default allow */ | ||
73 | + prv = &u.dev.status; | ||
74 | break; | ||
75 | - } | ||
76 | - case XACE_SEND_ACCESS: { | ||
77 | - XaceSendAccessRec rec; | ||
78 | - rec.client = va_arg(ap, ClientPtr); | ||
79 | - rec.dev = va_arg(ap, DeviceIntPtr); | ||
80 | - rec.pWin = va_arg(ap, WindowPtr); | ||
81 | - rec.events = va_arg(ap, xEventPtr); | ||
82 | - rec.count = va_arg(ap, int); | ||
83 | - rec.status = Success; /* default allow */ | ||
84 | - calldata = &rec; | ||
85 | - prv = &rec.status; | ||
86 | + case XACE_SEND_ACCESS: | ||
87 | + u.send.client = va_arg(ap, ClientPtr); | ||
88 | + u.send.dev = va_arg(ap, DeviceIntPtr); | ||
89 | + u.send.pWin = va_arg(ap, WindowPtr); | ||
90 | + u.send.events = va_arg(ap, xEventPtr); | ||
91 | + u.send.count = va_arg(ap, int); | ||
92 | + u.send.status = Success; /* default allow */ | ||
93 | + prv = &u.send.status; | ||
94 | break; | ||
95 | - } | ||
96 | - case XACE_RECEIVE_ACCESS: { | ||
97 | - XaceReceiveAccessRec rec; | ||
98 | - rec.client = va_arg(ap, ClientPtr); | ||
99 | - rec.pWin = va_arg(ap, WindowPtr); | ||
100 | - rec.events = va_arg(ap, xEventPtr); | ||
101 | - rec.count = va_arg(ap, int); | ||
102 | - rec.status = Success; /* default allow */ | ||
103 | - calldata = &rec; | ||
104 | - prv = &rec.status; | ||
105 | + case XACE_RECEIVE_ACCESS: | ||
106 | + u.recv.client = va_arg(ap, ClientPtr); | ||
107 | + u.recv.pWin = va_arg(ap, WindowPtr); | ||
108 | + u.recv.events = va_arg(ap, xEventPtr); | ||
109 | + u.recv.count = va_arg(ap, int); | ||
110 | + u.recv.status = Success; /* default allow */ | ||
111 | + prv = &u.recv.status; | ||
112 | break; | ||
113 | - } | ||
114 | - case XACE_CLIENT_ACCESS: { | ||
115 | - XaceClientAccessRec rec; | ||
116 | - rec.client = va_arg(ap, ClientPtr); | ||
117 | - rec.target = va_arg(ap, ClientPtr); | ||
118 | - rec.access_mode = va_arg(ap, Mask); | ||
119 | - rec.status = Success; /* default allow */ | ||
120 | - calldata = &rec; | ||
121 | - prv = &rec.status; | ||
122 | + case XACE_CLIENT_ACCESS: | ||
123 | + u.client.client = va_arg(ap, ClientPtr); | ||
124 | + u.client.target = va_arg(ap, ClientPtr); | ||
125 | + u.client.access_mode = va_arg(ap, Mask); | ||
126 | + u.client.status = Success; /* default allow */ | ||
127 | + prv = &u.client.status; | ||
128 | break; | ||
129 | - } | ||
130 | - case XACE_EXT_ACCESS: { | ||
131 | - XaceExtAccessRec rec; | ||
132 | - rec.client = va_arg(ap, ClientPtr); | ||
133 | - rec.ext = va_arg(ap, ExtensionEntry*); | ||
134 | - rec.access_mode = DixGetAttrAccess; | ||
135 | - rec.status = Success; /* default allow */ | ||
136 | - calldata = &rec; | ||
137 | - prv = &rec.status; | ||
138 | + case XACE_EXT_ACCESS: | ||
139 | + u.ext.client = va_arg(ap, ClientPtr); | ||
140 | + u.ext.ext = va_arg(ap, ExtensionEntry*); | ||
141 | + u.ext.access_mode = DixGetAttrAccess; | ||
142 | + u.ext.status = Success; /* default allow */ | ||
143 | + prv = &u.ext.status; | ||
144 | break; | ||
145 | - } | ||
146 | - case XACE_SERVER_ACCESS: { | ||
147 | - XaceServerAccessRec rec; | ||
148 | - rec.client = va_arg(ap, ClientPtr); | ||
149 | - rec.access_mode = va_arg(ap, Mask); | ||
150 | - rec.status = Success; /* default allow */ | ||
151 | - calldata = &rec; | ||
152 | - prv = &rec.status; | ||
153 | + case XACE_SERVER_ACCESS: | ||
154 | + u.server.client = va_arg(ap, ClientPtr); | ||
155 | + u.server.access_mode = va_arg(ap, Mask); | ||
156 | + u.server.status = Success; /* default allow */ | ||
157 | + prv = &u.server.status; | ||
158 | break; | ||
159 | - } | ||
160 | case XACE_SCREEN_ACCESS: | ||
161 | - case XACE_SCREENSAVER_ACCESS: { | ||
162 | - XaceScreenAccessRec rec; | ||
163 | - rec.client = va_arg(ap, ClientPtr); | ||
164 | - rec.screen = va_arg(ap, ScreenPtr); | ||
165 | - rec.access_mode = va_arg(ap, Mask); | ||
166 | - rec.status = Success; /* default allow */ | ||
167 | - calldata = &rec; | ||
168 | - prv = &rec.status; | ||
169 | + case XACE_SCREENSAVER_ACCESS: | ||
170 | + u.screen.client = va_arg(ap, ClientPtr); | ||
171 | + u.screen.screen = va_arg(ap, ScreenPtr); | ||
172 | + u.screen.access_mode = va_arg(ap, Mask); | ||
173 | + u.screen.status = Success; /* default allow */ | ||
174 | + prv = &u.screen.status; | ||
175 | break; | ||
176 | - } | ||
177 | - case XACE_AUTH_AVAIL: { | ||
178 | - XaceAuthAvailRec rec; | ||
179 | - rec.client = va_arg(ap, ClientPtr); | ||
180 | - rec.authId = va_arg(ap, XID); | ||
181 | - calldata = &rec; | ||
182 | + case XACE_AUTH_AVAIL: | ||
183 | + u.auth.client = va_arg(ap, ClientPtr); | ||
184 | + u.auth.authId = va_arg(ap, XID); | ||
185 | break; | ||
186 | - } | ||
187 | - case XACE_KEY_AVAIL: { | ||
188 | - XaceKeyAvailRec rec; | ||
189 | - rec.event = va_arg(ap, xEventPtr); | ||
190 | - rec.keybd = va_arg(ap, DeviceIntPtr); | ||
191 | - rec.count = va_arg(ap, int); | ||
192 | - calldata = &rec; | ||
193 | + case XACE_KEY_AVAIL: | ||
194 | + u.key.event = va_arg(ap, xEventPtr); | ||
195 | + u.key.keybd = va_arg(ap, DeviceIntPtr); | ||
196 | + u.key.count = va_arg(ap, int); | ||
197 | break; | ||
198 | - } | ||
199 | - default: { | ||
200 | + default: | ||
201 | va_end(ap); | ||
202 | return 0; /* unimplemented hook number */ | ||
203 | - } | ||
204 | } | ||
205 | va_end(ap); | ||
206 | |||
207 | /* call callbacks and return result, if any. */ | ||
208 | - CallCallbacks(&XaceHooks[hook], calldata); | ||
209 | + CallCallbacks(&XaceHooks[hook], &u); | ||
210 | return prv ? *prv : Success; | ||
211 | } | ||