shm: Fix xselinux resource initialization for xinerama pixmaps
This is necessary to avoid a NULL pointer deference when the pixmap is used later. [ajax: massaged commit message, fixed it to compile] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89748 Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Brent Collins <bcollins@trustedcs.com>
This commit is contained in:
		
							parent
							
								
									bcec9f867d
								
							
						
					
					
						commit
						7470578520
					
				|  | @ -971,6 +971,12 @@ ProcPanoramiXShmCreatePixmap(ClientPtr client) | |||
|                                                        stuff->offset); | ||||
| 
 | ||||
|         if (pMap) { | ||||
|             result = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, | ||||
|                               RT_PIXMAP, pMap, RT_NONE, NULL, DixCreateAccess); | ||||
|             if (result != Success) { | ||||
|                 pDraw->pScreen->DestroyPixmap(pMap); | ||||
|                 return result; | ||||
|             } | ||||
|             dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc); | ||||
|             shmdesc->refcnt++; | ||||
|             pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue