From 056a2ce02ce85013e89055ee44a7aa3eabedac09 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 4 Mar 2008 02:44:48 -0500 Subject: [PATCH] XACE: Check the return value of the selection create hook call. --- dix/selection.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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;