summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2008-03-04 02:44:48 -0500
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2008-03-04 02:44:48 -0500
commit056a2ce02ce85013e89055ee44a7aa3eabedac09 (patch)
treea3cdf915745018125a016254dfc245d6dad21cf0
parent72f2197545e734cd0aa785d05a57b2fc0351a763 (diff)
XACE: Check the return value of the selection create hook call.
-rw-r--r--dix/selection.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/dix/selection.c b/dix/selection.c
index 11a174ee6..6a9198e96 100644
--- a/dix/selection.c
+++ b/dix/selection.c
@@ -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;