mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-29 21:46:40 +00:00
xace: add new fields to resource access hook to allow parent resource objects
to be passed in at create time. Also added a missing devPrivates initializer.
This commit is contained in:
parent
ce9e83d913
commit
0003ccfcdf
13 changed files with 33 additions and 28 deletions
|
|
@ -212,12 +212,12 @@ AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits,
|
|||
pCurs->backGreen = backGreen;
|
||||
pCurs->backBlue = backBlue;
|
||||
|
||||
pCurs->devPrivates = NULL;
|
||||
pCurs->id = cid;
|
||||
pCurs->devPrivates = NULL;
|
||||
|
||||
/* security creation/labeling check */
|
||||
rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR,
|
||||
DixCreateAccess, pCurs);
|
||||
pCurs, RT_NONE, NULL, DixCreateAccess);
|
||||
if (rc != Success) {
|
||||
dixFreePrivates(pCurs->devPrivates);
|
||||
FreeCursorBits(bits);
|
||||
|
|
@ -365,6 +365,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
|
|||
bits->height = cm.height;
|
||||
bits->xhot = cm.xhot;
|
||||
bits->yhot = cm.yhot;
|
||||
bits->devPrivates = NULL;
|
||||
if (sourcefont != maskfont)
|
||||
bits->refcnt = -1;
|
||||
else
|
||||
|
|
@ -406,7 +407,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
|
|||
|
||||
/* security creation/labeling check */
|
||||
rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR,
|
||||
DixCreateAccess, pCurs);
|
||||
pCurs, RT_NONE, NULL, DixCreateAccess);
|
||||
if (rc != Success) {
|
||||
dixFreePrivates(pCurs->devPrivates);
|
||||
FreeCursorBits(bits);
|
||||
|
|
|
|||
Loading…
Reference in a new issue