mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
xace: typesafe hook function for XACE_RESOURCE_ACCESS
The generic XaceHook() call isn't typesafe (und unnecessarily slow). Better add an explicit function, just like we already have for others. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556>
This commit is contained in:
committed by
Marge Bot
parent
632a48a057
commit
ae3c573337
@@ -929,7 +929,7 @@ ProcRenderCreateGlyphSet(ClientPtr client)
|
||||
if (!glyphSet)
|
||||
return BadAlloc;
|
||||
/* security creation/labeling check */
|
||||
rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->gsid, GlyphSetType,
|
||||
rc = XaceHookResourceAccess(client, stuff->gsid, GlyphSetType,
|
||||
glyphSet, X11_RESTYPE_NONE, NULL, DixCreateAccess);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
@@ -1862,7 +1862,7 @@ ProcRenderCreateSolidFill(ClientPtr client)
|
||||
if (!pPicture)
|
||||
return error;
|
||||
/* security creation/labeling check */
|
||||
error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType,
|
||||
error = XaceHookResourceAccess(client, stuff->pid, PictureType,
|
||||
pPicture, X11_RESTYPE_NONE, NULL, DixCreateAccess);
|
||||
if (error != Success)
|
||||
return error;
|
||||
@@ -1901,7 +1901,7 @@ ProcRenderCreateLinearGradient(ClientPtr client)
|
||||
if (!pPicture)
|
||||
return error;
|
||||
/* security creation/labeling check */
|
||||
error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType,
|
||||
error = XaceHookResourceAccess(client, stuff->pid, PictureType,
|
||||
pPicture, X11_RESTYPE_NONE, NULL, DixCreateAccess);
|
||||
if (error != Success)
|
||||
return error;
|
||||
@@ -1941,7 +1941,7 @@ ProcRenderCreateRadialGradient(ClientPtr client)
|
||||
if (!pPicture)
|
||||
return error;
|
||||
/* security creation/labeling check */
|
||||
error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType,
|
||||
error = XaceHookResourceAccess(client, stuff->pid, PictureType,
|
||||
pPicture, X11_RESTYPE_NONE, NULL, DixCreateAccess);
|
||||
if (error != Success)
|
||||
return error;
|
||||
@@ -1980,7 +1980,7 @@ ProcRenderCreateConicalGradient(ClientPtr client)
|
||||
if (!pPicture)
|
||||
return error;
|
||||
/* security creation/labeling check */
|
||||
error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType,
|
||||
error = XaceHookResourceAccess(client, stuff->pid, PictureType,
|
||||
pPicture, X11_RESTYPE_NONE, NULL, DixCreateAccess);
|
||||
if (error != Success)
|
||||
return error;
|
||||
|
||||
Reference in New Issue
Block a user