--- ./nx-X11/programs/Xserver/hw/nxagent/X/NXextension.c.X.original 2015-02-13 14:03:44.744441510 +0100 +++ ./nx-X11/programs/Xserver/hw/nxagent/X/NXextension.c 2015-02-10 19:13:13.804685886 +0100 @@ -1,3 +1,20 @@ +/**************************************************************************/ +/* */ +/* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */ +/* */ +/* NXAGENT, NX protocol compression and NX extensions to this software */ +/* are copyright of NoMachine. Redistribution and use of the present */ +/* software is allowed according to terms specified in the file LICENSE */ +/* which comes in the source distribution. */ +/* */ +/* Check http://www.nomachine.com/licensing.html for applicability. */ +/* */ +/* NX and NoMachine are trademarks of Medialogic S.p.A. */ +/* */ +/* All rights reserved. */ +/* */ +/**************************************************************************/ + /* $XFree86: xc/programs/Xserver/dix/extension.c,v 3.11 2001/12/14 19:59:31 dawes Exp $ */ /*********************************************************** @@ -60,7 +77,7 @@ #include "extnsionst.h" #include "gcstruct.h" #include "scrnintstr.h" -#include "dispatch.h" +#include "../../dix/dispatch.h" #ifdef XCSECURITY #define _SECURITY_SERVER #include @@ -69,6 +86,8 @@ #include "lbxserve.h" #endif +#include "Trap.h" + #define EXTENSION_BASE 128 #define EXTENSION_EVENT_BASE 64 #define LAST_EVENT 128 @@ -324,6 +343,13 @@ { i = FindExtension((char *)&stuff[1], stuff->nbytes); if (i < 0 + + /* + * Hide RENDER if our implementation + * is faulty. + */ + + || (nxagentRenderTrap && strcmp(extensions[i]->name, "RENDER") == 0) #ifdef XCSECURITY /* don't show insecure extensions to untrusted clients */ || (client->trustLevel == XSecurityClientUntrusted && @@ -370,6 +396,14 @@ !extensions[i]->secure) continue; #endif + /* + * Hide RENDER if our implementation + * is faulty. + */ + + if (nxagentRenderTrap && strcmp(extensions[i]->name, "RENDER") == 0) + continue; + total_length += strlen(extensions[i]->name) + 1; reply.nExtensions += 1 + extensions[i]->num_aliases; for (j = extensions[i]->num_aliases; --j >= 0;)