XACE: Check the return value of the selection create hook call.

(cherry picked from commit 056a2ce02c)
This commit is contained in:
Eamon Walsh 2008-03-04 02:44:48 -05:00 committed by Eamon Walsh
parent 7f74ba1b77
commit 926f32df3c

View File

@ -206,7 +206,12 @@ ProcSetSelectionOwner(ClientPtr client)
pSel->devPrivates = NULL;
/* security creation/labeling check */
(void)XaceHookSelectionAccess(client, &pSel, DixCreateAccess);
rc = XaceHookSelectionAccess(client, &pSel,
DixCreateAccess|DixSetAttrAccess);
if (rc != Success) {
xfree(pSel);
return rc;
}
pSel->next = CurrentSelections;
CurrentSelections = pSel;