aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2021-01-30 16:10:23 +0100
committerUlrich Sibiller <uli42@gmx.de>2021-01-30 17:02:03 +0100
commitd627e948f558f4210feb54c674e7c112b1d6a2e7 (patch)
tree986b74fda1eaed525b4425c61b726e143508dae7 /nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
parentb8b1edb2b3507386de9c9fbe6f7b0f0347a22001 (diff)
downloadnx-libs-d627e948f558f4210feb54c674e7c112b1d6a2e7.tar.gz
nx-libs-d627e948f558f4210feb54c674e7c112b1d6a2e7.tar.bz2
nx-libs-d627e948f558f4210feb54c674e7c112b1d6a2e7.zip
NXproperty.c, dix.c: simplify ProcDeleteProperty()
by calling the dix version after a check
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXproperty.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXproperty.c48
1 files changed, 5 insertions, 43 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
index f4979ceb3..7cf41f241 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
@@ -180,11 +180,8 @@ ProcChangeProperty(ClientPtr client)
#ifdef NXAGENT_SERVER
/* prevent clients from changing the NX_AGENT_VERSION property */
- {
- Atom prop = MakeAtom("NX_AGENT_VERSION", strlen("NX_AGENT_VERSION"), True);
- if (stuff->property == prop)
- return client->noClientException;
- }
+ if (stuff->property == MakeAtom("NX_AGENT_VERSION", strlen("NX_AGENT_VERSION"), True))
+ return client->noClientException;
#endif
err = ChangeWindowProperty(pWin, stuff->property, stuff->type, (int)format,
@@ -577,46 +574,11 @@ GetWindowProperty(WindowPtr pWin, Atom property, long longOffset,
int
ProcDeleteProperty(register ClientPtr client)
{
- WindowPtr pWin;
REQUEST(xDeletePropertyReq);
- int result;
-
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 */
- {
- Atom prop = MakeAtom("NX_AGENT_VERSION", strlen("NX_AGENT_VERSION"), True);
- if (stuff->property == prop)
- return client->noClientException;
- }
-#endif
+ if (stuff->property == MakeAtom("NX_AGENT_VERSION", strlen("NX_AGENT_VERSION"), True))
+ return client->noClientException;
- result = DeleteProperty(pWin, stuff->property);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- return(result);
+ return xorg_ProcDeleteProperty(client);
}