xserver: Branch 'XACE-SELINUX'
Eamon Walsh
ewalsh at kemper.freedesktop.org
Wed Oct 10 16:56:39 PDT 2007
dix/property.c | 17 ++++++++---------
hw/darwin/quartz/xpr/xprFrame.c | 2 +-
hw/xwin/winwin32rootless.c | 2 +-
3 files changed, 10 insertions(+), 11 deletions(-)
New commits:
diff-tree 8f23d40068151ad85cde239d07031284f0b2c4dc (from 473bc6ec4c59e1a962b0b897c449a69aa5064ab0)
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date: Wed Oct 10 19:56:03 2007 -0400
xace: move the property deletion hook inside the DeleteProperty function.
diff --git a/dix/property.c b/dix/property.c
index cff51d8..713507a 100644
--- a/dix/property.c
+++ b/dix/property.c
@@ -365,9 +365,10 @@ ChangeWindowProperty(WindowPtr pWin, Ato
}
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 prop
}
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
diff --git a/hw/darwin/quartz/xpr/xprFrame.c b/hw/darwin/quartz/xpr/xprFrame.c
index 76c719e..c5b84f0 100644
--- a/hw/darwin/quartz/xpr/xprFrame.c
+++ b/hw/darwin/quartz/xpr/xprFrame.c
@@ -337,7 +337,7 @@ xprDamageRects(RootlessFrameID wid, int
void
xprSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin)
{
- DeleteProperty(oldWin, xa_native_window_id());
+ DeleteProperty(serverClient, oldWin, xa_native_window_id());
xprSetNativeProperty(pFrame);
}
diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c
index 832e36d..4b4cd3d 100755
--- a/hw/xwin/winwin32rootless.c
+++ b/hw/xwin/winwin32rootless.c
@@ -971,7 +971,7 @@ winMWExtWMRootlessSwitchWindow (Rootless
SetWindowLongPtr (pRLWinPriv->hWnd, GWL_STYLE,
WS_POPUP | WS_CLIPCHILDREN);
- DeleteProperty (oldWin, AtmWindowsWmNativeHwnd ());
+ DeleteProperty (serverClient, oldWin, AtmWindowsWmNativeHwnd ());
winMWExtWMSetNativeProperty (pFrame);
#if CYGMULTIWINDOW_DEBUG
#if 0
More information about the xorg-commit
mailing list