forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit12da677
committed
Fix sepgsql regression tests.
The regression tests for sepgsql were broken by changes in thebase distro as-shipped policies. Specifically, definition ofunconfined_t in the system default policy was changed to bypassmulti-category rules, which the regression test depended on.Fix that by defining a custom privileged domain(sepgsql_regtest_superuser_t) and using it instead of system'sunconfined_t domain. The new sepgsql_regtest_superuser_t domainperforms almost like the current unconfined_t, but restricted bymulti-category policy as the traditional unconfined_t was.The custom policy module is a self defined domain, and so should notbe affected by related future system policy changes. However, it stilluses the unconfined_u:unconfined_r pair for selinux-user and role.Those definitions have not been changed for several years and seemless risky to rely on than the unconfined_t domain. Additionally, ifwe define custom user/role, they would need to be manually definedat the operating system level, adding more complexity to an alreadynon-standard and complex regression test.Back-patch to 9.3. The regression tests will need more work beforeworking correctly on 9.2. Starting with 9.2, sepgsql has had dependencieson libselinux versions that are only available on newer distros withthe changed set of policies (e.g. RHEL 7.x). On 9.1 sepgsql worksfine with the older distros with original policy set (e.g. RHEL 6.x),and on which the existing regression tests work fine. We might wanteventually change 9.1 sepgsql regression tests to be more independentfrom the underlying OS policies, however more work will be needed tomake that happen and it is not clear that it is worth the effort.Kohei KaiGai with review by Adam Brightwell and me, commentary byStephen, Alvaro, Tom, Robert, and others.1 parent747ca66 commit12da677
11 files changed
+424
-381
lines changedLines changed: 87 additions & 91 deletions
Large diffs are not rendered by default.
Lines changed: 192 additions & 202 deletions
Large diffs are not rendered by default.
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
192 | 192 |
| |
193 | 193 |
| |
194 | 194 |
| |
195 |
| - | |
196 |
| - | |
197 |
| - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
198 | 198 |
| |
199 | 199 |
| |
200 | 200 |
| |
|
Lines changed: 53 additions & 53 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
175 | 175 |
| |
176 | 176 |
| |
177 | 177 |
| |
178 |
| - | |
179 |
| - | |
180 |
| - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
181 | 181 |
| |
182 | 182 |
| |
183 |
| - | |
| 183 | + | |
184 | 184 |
| |
185 | 185 |
| |
186 | 186 |
| |
187 | 187 |
| |
188 | 188 |
| |
189 | 189 |
| |
190 |
| - | |
191 |
| - | |
192 |
| - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
193 | 193 |
| |
194 | 194 |
| |
195 | 195 |
| |
196 | 196 |
| |
197 | 197 |
| |
198 |
| - | |
199 |
| - | |
200 |
| - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
201 | 201 |
| |
202 | 202 |
| |
203 | 203 |
| |
204 |
| - | |
| 204 | + | |
205 | 205 |
| |
206 | 206 |
| |
207 | 207 |
| |
208 | 208 |
| |
209 | 209 |
| |
210 | 210 |
| |
211 |
| - | |
212 |
| - | |
213 |
| - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
214 | 214 |
| |
215 | 215 |
| |
216 | 216 |
| |
217 |
| - | |
| 217 | + | |
218 | 218 |
| |
219 | 219 |
| |
220 | 220 |
| |
221 | 221 |
| |
222 | 222 |
| |
223 | 223 |
| |
224 |
| - | |
225 |
| - | |
226 |
| - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
227 | 227 |
| |
228 | 228 |
| |
229 | 229 |
| |
230 |
| - | |
| 230 | + | |
231 | 231 |
| |
232 | 232 |
| |
233 | 233 |
| |
234 | 234 |
| |
235 | 235 |
| |
236 | 236 |
| |
237 |
| - | |
238 |
| - | |
239 |
| - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
240 | 240 |
| |
241 | 241 |
| |
242 | 242 |
| |
243 |
| - | |
| 243 | + | |
244 | 244 |
| |
245 | 245 |
| |
246 | 246 |
| |
247 | 247 |
| |
248 | 248 |
| |
249 | 249 |
| |
250 |
| - | |
251 |
| - | |
252 |
| - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
253 | 253 |
| |
254 | 254 |
| |
255 | 255 |
| |
256 | 256 |
| |
257 |
| - | |
258 |
| - | |
259 |
| - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
260 | 260 |
| |
261 | 261 |
| |
262 | 262 |
| |
263 | 263 |
| |
264 |
| - | |
265 |
| - | |
266 |
| - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
267 | 267 |
| |
268 | 268 |
| |
269 | 269 |
| |
270 | 270 |
| |
271 |
| - | |
272 |
| - | |
273 |
| - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
274 | 274 |
| |
275 | 275 |
| |
276 | 276 |
| |
277 |
| - | |
| 277 | + | |
278 | 278 |
| |
279 | 279 |
| |
280 | 280 |
| |
281 | 281 |
| |
282 | 282 |
| |
283 | 283 |
| |
284 |
| - | |
285 |
| - | |
286 |
| - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
287 | 287 |
| |
288 | 288 |
| |
289 | 289 |
| |
290 |
| - | |
| 290 | + | |
291 | 291 |
| |
292 | 292 |
| |
293 | 293 |
| |
294 | 294 |
| |
295 | 295 |
| |
296 | 296 |
| |
297 |
| - | |
298 |
| - | |
299 |
| - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
300 | 300 |
| |
301 | 301 |
| |
302 | 302 |
| |
303 | 303 |
| |
304 |
| - | |
305 |
| - | |
306 |
| - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
307 | 307 |
| |
308 | 308 |
| |
309 |
| - | |
| 309 | + | |
310 | 310 |
| |
311 | 311 |
| |
312 | 312 |
| |
313 | 313 |
| |
314 | 314 |
| |
315 | 315 |
| |
316 | 316 |
| |
317 |
| - | |
318 |
| - | |
319 |
| - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
320 | 320 |
| |
321 | 321 |
| |
322 | 322 |
| |
| |||
493 | 493 |
| |
494 | 494 |
| |
495 | 495 |
| |
496 |
| - | |
497 |
| - | |
498 |
| - | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
499 | 499 |
| |
500 | 500 |
| |
501 | 501 |
| |
|
Lines changed: 17 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 |
| - | |
16 |
| - | |
17 |
| - | |
18 |
| - | |
19 |
| - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
32 |
| - | |
33 |
| - | |
34 |
| - | |
35 |
| - | |
36 |
| - | |
37 |
| - | |
38 |
| - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
46 |
| - | |
47 |
| - | |
48 |
| - | |
49 |
| - | |
50 |
| - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
24 |
| - | |
| 24 | + | |
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
|
Lines changed: 58 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
26 | 55 |
| |
27 | 56 |
| |
28 | 57 |
| |
| |||
156 | 185 |
| |
157 | 186 |
| |
158 | 187 |
| |
| 188 | + | |
159 | 189 |
| |
160 | 190 |
| |
161 | 191 |
| |
162 | 192 |
| |
| 193 | + | |
163 | 194 |
| |
164 | 195 |
| |
165 | 196 |
| |
| |||
169 | 200 |
| |
170 | 201 |
| |
171 | 202 |
| |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
172 | 229 |
| |
173 | 230 |
| |
174 | 231 |
| |
|
0 commit comments
Comments
(0)