Commit da9ac92e authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

NXproperty.c, dix.c: simplify ProcDeleteProperty()

by calling the dix version after a check
parent 969d9af2
...@@ -661,9 +661,12 @@ ProcListProperties(ClientPtr client) ...@@ -661,9 +661,12 @@ ProcListProperties(ClientPtr client)
return(client->noClientException); return(client->noClientException);
} }
#ifndef NXAGENT_SERVER
int int
#ifdef NXAGENT_SERVER
xorg_ProcDeleteProperty(register ClientPtr client)
#else
ProcDeleteProperty(register ClientPtr client) ProcDeleteProperty(register ClientPtr client)
#endif
{ {
WindowPtr pWin; WindowPtr pWin;
REQUEST(xDeletePropertyReq); REQUEST(xDeletePropertyReq);
...@@ -699,4 +702,3 @@ ProcDeleteProperty(register ClientPtr client) ...@@ -699,4 +702,3 @@ ProcDeleteProperty(register ClientPtr client)
else else
return(result); return(result);
} }
#endif
...@@ -180,11 +180,8 @@ ProcChangeProperty(ClientPtr client) ...@@ -180,11 +180,8 @@ ProcChangeProperty(ClientPtr client)
#ifdef NXAGENT_SERVER #ifdef NXAGENT_SERVER
/* prevent clients from changing the NX_AGENT_VERSION property */ /* prevent clients from changing the NX_AGENT_VERSION property */
{ if (stuff->property == MakeAtom("NX_AGENT_VERSION", strlen("NX_AGENT_VERSION"), True))
Atom prop = MakeAtom("NX_AGENT_VERSION", strlen("NX_AGENT_VERSION"), True);
if (stuff->property == prop)
return client->noClientException; return client->noClientException;
}
#endif #endif
err = ChangeWindowProperty(pWin, stuff->property, stuff->type, (int)format, err = ChangeWindowProperty(pWin, stuff->property, stuff->type, (int)format,
...@@ -577,46 +574,11 @@ GetWindowProperty(WindowPtr pWin, Atom property, long longOffset, ...@@ -577,46 +574,11 @@ GetWindowProperty(WindowPtr pWin, Atom property, long longOffset,
int int
ProcDeleteProperty(register ClientPtr client) ProcDeleteProperty(register ClientPtr client)
{ {
WindowPtr pWin;
REQUEST(xDeletePropertyReq); REQUEST(xDeletePropertyReq);
int result;
REQUEST_SIZE_MATCH(xDeletePropertyReq); REQUEST_SIZE_MATCH(xDeletePropertyReq);
UpdateCurrentTime();
pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
DixWriteAccess);
if (!pWin)
return(BadWindow);
if (!ValidAtom(stuff->property))
{
client->errorValue = stuff->property;
return (BadAtom);
}
#ifdef XCSECURITY
switch(SecurityCheckPropertyAccess(client, pWin, stuff->property,
DixDestroyAccess))
{
case SecurityErrorOperation:
client->errorValue = stuff->property;
return BadAtom;;
case SecurityIgnoreOperation:
return Success;
}
#endif
#ifdef NXAGENT_SERVER
/* prevent clients from deleting the NX_AGENT_VERSION property */ /* prevent clients from deleting the NX_AGENT_VERSION property */
{ if (stuff->property == MakeAtom("NX_AGENT_VERSION", strlen("NX_AGENT_VERSION"), True))
Atom prop = MakeAtom("NX_AGENT_VERSION", strlen("NX_AGENT_VERSION"), True);
if (stuff->property == prop)
return client->noClientException; return client->noClientException;
}
#endif
result = DeleteProperty(pWin, stuff->property); return xorg_ProcDeleteProperty(client);
if (client->noClientException != Success)
return(client->noClientException);
else
return(result);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment