summaryrefslogtreecommitdiff
path: root/dix/property.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-10-10 19:56:03 -0400
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-10-10 19:56:03 -0400
commit8f23d40068151ad85cde239d07031284f0b2c4dc (patch)
tree261f72d58b26d13ee23848ed07e3ccb86be00a7d /dix/property.c
parent473bc6ec4c59e1a962b0b897c449a69aa5064ab0 (diff)
xace: move the property deletion hook inside the DeleteProperty function.
Diffstat (limited to 'dix/property.c')
-rw-r--r--dix/property.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/dix/property.c b/dix/property.c
index cff51d894..713507a09 100644
--- a/dix/property.c
+++ b/dix/property.c
@@ -365,9 +365,10 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format,
}
int
-DeleteProperty(WindowPtr pWin, Atom propName)
+DeleteProperty(ClientPtr client, WindowPtr pWin, Atom propName)
{
PropertyPtr pProp, prevProp;
+ int rc;
if (!(pProp = wUserProps (pWin)))
return(Success);
@@ -381,6 +382,11 @@ DeleteProperty(WindowPtr pWin, Atom propName)
}
if (pProp)
{
+ rc = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp,
+ DixDestroyAccess);
+ if (rc != Success)
+ return rc;
+
if (prevProp == (PropertyPtr)NULL) /* takes care of head */
{
if (!(pWin->optional->userProps = pProp->next))
@@ -636,14 +642,7 @@ ProcDeleteProperty(ClientPtr client)
return (BadAtom);
}
- result = XaceHook(XACE_PROPERTY_ACCESS, client, pWin,
- FindProperty(pWin, stuff->property), DixDestroyAccess);
- if (result != Success) {
- client->errorValue = stuff->property;
- return result;
- }
-
- result = DeleteProperty(pWin, stuff->property);
+ result = DeleteProperty(client, pWin, stuff->property);
if (client->noClientException != Success)
return(client->noClientException);
else