diff options
Diffstat (limited to 'xorg/X11R7.6/rdp/rdpmain.c')
-rw-r--r-- | xorg/X11R7.6/rdp/rdpmain.c | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/xorg/X11R7.6/rdp/rdpmain.c b/xorg/X11R7.6/rdp/rdpmain.c index 1b924db7..884b8a3a 100644 --- a/xorg/X11R7.6/rdp/rdpmain.c +++ b/xorg/X11R7.6/rdp/rdpmain.c @@ -32,6 +32,27 @@ Sets up the functions #define DEBUG_OUT(arg) ErrorF arg #endif +#ifndef XRDP_DISABLE_LINUX_ABSTRACT +#ifdef __linux__ +#define XRDP_DISABLE_LINUX_ABSTRACT 1 +#else +#define XRDP_DISABLE_LINUX_ABSTRACT 0 +#endif +#endif + +#if XRDP_DISABLE_LINUX_ABSTRACT +/* because including <X11/Xtrans/Xtransint.h> in problematic + * we dup a small struct + * we need to set flags to zero to turn off abstract sockets */ +struct _MyXtransport +{ + char *TransName; + int flags; +}; +/* in xtrans-1.2.6/Xtranssock.c */ +extern struct _MyXtransport _XSERVTransSocketLocalFuncs; +#endif + rdpScreenInfoRec g_rdpScreen; /* the one screen */ ScreenPtr g_pScreen = 0; @@ -71,6 +92,12 @@ int g_use_uds = 0; char g_uds_data[256] = ""; /* data */ char g_uds_cont[256] = ""; /* control */ +int g_shift_down = 0; +int g_alt_down = 0; +int g_ctrl_down = 0; +int g_pause_spe = 0; +int g_tab_down = 0; + /* set all these at once, use function set_bpp */ int g_bpp = 16; int g_Bpp = 2; @@ -228,6 +255,16 @@ rdpDestroyColormap(ColormapPtr pColormap) #endif /******************************************************************************/ +void +rdpSetUDSRights(void) +{ + char unixSocketName[128]; + + sprintf(unixSocketName, "/tmp/.X11-unix/X%s", display); + chmod(unixSocketName, 0700); +} + +/******************************************************************************/ /* returns boolean, true if everything is ok */ static Bool rdpScreenInit(int index, ScreenPtr pScreen, int argc, char **argv) @@ -540,8 +577,10 @@ rdpScreenInit(int index, ScreenPtr pScreen, int argc, char **argv) } rdpGlyphInit(); - + //rdpXvInit(pScreen); + + rdpSetUDSRights(); ErrorF("rdpScreenInit: ret %d\n", ret); @@ -614,6 +653,11 @@ ddxProcessArgument(int argc, char **argv, int i) void OsVendorInit(void) { +#if XRDP_DISABLE_LINUX_ABSTRACT + /* turn off the Linux abstract unix doamin sockets TRANS_ABSTRACT */ + /* TRANS_NOLISTEN = 1 << 3 */ + _XSERVTransSocketLocalFuncs.flags = 0; +#endif } /******************************************************************************/ |