mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-24 20:55:49 +00:00
xace: add hooks + new access codes: DOUBLE-BUFFER extension
This commit is contained in:
parent
082c0f7fb3
commit
e93cff52fe
2 changed files with 20 additions and 8 deletions
12
dbe/midbe.c
12
dbe/midbe.c
|
|
@ -56,6 +56,7 @@
|
|||
#include "gcstruct.h"
|
||||
#include "inputstr.h"
|
||||
#include "midbe.h"
|
||||
#include "xace.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
|
@ -153,6 +154,7 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction)
|
|||
DbeScreenPrivPtr pDbeScreenPriv;
|
||||
GCPtr pGC;
|
||||
xRectangle clearRect;
|
||||
int rc;
|
||||
|
||||
|
||||
pScreen = pWin->drawable.pScreen;
|
||||
|
|
@ -191,14 +193,18 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction)
|
|||
return(BadAlloc);
|
||||
}
|
||||
|
||||
/* Security creation/labeling check. */
|
||||
rc = XaceHook(XACE_RESOURCE_ACCESS, serverClient, bufId,
|
||||
dbeDrawableResType, pDbeWindowPrivPriv->pBackBuffer,
|
||||
RT_WINDOW, pWin, DixCreateAccess);
|
||||
|
||||
/* Make the back pixmap a DBE drawable resource. */
|
||||
if (!AddResource(bufId, dbeDrawableResType,
|
||||
(pointer)pDbeWindowPrivPriv->pBackBuffer))
|
||||
if (rc != Success || !AddResource(bufId, dbeDrawableResType,
|
||||
pDbeWindowPrivPriv->pBackBuffer))
|
||||
{
|
||||
/* free the buffer and the drawable resource */
|
||||
FreeResource(bufId, RT_NONE);
|
||||
return(BadAlloc);
|
||||
return (rc == Success) ? BadAlloc : rc;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue