diff options
125 files changed, 3421 insertions, 3986 deletions
diff --git a/.gitmodules b/.gitmodules index 32417c16..7ced6a8e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,10 @@ [submodule "librfxcodec"] path = librfxcodec - url = git://github.com/neutrinolabs/librfxcodec + url = https://github.com/neutrinolabs/librfxcodec.git + ignore = untracked +[submodule "libpainter"] + path = libpainter + url = https://github.com/neutrinolabs/libpainter.git + branch = devel + ignore = untracked diff --git a/.travis.yml b/.travis.yml index dcd0d410..923e25a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ branches: compiler: - clang - gcc + - g++ addons: apt: @@ -18,7 +19,7 @@ addons: - libmp3lame-dev - libx11-dev - libxrandr-dev - - libpixman-dev + - libpixman-1-dev - nasm # x11rdp #- flex @@ -31,9 +32,13 @@ addons: #- g++ #- xutils +env: + - CONF_FLAGS="" + - CONF_FLAGS="--enable-ipv6 --enable-jpeg --enable-fuse --enable-mp3lame + --enable-pixman --enable-rfxcodec --enable-painter" + script: - # disable librfxcodec as no remotefx for v0.9.1 release - #- (cd librfxcodec && ./bootstrap && ./configure && make) - - (./bootstrap && ./configure --enable-ipv6 --enable-jpeg --enable-fuse --enable-mp3lame --enable-pixman && make && make distcheck) - # disable x11rdp build as it takes long time and it is to be deprecated - #- (cd xorg/X11R7.6 && ./buildx.sh default) + - ./bootstrap + - ./configure $CONF_FLAGS + - make CFLAGS="-O2 -Wall -Wwrite-strings -Werror" + - make distcheck diff --git a/Makefile.am b/Makefile.am index c50ea295..6d644836 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,8 +1,27 @@ ACLOCAL_AMFLAGS = -I m4 AM_DISTCHECK_CONFIGURE_FLAGS = --without-systemdsystemunitdir -EXTRA_DIST = bootstrap COPYING coding_style.md design.txt faq-compile.txt \ - faq-general.txt file-loc.txt install.txt m4 readme.txt +EXTRA_DIST = \ + COPYING \ + README.md \ + NEWS.md \ + astyle_config.as \ + bootstrap \ + coding_style.md \ + description-pak \ + design.txt \ + faq-compile.txt \ + faq-general.txt \ + file-loc.txt \ + fontdump \ + install.txt \ + m4 \ + postinstall-pak \ + readme.txt \ + tcutils \ + tests \ + vrplayer \ + xorg if XRDP_NEUTRINORDP NEUTRINORDPDIR = neutrinordp @@ -16,6 +35,18 @@ else XRDPVRDIR = endif +if XRDP_PAINTER +PAINTERDIR = libpainter +else +PAINTERDIR = +endif + +if XRDP_RFXCODEC +RFXCODECDIR = librfxcodec +else +RFXCODECDIR = +endif + SUBDIRS = \ common \ vnc \ @@ -24,6 +55,8 @@ SUBDIRS = \ mc \ $(NEUTRINORDPDIR) \ libxrdp \ + $(PAINTERDIR) \ + $(RFXCODECDIR) \ xrdp \ sesman \ keygen \ diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 00000000..f98e76cb --- /dev/null +++ b/NEWS.md @@ -0,0 +1,25 @@ +# Release notes for xrdp v0.9.1 (2016/12/21) +## New features + * New xorgxrdp backend using existing Xorg with additional modules + * Improvements to X11rdp backend + * Support for IPv6 (disabled by default) + * Initial support for RemoteFX Codec (disabled by default) + * Support for TLS security layer (preferred over RDP layer if supported by the client) + * Support for disabling deprecated SSLv3 protocol and for selecting custom cipher suites in xrdp.ini + * Support for bidirectional fastpath (enabled in both directions by default) + * Support clients that don't support drawing orders, such as MS RDP client for Android, ChromeRDP (disabled by default) + * More configurable login screen + * Support for new virtual channels: + * rdpdr: device redirection + * rdpsnd: audio output + * cliprdr: clipboard + * xrdpvr: xrdp video redirection channel (can be used along with NeutrinoRDP client) + * Support for disabling virtual channels globally or by session type + * Allow to specify the path for backends (Xorg, X11rdp, Xvnc) + * Added files for systemd support + * Multi-monitor support + * xrdp-chansrv stroes logs in `${XDG_DATA_HOME}/xrdp` now + +## Security fixes + * User's password could be recovered from the Xvnc password file + * X11 authentication was not used diff --git a/README.md b/README.md new file mode 100644 index 00000000..07f64e0a --- /dev/null +++ b/README.md @@ -0,0 +1,126 @@ +[](https://travis-ci.org/neutrinolabs/xrdp) +[](https://gitter.im/neutrinolabs/xrdp) + + +*Current Version:* 0.9.1 + +# xrdp - an open source RDP server + +## Overview + +**xrdp** provides a graphical login to remote machines using Microsoft +Remote Desktop Protocol (RDP). xrdp accepts connections from a variety of +RDP clients: FreeRDP, rdesktop, NeutrinoRDP and Microsoft Remote Desktop +Client (for Windows, Mac OS, iOS and Android). + +RDP transport is encrypted using TLS by default. + + + +## Features + +### Remote Desktop Access + + * Connect to a Linux desktop using RDP from anywhere (requires + [xorgxrdp](https://github.com/neutrinolabs/xorgxrdp) Xorg module) + * Reconnect to an existing session + * Session resizing + * RDP/VNC proxy (connect to another RDP/VNC server via xrdp) + +### Access to Remote Resources + * two-way clipboard transfer (text, bitmap, file) + * audio redirection + * drive redirection (mount local client drives on remote machine) + +## Quick Start + +Most Linux distributions should distribute the latest release of xrdp in their +repository. You would need xrdp and xorgxrdp packages for the best +experience. It is recommended that xrdp depends on xorgxrdp, so it should +be sufficient to install xrdp. If xorgxrdp is not provided, use Xvnc +server. + +### Ubuntu / Debian +```bash +apt-get install xrdp +``` + +### RedHat / CentOS / Fedora +```bash +yum install xrdp +``` + +## Environment + +**xrdp** primarily targets to GNU/Linux. Tested on x86, x86_64, SPARC and +PowerPC. + +xorgxrdp and RemoteFX Codec have special optimization for x86 and x86_64 using +SIMD instructions. + +FreeBSD is not a primary target of xrdp. It is working on FreeBSD except +for the drive redirection feature. + +Other operating systems such as Mac OS are not supported so far, but we +welcome your contributions. + +## Compiling + +See also https://github.com/neutrinolabs/xrdp/wiki#building-from-sources + +### Prerequisites + +To compile xrdp from the packaged sources, you need basic build tools - a +compiler (**gcc** or **clang**) and the **make** program. Additionally, +you would need **openssl-devel**, **pam-devel**, **libX11-devel**, +**libXfixes-devel**, **libXrandr-devel**. More additional software would +be needed depending on your configuration. + +To compile xrdp from a checked out git repository, you would additionally +need **autoconf**, **automake**, **libtool** and **pkgconfig**. + +### Get the source and build it + +If compiling from the packaged source, unpack the tarball and change to the +resulting directory. + +If compiling from a checked out repository, please make sure you've got the submodules +cloned too (use `git clone --recursive https://github.com/neutrinolabs/xrdp`) + +Then run following commands to compile and install xrdp: +```bash +./bootstrap +./configure +make +sudo make install +``` + +## Directory Structure + +``` +xrdp +├── common ------ common code +├── docs -------- documentation +├── fontdump ---- font dump for Windows +├── genkeymap --- keymap generator +├── instfiles --- installable data file +├── keygen ------ xrdp RSA key pair generator +├── libpainter -- painter library +├── librfxcodec - RFX codec library +├── libxrdp ----- core RDP protocol implementation +├── m4 ---------- Autoconf macros +├── mc ---------- media center module +├── neutrinordp - RDP client module for proxying RDP connections using NeutrinoRDP +├── pkgconfig --- pkg-config configuration +├── rdp --------- RDP client module for connecting to another RDP server +├── sesman ------ session manager for xrdp +├── tcutils ----- QT based utility program for thin clients +├── tests ------- tests for the code +├── vnc --------- VNC client module for xrdp +├── vrplayer ---- QT player redirecting video/audio to clients over xrdpvr channel +├── xorg -------- X11rdp, an Xorg backend for xrdp +├── xrdp -------- main server code +├── xrdpapi ----- virtual channel API +├── xrdpvr ------ API for playing media over RDP +└── xup --------- X11rdp and xorgxrdp client module +``` @@ -28,4 +28,14 @@ then exit 1 fi +if ! test -f libpainter/configure.ac +then + git submodule update --init libpainter +fi + +if ! test -f librfxcodec/configure.ac +then + git submodule update --init librfxcodec +fi + autoreconf -fvi diff --git a/common/Makefile.am b/common/Makefile.am index 8305ede4..0af033a3 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -18,6 +18,12 @@ AM_CPPFLAGS = \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -DXRDP_LOG_PATH=\"${localstatedir}/log\" +if XRDP_DEBUG +AM_CPPFLAGS += -DXRDP_DEBUG +endif + +AM_CFLAGS = $(OPENSSL_CFLAGS) + module_LTLIBRARIES = \ libcommon.la @@ -50,6 +56,6 @@ libcommon_la_SOURCES = \ $(PIXMAN_SOURCES) libcommon_la_LIBADD = \ - -lcrypto \ - -lssl \ - -lpthread + -lpthread \ + $(OPENSSL_LIBS) \ + $(DLOPEN_LIBS) diff --git a/common/arch.h b/common/arch.h index 7070d6ae..dfeaa596 100644 --- a/common/arch.h +++ b/common/arch.h @@ -140,7 +140,7 @@ typedef signed long long tsi64; #ifdef __cplusplus extern "C" { #endif - tintptr mod_init(); + tintptr mod_init(void); int mod_exit(tintptr); #ifdef __cplusplus } diff --git a/common/log.h b/common/log.h index 33bb41fd..d1552ccb 100644 --- a/common/log.h +++ b/common/log.h @@ -57,7 +57,7 @@ enum logReturns /* enable threading */ /*#define LOG_ENABLE_THREAD*/ -#ifdef DEBUG +#ifdef XRDP_DEBUG #define LOG_DBG(args...) log_message(LOG_LEVEL_DEBUG, args); #else #define LOG_DBG(args...) diff --git a/common/os_calls.c b/common/os_calls.c index df08b9e3..5db59caa 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -416,11 +416,27 @@ g_tcp_socket(void) #if defined(XRDP_ENABLE_IPV6) rv = (int)socket(AF_INET6, SOCK_STREAM, 0); + if (rv < 0) + { + log_message(LOG_LEVEL_ERROR, "g_tcp_socket: %s", g_get_strerror()); + + switch (errno) + { + case EAFNOSUPPORT: /* if IPv6 not supported, retry IPv4 */ + log_message(LOG_LEVEL_INFO, "IPv6 not supported, falling back to IPv4"); + rv = (int)socket(AF_INET, SOCK_STREAM, 0); + break; + + default: + return -1; + } + } #else rv = (int)socket(AF_INET, SOCK_STREAM, 0); #endif if (rv < 0) { + log_message(LOG_LEVEL_ERROR, "g_tcp_socket: %s", g_get_strerror()); return -1; } #if defined(XRDP_ENABLE_IPV6) @@ -665,7 +681,7 @@ g_sck_close(int sck) char addr[48]; struct sockaddr_in6 *sock_addr_in6 = &sock_info.sock_addr_in6; - g_snprintf(sockname, sizeof(sockname), "AF_INET6 %s:%d", + g_snprintf(sockname, sizeof(sockname), "AF_INET6 %s port %d", inet_ntop(sock_addr_in6->sin6_family, &sock_addr_in6->sin6_addr, addr, sizeof(addr)), ntohs(sock_addr_in6->sin6_port)); @@ -2515,6 +2531,34 @@ g_htoi(char *str) } /*****************************************************************************/ +/* returns number of bytes copied into out_str */ +int APP_CC +g_bytes_to_hexstr(const void *bytes, int num_bytes, char *out_str, + int bytes_out_str) +{ + int rv; + int index; + char *lout_str; + const tui8 *lbytes; + + rv = 0; + lbytes = (const tui8 *) bytes; + lout_str = out_str; + for (index = 0; index < num_bytes; index++) + { + if (bytes_out_str < 3) + { + break; + } + g_snprintf(lout_str, bytes_out_str, "%2.2x", lbytes[index]); + lout_str += 2; + bytes_out_str -= 2; + rv += 2; + } + return rv; +} + +/*****************************************************************************/ int APP_CC g_pos(const char *str, const char *to_find) { diff --git a/common/os_calls.h b/common/os_calls.h index 00e91a1d..6a206726 100644 --- a/common/os_calls.h +++ b/common/os_calls.h @@ -134,6 +134,8 @@ int APP_CC g_strcasecmp(const char* c1, const char* c2); int APP_CC g_strncasecmp(const char* c1, const char* c2, int len); int APP_CC g_atoi(const char* str); int APP_CC g_htoi(char* str); +int APP_CC g_bytes_to_hexstr(const void *bytes, int num_bytes, char *out_str, + int bytes_out_str); int APP_CC g_pos(const char* str, const char* to_find); int APP_CC g_mbstowcs(twchar* dest, const char* src, int n); int APP_CC g_wcstombs(char* dest, const twchar* src, int n); diff --git a/common/pixman-region.c b/common/pixman-region.c index b1949950..2d199de8 100644 --- a/common/pixman-region.c +++ b/common/pixman-region.c @@ -79,7 +79,7 @@ #define GOOD_RECT(rect) ((rect)->x1 < (rect)->x2 && (rect)->y1 < (rect)->y2) #define BAD_RECT(rect) ((rect)->x1 > (rect)->x2 || (rect)->y1 > (rect)->y2) -#ifdef DEBUG +#ifdef XRDP_DEBUG #define GOOD(reg) \ do \ diff --git a/common/ssl_calls.c b/common/ssl_calls.c index 6e2d8526..16fc55ed 100644 --- a/common/ssl_calls.c +++ b/common/ssl_calls.c @@ -42,7 +42,7 @@ #if OPENSSL_VERSION_NUMBER < 0x10100000L static inline HMAC_CTX * -HMAC_CTX_new() +HMAC_CTX_new(void) { HMAC_CTX *hmac_ctx = g_new(HMAC_CTX, 1); HMAC_CTX_init(hmac_ctx); diff --git a/common/trans.h b/common/trans.h index 73c6d591..26d93dc2 100644 --- a/common/trans.h +++ b/common/trans.h @@ -130,7 +130,5 @@ int APP_CC trans_shutdown_tls_mode(struct trans *self); int APP_CC trans_tcp_force_read_s(struct trans *self, struct stream *in_s, int size); -int APP_CC -trans_force_write_s(struct trans *self, struct stream *out_s); #endif diff --git a/common/xrdp_client_info.h b/common/xrdp_client_info.h index 46589e30..0ef03cfc 100644 --- a/common/xrdp_client_info.h +++ b/common/xrdp_client_info.h @@ -65,7 +65,7 @@ struct xrdp_client_info int rdp_compression; int rdp_autologin; int crypt_level; /* 1, 2, 3 = low, medium, high */ - int channel_code; /* 0 = no channels 1 = channels */ + int channels_allowed; /* 0 = no channels 1 = channels */ int sound_code; /* 1 = leave sound at server */ int is_mce; int rdp5_performanceflags; @@ -145,6 +145,11 @@ struct xrdp_client_info int disableSSLv3; /* 0 = no, 1 = yes */ char tls_ciphers[64]; + + int client_os_major; + int client_os_minor; + + int no_orders_supported; }; #endif diff --git a/common/xrdp_constants.h b/common/xrdp_constants.h index f034a293..6a055678 100644 --- a/common/xrdp_constants.h +++ b/common/xrdp_constants.h @@ -160,6 +160,7 @@ #define RDP_INPUT_CODEPOINT 1 #define RDP_INPUT_VIRTKEY 2 #define RDP_INPUT_SCANCODE 4 +#define RDP_INPUT_UNICODE 5 #define RDP_INPUT_MOUSE 0x8001 #define RDP_INPUT_MOUSEX 0x8002 @@ -217,8 +218,25 @@ /* RDP capabilities */ #define RDP_CAPSET_GENERAL 1 #define RDP_CAPLEN_GENERAL 0x18 -#define OS_MAJOR_TYPE_UNIX 4 -#define OS_MINOR_TYPE_XSERVER 7 +#define OSMAJORTYPE_UNSPECIFIED 0x0000 +#define OSMAJORTYPE_WINDOWS 0x0001 +#define OSMAJORTYPE_OS2 0x0002 +#define OSMAJORTYPE_MACINTOSH 0x0003 +#define OSMAJORTYPE_UNIX 0x0004 +#define OSMAJORTYPE_IOS 0x0005 +#define OSMAJORTYPE_OSX 0x0006 +#define OSMAJORTYPE_ANDROID 0x0007 +#define OSMAJORTYPE_CHROME_OS 0x0008 +#define OSMINORTYPE_UNSPECIFIED 0x0000 +#define OSMINORTYPE_WINDOWS_31X 0x0001 +#define OSMINORTYPE_WINDOWS_95 0x0002 +#define OSMINORTYPE_WINDOWS_NT 0x0003 +#define OSMINORTYPE_OS2_V21 0x0004 +#define OSMINORTYPE_POWER_PC 0x0005 +#define OSMINORTYPE_MACINTOSH 0x0006 +#define OSMINORTYPE_NATIVE_XSERVER 0x0007 +#define OSMINORTYPE_PSEUDO_XSERVER 0x0008 +#define OSMINORTYPE_WINDOWS_RT 0x0009 #define RDP_CAPSET_BITMAP 2 #define RDP_CAPLEN_BITMAP 0x1C @@ -266,6 +284,24 @@ #define RDP_CAPSET_VIRCHAN 20 #define RDP_CAPLEN_VIRCHAN 0x08 +#define RDP_CAPSET_MULTIFRAGMENT 0x001A +#define RDP_CAPLEN_MULTIFRAGMENT 0x08 + +#define RDP_CAPSET_FRAME_ACKNOWLEDGE 0x001E +#define RDP_CAPLEN_FRAME_ACKNOWLEDGE 0x08 + +#define RDP_CAPSET_SURFCMDS 0x1C +#define RDP_CAPLEN_SURFCMDS 0x0C + +#define RDP_CAPSET_BMPCODECS 0x1D +#define RDP_CAPLEN_BMPCODECS 0x1C + +#define RDP_CAPSET_COMPDESK 0x19 +#define RDP_CAPLEN_COMPDESK 0x06 + +#define RDP_CAPSET_LPOINTER 0x1B +#define RDP_CAPLEN_LPOINTER 0x06 + #define RDP_SOURCE "MSTSC" /* Logon flags */ @@ -459,6 +495,40 @@ #define XR_ORDERFLAGS_EX_ALTSEC_FRAME_MARKER_SUPPORT 0x0004 #define XR_ORDERFLAGS_EX_OFFSCREEN_COMPOSITE_SUPPORT 0x0100 +/* orders negotiation indexes */ +#define TS_NEG_DSTBLT_INDEX 0x00 +#define TS_NEG_PATBLT_INDEX 0x01 +#define TS_NEG_SCRBLT_INDEX 0x02 +#define TS_NEG_MEMBLT_INDEX 0x03 +#define TS_NEG_MEM3BLT_INDEX 0x04 + /* 0x05 */ + /* 0x06 */ +#define TS_NEG_DRAWNINEGRID_INDEX 0x07 +#define TS_NEG_LINETO_INDEX 0x08 +#define TS_NEG_MULTI_DRAWNINEGRID_INDEX 0x09 + /* 0x0A */ +#define TS_NEG_SAVEBITMAP_INDEX 0x0B + /* 0x0C */ + /* 0x0D */ + /* 0x0E */ +#define TS_NEG_MULTIDSTBLT_INDEX 0x0F +#define TS_NEG_MULTIPATBLT_INDEX 0x10 +#define TS_NEG_MULTISCRBLT_INDEX 0x11 +#define TS_NEG_MULTIOPAQUERECT_INDEX 0x12 +#define TS_NEG_FAST_INDEX_INDEX 0x13 +#define TS_NEG_POLYGON_SC_INDEX 0x14 +#define TS_NEG_POLYGON_CB_INDEX 0x15 +#define TS_NEG_POLYLINE_INDEX 0x16 + /* 0x17 */ +#define TS_NEG_FAST_GLYPH_INDEX 0x18 +#define TS_NEG_ELLIPSE_SC_INDEX 0x19 +#define TS_NEG_ELLIPSE_CB_INDEX 0x1A +#define TS_NEG_INDEX_INDEX 0x1B + /* 0x1C */ + /* 0x1D */ + /* 0x1E */ + /* 0x1F */ + /* drawable types */ #define WND_TYPE_BITMAP 0 #define WND_TYPE_WND 1 @@ -499,22 +569,6 @@ #define CB_ITEMCHANGE 300 -#define OSMAJORTYPE_UNSPECIFIED 0x0000 -#define OSMAJORTYPE_WINDOWS 0x0001 -#define OSMAJORTYPE_OS2 0x0002 -#define OSMAJORTYPE_MACINTOSH 0x0003 -#define OSMAJORTYPE_UNIX 0x0004 - -#define OSMINORTYPE_UNSPECIFIED 0x0000 -#define OSMINORTYPE_WINDOWS_31X 0x0001 -#define TS_OSMINORTYPE_WINDOWS_95 0x0002 -#define TS_OSMINORTYPE_WINDOWS_NT 0x0003 -#define TS_OSMINORTYPE_OS2_V21 0x0004 - -#define TS_OSMINORTYPE_POWER_PC 0x0005 -#define TS_OSMINORTYPE_MACINTOSH 0x0006 -#define TS_OSMINORTYPE_NATIVE_XSERVER 0x0007 -#define TS_OSMINORTYPE_PSEUDO_XSERVER 0x0008 #define TS_CAPS_PROTOCOLVERSION 0x0200 #define FASTPATH_OUTPUT_SUPPORTED 0x0001 @@ -537,9 +591,9 @@ #define COMPDESK_NOT_SUPPORTED 0x0000 #define COMPDESK_SUPPORTED 0x0001 -#define SURCMDS_SETSURFACEBITS 0x00000002 -#define SURCMDS_FRAMEMARKER 0x00000010 -#define SURCMDS_STREAMSUFRACEBITS 0x00000040 +#define SURFCMDS_SETSURFACEBITS 0x00000002 +#define SURFCMDS_FRAMEMARKER 0x00000010 +#define SURFCMDS_STREAMSUFRACEBITS 0x00000040 /* CODEC_GUID_NSCODEC CA8D1BB9-000F-154F-589FAE2D1A87E2D6 */ #define XR_CODEC_GUID_NSCODEC \ @@ -549,6 +603,10 @@ #define XR_CODEC_GUID_REMOTEFX \ "\x12\x2F\x77\x76\x72\xBD\x63\x44\xAF\xB3\xB7\x3C\x9C\x6F\x78\x86" +/* CODEC_GUID_IMAGE_REMOTEFX 2744CCD4-9D8A-4E74-803C-0ECBEEA19C54 */ +#define XR_CODEC_GUID_IMAGE_REMOTEFX \ + "\xD4\xCC\x44\x27\x8A\x9D\x74\x4E\x80\x3C\x0E\xCB\xEE\xA1\x9C\x54" + /* CODEC_GUID_JPEG 1BAF4CE6-9EED-430C-869ACB8B37B66237 */ #define XR_CODEC_GUID_JPEG \ "\xE6\x4C\xAF\x1B\xED\x9E\x0C\x43\x86\x9A\xCB\x8B\x37\xB6\x62\x37" @@ -561,15 +619,6 @@ #define XR_CODEC_GUID_H264 \ "\x48\x32\x36\x34\x00\x00\x10\x00\x80\x00\x00\xAA\x00\x38\x9B\x71" -#define RDP_CAPSET_SURFCMDS 0x1c -#define RDP_CAPLEN_SURFCMDS 0x0c -#define RDP_CAPSET_BMPCODECS 0x1d -#define RDP_CAPLEN_BMPCODECS 0x1c -#define RDP_CAPSET_COMPDESK 0x19 -#define RDP_CAPLEN_COMPDESK 0x06 -#define RDP_CAPSET_LPOINTER 0x27 -#define RDP_CAPLEN_LPOINTER 0x06 - /* fastpath input */ #define FASTPATH_INPUT_SECURE_CHECKSUM 0x1 #define FASTPATH_INPUT_ENCRYPTED 0x2 @@ -621,4 +670,10 @@ #define XRDP_MAX_BITMAP_CACHE_IDX 2000 #define XRDP_BITMAP_CACHE_ENTRIES 2048 +#define XR_MIN_KEY_CODE 8 +#define XR_MAX_KEY_CODE 256 + +#define XR_RDP_SCAN_LSHIFT 42 +#define XR_RDP_SCAN_ALT 56 + #endif diff --git a/configure.ac b/configure.ac index 94ba2e16..80eda003 100644 --- a/configure.ac +++ b/configure.ac @@ -1,14 +1,20 @@ # Process this file with autoconf to produce a configure script AC_PREREQ(2.65) -AC_INIT([xrdp], [0.9.0], [xrdp-devel@googlegroups.com]) +AC_INIT([xrdp], [0.9.1], [xrdp-devel@googlegroups.com]) AC_CONFIG_HEADERS(config_ac.h:config_ac-h.in) AM_INIT_AUTOMAKE([1.7.2 foreign]) AC_CONFIG_MACRO_DIR([m4]) AC_PROG_CC AC_C_CONST AC_PROG_LIBTOOL + PKG_PROG_PKG_CONFIG +if test "x$PKG_CONFIG" = "x"; then + AC_MSG_ERROR([please install pkg-config]) +fi + +AC_CONFIG_SUBDIRS([libpainter librfxcodec]) # Use silent rules by default if supported by Automake m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -49,15 +55,6 @@ AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_sy AC_ARG_ENABLE(pam, AS_HELP_STRING([--disable-pam], [Build PAM support (default: yes)]), [], [enable_pam=yes]) -AC_ARG_ENABLE(nopam, AS_HELP_STRING([--enable-nopam], - [Build no PAM support (default: no, deprecated)]), - [ - if test "x$enable_nopam" = "xyes" - then - enable_pam=no - AC_MSG_WARN([--enable-nopam option is deprecated. Please use --disable-pam instead.]) - fi - ]) AM_CONDITIONAL(SESMAN_NOPAM, [test x$enable_pam != xyes]) AC_ARG_ENABLE(ipv6, AS_HELP_STRING([--enable-ipv6], [Build IPv6 support (default: no, experimental)]), @@ -77,6 +74,10 @@ AC_ARG_ENABLE(pamuserpass, AS_HELP_STRING([--enable-pamuserpass], [Build pam userpass support (default: no)]), [], [enable_pamuserpass=no]) AM_CONDITIONAL(SESMAN_PAMUSERPASS, [test x$enable_pamuserpass = xyes]) +AC_ARG_ENABLE(pam-config, AS_HELP_STRING([--enable-pam-config=CONF], + [Select PAM config to install: debian, redhat, suse, unix + (default: autodetect)])) + AC_ARG_ENABLE(xrdpdebug, AS_HELP_STRING([--enable-xrdpdebug], [Build debug (default: no)]), [], [enable_xrdpdebug=no]) @@ -117,11 +118,27 @@ AC_ARG_ENABLE(pixman, AS_HELP_STRING([--enable-pixman], [Use pixman library (default: no)]), [], [enable_pixman=no]) AM_CONDITIONAL(XRDP_PIXMAN, [test x$enable_pixman = xyes]) +AM_CONDITIONAL(XRDP_PAINTER, [test x$enable_painter = xyes]) +AC_ARG_ENABLE(painter, AS_HELP_STRING([--enable-painter], + [Use painter library (default: no)]), + [], [enable_painter=no]) +AM_CONDITIONAL(XRDP_PAINTER, [test x$enable_painter = xyes]) + +# Don't fail without working nasm if rfxcodec is not enabled +if test "x$enable_rfxcodec" != xyes; then + with_simd=no + export with_simd +fi + +# Check if -ldl is needed to use dlopen() +DLOPEN_LIBS= +AC_CHECK_FUNC(dlopen, [], + [AC_CHECK_LIB(dl, dlopen, [DLOPEN_LIBS=-ldl])]) +AC_SUBST(DLOPEN_LIBS) # checking for openssl -AC_CHECK_HEADER([openssl/rc4.h], [], - [AC_MSG_ERROR([please install libssl-dev or openssl-devel])], - [#include <stdlib.h>]) +PKG_CHECK_MODULES([OPENSSL], [openssl >= 0], [], + [AC_MSG_ERROR([please install libssl-dev or openssl-devel])]) # checking for pam variation # Linux-PAM is used in Linux systems @@ -143,8 +160,20 @@ then [AC_MSG_ERROR([please install libpam0g-dev or pam-devel])]) fi fi + if test "x$enable_pam_config" = "x"; then + PAM_RULES="auto" + else + pam_config_file="$srcdir/instfiles/pam.d/xrdp-sesman.$enable_pam_config" + if test -f "$pam_config_file"; then + PAM_RULES="$enable_pam_config" + else + AC_MSG_ERROR([PAM file "$pam_config_file" is not available]) + fi + fi fi +AC_SUBST(PAM_RULES) + if test "x$enable_ipv6only" = "xyes" then enable_ipv6=yes @@ -196,7 +225,7 @@ then [AC_MSG_ERROR([please install libmp3lame-dev or lamemp3-devel])]) fi -AS_IF( [test "x$enable_pixman" = "xyes"] , [PKG_CHECK_MODULES(XRDP_PIXMAN, pixman-1 >= 0.1.0)] ) +AS_IF( [test "x$enable_pixman" = "xyes"] , [PKG_CHECK_MODULES(PIXMAN, pixman-1 >= 0.1.0)] ) # checking for TurboJPEG if test "x$enable_tjpeg" = "xyes" @@ -238,7 +267,7 @@ CFLAGS="$CFLAGS $X_CFLAGS" # checking for Xfixes AC_CHECK_HEADER([X11/extensions/Xfixes.h], [], - [AC_MSG_ERROR([please install libx11-dev and libxfixes-dev or libXfixes-devel])], + [AC_MSG_ERROR([please install libxfixes-dev or libXfixes-devel])], [#include <X11/Xlib.h>]) # checking for Xrandr @@ -257,6 +286,8 @@ fi PKG_INSTALLDIR +AC_CHECK_HEADERS([sys/prctl.h]) + AC_CONFIG_FILES([ common/Makefile docs/Makefile diff --git a/docs/man/.gitignore b/docs/man/.gitignore new file mode 100644 index 00000000..28924786 --- /dev/null +++ b/docs/man/.gitignore @@ -0,0 +1 @@ +*.[1-8] diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index 48c26559..705def0c 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -1,4 +1,4 @@ -dist_man_MANS = \ +man_MANS = \ xrdp-dis.1 \ sesman.ini.5 \ xrdp.ini.5 \ @@ -11,7 +11,20 @@ dist_man_MANS = \ xrdp-sesrun.8 \ xrdp-sessvc.8 -noinst_man_MANS = \ - xrdp-xcon.8 +EXTRA_DIST = $(man_MANS:=.in) -EXTRA_DIST = $(noinst_man_MANS) +SUBST_VARS = sed \ + -e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \ + -e 's|@bindir[@]|$(bindir)|g' \ + -e 's|@localstatedir[@]|$(localstatedir)|g' \ + -e 's|@sysconfdir[@]|$(sysconfdir)|g' + +subst_verbose = $(subst_verbose_@AM_V@) +subst_verbose_ = $(subst_verbose_@AM_DEFAULT_V@) +subst_verbose_0 = @echo " SUBST $@"; + +SUFFIXES = .in +.in: + $(subst_verbose)$(SUBST_VARS) $< > $@ + +CLEANFILES = $(man_MANS) diff --git a/docs/man/sesman.ini.5 b/docs/man/sesman.ini.5.in index af9b35ab..28da6ce4 100644 --- a/docs/man/sesman.ini.5 +++ b/docs/man/sesman.ini.5.in @@ -1,5 +1,5 @@ .\" -.TH "sesman.ini" "5" "0.9.0" "xrdp team" "" +.TH "sesman.ini" "5" "@PACKAGE_VERSION@" "xrdp team" "" .SH "NAME" \fBsesman.ini\fR \- Configuration file for \fBxrdp-sesman\fR(8) @@ -196,12 +196,10 @@ Following parameters can be used in the \fB[X11rdp]\fR, \fB[Xvnc]\fR and \fB[Xorg]\fR sections. .TP -\fBparam0\fR=\fIfilename\fR -Path to the X11 server executable - -.TP -\fBparam\fR\fIN\fR=\fIstring\fR -Nth command line argument +\fBparam\fR=\fIstring\fR +Multiple \fIparam\fR lines are supported. This first line specifies the +path to the X11 server executable. Following lines specify command line +arguments passed to the X11 server. .SH "CHANSRV" Following parameters can be used in the \fB[Chansrv]\fR section. @@ -216,7 +214,7 @@ All entries in the \fB[SessionVariables]\fR section are set as environment variables in the user's session. .SH "FILES" -/etc/xrdp/sesman.ini +@sysconfdir@/xrdp/sesman.ini .SH "SEE ALSO" .BR xrdp-sesman (8), diff --git a/docs/man/xrdp-chansrv.8 b/docs/man/xrdp-chansrv.8.in index 9fefea57..332a1907 100644 --- a/docs/man/xrdp-chansrv.8 +++ b/docs/man/xrdp-chansrv.8.in @@ -1,4 +1,4 @@ -.TH "xrdp\-chansrv" "8" "0.9.0" "xrdp team" "" +.TH "xrdp\-chansrv" "8" "@PACKAGE_VERSION@" "xrdp team" "" .SH "NAME" \fBxrdp\-chansrv\fR \- \fBxrdp\fR channel server diff --git a/docs/man/xrdp-dis.1 b/docs/man/xrdp-dis.1.in index dbf0800d..54ba5db2 100644 --- a/docs/man/xrdp-dis.1 +++ b/docs/man/xrdp-dis.1.in @@ -1,4 +1,4 @@ -.TH "xrdp-dis" "1" "0.9.0" "xrdp team" +.TH "xrdp-dis" "1" "@PACKAGE_VERSION@" "xrdp team" .SH NAME xrdp\-dis \- xrdp disconnect utility diff --git a/docs/man/xrdp-genkeymap.8 b/docs/man/xrdp-genkeymap.8.in index c11d8343..c0261051 100644 --- a/docs/man/xrdp-genkeymap.8 +++ b/docs/man/xrdp-genkeymap.8.in @@ -1,4 +1,4 @@ -.TH "xrdp\-genkeymap" "8" "0.9.0" "xrdp team" "" +.TH "xrdp\-genkeymap" "8" "@PACKAGE_VERSION@" "xrdp team" "" .de URL . \\$2 \(laURL: \\$1 \(ra\\$3 .. @@ -21,7 +21,7 @@ The key map information is stored in the file named \fIoutfile\fP. .SH "FILES" .TP -.I /etc/xrdp/km-XXXXXXXX.ini +.I @sysconfdir@/xrdp/km-XXXXXXXX.ini Files containing the keyboard mapping for language \fIXXXXXXXX\fP, which is a 8 digit hexadecimal number identifying the country and language code. .RS 8 .TP diff --git a/docs/man/xrdp-keygen.8 b/docs/man/xrdp-keygen.8.in index b888953a..32d32458 100644 --- a/docs/man/xrdp-keygen.8 +++ b/docs/man/xrdp-keygen.8.in @@ -3,7 +3,7 @@ .\" Copyright © 2007, 2008 Vincent Bernat <bernat@debian.org> .\" License: GPL-2+ .\"- -.TH xrdp\-keygen 8 "0.9.0" "xrdp team" +.TH xrdp\-keygen 8 "@PACKAGE_VERSION@" "xrdp team" .SH NAME xrdp\-keygen \- xrdp RSA key generation utility @@ -15,7 +15,7 @@ xrdp\-keygen \- xrdp RSA key generation utility .SH DESCRIPTION \fBxrdp\-keygen\fP generates the file -.I /etc/xrdp/rsakeys.ini +.I @sysconfdir@/xrdp/rsakeys.ini which contains the RSA key pair used to perform authentication to remote clients. The public key is self-signed. @@ -26,14 +26,14 @@ This program takes one of the following options: Generate a new key pair. The key data is stored in the file named \fIoutfile\fP. .br -If \fBauto\fP is used as \fIoutfile\fP, the default file \fI/etc/xrdp/rsakeys.ini\fP gets created if it does not yet exists. +If \fBauto\fP is used as \fIoutfile\fP, the default file \fI@sysconfdir@/xrdp/rsakeys.ini\fP gets created if it does not yet exists. .TP .B test Generate a test key pair and print information to standard output. .SH FILES .TP -.I /etc/xrdp/rsakeys.ini +.I @sysconfdir@/xrdp/rsakeys.ini RSA public and private key pair used to identify this XRDP server. .SH SEE ALSO diff --git a/docs/man/xrdp-sesadmin.8 b/docs/man/xrdp-sesadmin.8.in index ade1dd58..81ac4ab9 100644 --- a/docs/man/xrdp-sesadmin.8 +++ b/docs/man/xrdp-sesadmin.8.in @@ -1,4 +1,4 @@ -.TH "xrdp-sesadmin" "8" "0.7.0" "xrdp team" +.TH "xrdp-sesadmin" "8" "@PACKAGE_VERSION@" "xrdp team" .SH NAME xrdp\-sesadmin \- console XRDP sessions administration tool diff --git a/docs/man/xrdp-sesman.8 b/docs/man/xrdp-sesman.8.in index db5d4f37..73c8ee42 100644 --- a/docs/man/xrdp-sesman.8 +++ b/docs/man/xrdp-sesman.8.in @@ -1,4 +1,4 @@ -.TH "xrdp\-sesman" "8" "0.9.0" "xrdp team" "" +.TH "xrdp\-sesman" "8" "@PACKAGE_VERSION@" "xrdp team" "" .SH "NAME" xrdp\-sesman \- \fBxrdp\fR(8) session manager @@ -23,15 +23,15 @@ Kills running \fBxrdp\-sesman\fR daemon. Output help information and exit. .SH "FILES" -${SESMAN_BIN_DIR}/sesman +@bindir@/sesman .br -${SESMAN_BIN_DIR}/sesrun +@bindir@/sesrun .br -${SESMAN_CFG_DIR}/sesman.ini +@sysconfdir@/xrdp/sesman.ini .br -${SESMAN_LOG_DIR}/sesman.log +@localstatedir@/log/sesman.log .br -${SESMAN_PID_DIR}/sesman.pid +@localstatedir@/run/sesman.pid .SH "AUTHORS" Jay Sorg <jsorg71@users.sourceforge.net> diff --git a/docs/man/xrdp-sesrun.8 b/docs/man/xrdp-sesrun.8.in index 7ae983c1..86e9129d 100644 --- a/docs/man/xrdp-sesrun.8 +++ b/docs/man/xrdp-sesrun.8.in @@ -1,4 +1,4 @@ -.TH "xrdp\-sesrun" "8" "0.9.0" "xrdp team" "" +.TH "xrdp\-sesrun" "8" "@PACKAGE_VERSION@" "xrdp team" "" .SH "NAME" xrdp\-sesrun \- \fBsesman\fR(8) session launcher @@ -32,9 +32,9 @@ Screen height Session color depth .SH "FILES" -${SESMAN_BIN_DIR}/sesman +@bindir@/sesman .br -${SESMAN_BIN_DIR}/sesrun +@bindir@/sesrun .SH "AUTHORS" Jay Sorg <jsorg71@users.sourceforge.net> diff --git a/docs/man/xrdp-sessvc.8 b/docs/man/xrdp-sessvc.8.in index fc7601b2..92ca7c29 100644 --- a/docs/man/xrdp-sessvc.8 +++ b/docs/man/xrdp-sessvc.8.in @@ -1,4 +1,4 @@ -.TH "xrdp\-sessvc" "8" "0.9.0" "xrdp team" "" +.TH "xrdp\-sessvc" "8" "@PACKAGE_VERSION@" "xrdp team" "" .SH "NAME" xrdp\-sessvc \- \fBxrdp\fR session supervisor diff --git a/docs/man/xrdp-xcon.8 b/docs/man/xrdp-xcon.8 deleted file mode 100644 index 8a530168..00000000 --- a/docs/man/xrdp-xcon.8 +++ /dev/null @@ -1,14 +0,0 @@ -.TH "xrdp-xcon" "8" "0.9.0" "xrdp team" -.SH NAME -xrdp\-xcon \- X11 event loop debugging helper for XRDP - -.SH SYNOPSIS -.B xrdp\-xcon - -.SH DESCRIPTION -.PP -\fBxrdp\-xcon\fP is a X application, which just opens a connection to the X server and polls for events. -It's pretty useless. - -.SH SEE ALSO -.BR xev (1). diff --git a/docs/man/xrdp.8 b/docs/man/xrdp.8.in index 687a525d..d8025d01 100644 --- a/docs/man/xrdp.8 +++ b/docs/man/xrdp.8.in @@ -1,4 +1,4 @@ -.TH "xrdp" "8" "0.9.0" "xrdp team" "" +.TH "xrdp" "8" "@PACKAGE_VERSION@" "xrdp team" "" .SH "NAME" \fBxrdp\fR \- a Remote Desktop Protocol (RDP) server @@ -7,34 +7,34 @@ xrdp [ \-\-nodaemon | \-\-kill | \-\-help ] .SH "DESCRIPTION" \fBxrdp\fR is a Remote Desktop Protocol (RDP) Server. -.br +.br Unlike Windows NT/2000/2003 server, \fBxrdp\fR will not display a Windows desktop but an X window desktop to the user. It can also be used as a VNC\->RDP bridge. .SH "OPTIONS" -.TP -\fB\-n\fR, \fB\-\-nodaemon\fR +.TP +\fB\-n\fR, \fB\-\-nodaemon\fR Starts \fBxrdp\fR in foreground instead of starting it as a daemon. -.TP +.TP \fB\-k\fR, \fB\-\-kill\fR Kills running \fBxrdp\fR daemon. -.TP +.TP \fB\-h\fR, \fB\-\-help\fR Output help information and exit. .SH "FILES" -${XRDP_BIN_DIR}/xrdp -.br -${XRDP_CFG_DIR}/xrdp.ini -.br -${XRDP_LOG_DIR}/xrdp.log -.br -${XRDP_PID_DIR}/xrdp.pid +@bindir@/xrdp +.br +@sysconfdir@/xrdp/xrdp.ini +.br +@localstatedir@/log/xrdp.log +.br +@localstatedir@/run/xrdp.pid .SH "AUTHORS" Jay Sorg <jsorg71@users.sourceforge.net> -.br +.br Simone Fedele <ilsimo@users.sourceforge.net> .SH "SEE ALSO" diff --git a/docs/man/xrdp.ini.5 b/docs/man/xrdp.ini.5.in index 0b5acfee..5a06c7f4 100644 --- a/docs/man/xrdp.ini.5 +++ b/docs/man/xrdp.ini.5.in @@ -1,4 +1,4 @@ -.TH "xrdp.ini" "5" "0.9.0" "xrdp team" "" +.TH "xrdp.ini" "5" "@PACKAGE_VERSION@" "xrdp team" "" .SH "NAME" \fBxrdp.ini\fR \- Configuration file for \fBxrdp\fR(8) @@ -29,9 +29,13 @@ Specify xrdp listening address. If not specified, defaults to 0.0.0.0 (all inter .TP \fBautorun\fP=\fIsession_name\fP -Automatically run the connection specified by \fIsession_name\fP, which must match a section as described below. -By default a drop-down list with all available connections is shown. -A connection can also be chosen by the connecting client by setting the \fBLOGIN DOMAIN\fP to a valid \fIsession name\fP. +Section name for automatic login. If set and the client supplies valid +username and password, the user will be logged in automatically using the +connection specified by \fIsession_name\fP. + +If \fIsession_name\fP is empty, the \fBLOGIN DOMAIN\fR from the client +with be used to select the section. If no domain name is supplied, the +first suitable section will be used for automatic login. .TP \fBbitmap_cache\fR=\fI[true|false]\fR @@ -50,7 +54,7 @@ If set to \fB1\fR, \fBtrue\fR or \fByes\fR this option enables compression of bu .TP \fBkey_file\fP=\fI/path/to/private_key\fP Set location of TLS certificate and private key. They must be written in PEM format. -If not specified, defaults to \fB${XRDP_CFG_DIR}/cert.pem\fP, \fB${XRDP_CFG_DIR}/key.pem\fP. +If not specified, defaults to \fB@sysconfdir@/xrdp/cert.pem\fP, \fB@sysconfdir@/xrdp/key.pem\fP. This parameter is effective only if \fBsecurity_layer\fP is set to \fBtls\fP or \fBnegotiate\fP. @@ -202,8 +206,8 @@ The highest value is 255 (hex FF). The following parameters can be used in the \fB[Logging]\fR section: .TP -\fBLogFile\fR=\fI${SESMAN_LOG_DIR}/sesman.log\fR -This options contains the path to logfile. It can be either absolute or relative, and the default is \fI${SESMAN_LOG_DIR}/sesman.log\fR +\fBLogFile\fR=\fI@localstatedir@/log/sesman.log\fR +This options contains the path to logfile. It can be either absolute or relative.\fR .TP \fBLogLevel\fR=\fIlevel\fR @@ -288,8 +292,15 @@ Specifies the ip address of the host to connect to. Specifies the port number to connect to. If set to \fI\-1\fR, the default port for the specified library is used. .TP -\fBcode\fR=\fI<number>\fR|\fI\-1\fR -Specifies the session type, the default, \fI\0\fR, is Xvnc, \fI\10\fR, is X11rdp, and \fI\20\fR, uses Xorg driver mode. +\fBxserverbpp\fR=\fI<number>\fR +Specifies color depth of the backend X server. The default is the color +depth of the client. Only Xvnc and X11rdp use that setting. Xorg runs at +\fI24\fR bpp. + +.TP +\fBcode\fR=\fI<number>\fR|\fI0\fR +Specifies the session type. The default, \fI0\fR, is Xvnc, \fI10\fR is +X11rdp, and \fI20\fR is Xorg with xorgxrdp modules. .SH "EXAMPLES" This is an example \fBxrdp.ini\fR: @@ -309,7 +320,7 @@ port=\-1 .fi .SH "FILES" -${XRDP_CFG_DIR}/xrdp.ini +@sysconfdir@/xrdp/xrdp.ini .SH "SEE ALSO" .BR xrdp (8), diff --git a/genkeymap/Makefile.am b/genkeymap/Makefile.am index 25767395..8c295170 100644 --- a/genkeymap/Makefile.am +++ b/genkeymap/Makefile.am @@ -1,3 +1,7 @@ +EXTRA_DIST = \ + dump-keymaps.sh \ + readme.txt + AM_CFLAGS = $(X_CFLAGS) bin_PROGRAMS = \ diff --git a/genkeymap/dump-keymaps.sh b/genkeymap/dump-keymaps.sh index d47f13eb..e22610a0 100755 --- a/genkeymap/dump-keymaps.sh +++ b/genkeymap/dump-keymaps.sh @@ -24,11 +24,8 @@ setxkbmap -model pc104 -layout it ./xrdp-genkeymap ../instfiles/km-00000410.ini # Japanese 'jp' 0x00000411 -setxkbmap -model jp106 -layout jp -variant OADG109A +setxkbmap -model pc105 -layout jp -variant OADG109A ./xrdp-genkeymap ../instfiles/km-00000411.ini -./xrdp-genkeymap ../instfiles/km-e0010411.ini -./xrdp-genkeymap ../instfiles/km-e0200411.ini -./xrdp-genkeymap ../instfiles/km-e0210411.ini # Polish 'pl' 0x00000415 setxkbmap -model pc104 -layout pl diff --git a/instfiles/Makefile.am b/instfiles/Makefile.am index 50d31a8e..92cc9cf2 100644 --- a/instfiles/Makefile.am +++ b/instfiles/Makefile.am @@ -1,4 +1,5 @@ EXTRA_DIST = \ + keymap-names.txt \ xrdp.sh \ xrdp-sesman.service \ xrdp.service @@ -16,6 +17,7 @@ dist_startscript_DATA = \ km-0000040c.ini \ km-00000410.ini \ km-00000411.ini \ + km-00000412.ini \ km-00000414.ini \ km-00000415.ini \ km-00000416.ini \ @@ -26,10 +28,7 @@ dist_startscript_DATA = \ km-0000080c.ini \ km-00000813.ini \ km-00000816.ini \ - km-0000100c.ini \ - km-e0010411.ini \ - km-e0200411.ini \ - km-e0210411.ini + km-0000100c.ini # # platform specific files diff --git a/instfiles/km-e0010411.ini b/instfiles/km-00000412.ini index e860e6fd..e8cb305e 100644 --- a/instfiles/km-e0010411.ini +++ b/instfiles/km-00000412.ini @@ -1,1055 +1,1057 @@ -[noshift] -Key8=65406:0 -Key9=65307:27 -Key10=49:49 -Key11=50:50 -Key12=51:51 -Key13=52:52 -Key14=53:53 -Key15=54:54 -Key16=55:55 -Key17=56:56 -Key18=57:57 -Key19=48:48 -Key20=45:45 -Key21=94:94 -Key22=65288:8 -Key23=65289:9 -Key24=113:113 -Key25=119:119 -Key26=101:101 -Key27=114:114 -Key28=116:116 -Key29=121:121 -Key30=117:117 -Key31=105:105 -Key32=111:111 -Key33=112:112 -Key34=64:64 -Key35=91:91 -Key36=65293:13 -Key37=65507:0 -Key38=97:97 -Key39=115:115 -Key40=100:100 -Key41=102:102 -Key42=103:103 -Key43=104:104 -Key44=106:106 -Key45=107:107 -Key46=108:108 -Key47=59:59 -Key48=58:58 -Key49=65322:0 -Key50=65505:0 -Key51=93:93 -Key52=122:122 -Key53=120:120 -Key54=99:99 -Key55=118:118 -Key56=98:98 -Key57=110:110 -Key58=109:109 -Key59=44:44 -Key60=46:46 -Key61=47:47 -Key62=65506:0 -Key63=65450:42 -Key64=65513:0 -Key65=32:32 -Key66=65328:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65429:0 -Key80=65431:0 -Key81=65434:0 -Key82=65453:45 -Key83=65430:0 -Key84=65437:0 -Key85=65432:0 -Key86=65451:43 -Key87=65436:0 -Key88=65433:0 -Key89=65435:0 -Key90=65438:0 -Key91=65439:0 -Key92=65377:0 -Key93=0:0 -Key94=60:60 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65514:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=92:92 -Key124=65027:0 -Key125=0:0 -Key126=65469:61 -Key127=0:0 -Key128=0:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=165:165 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[shift] -Key8=65406:0 -Key9=65307:27 -Key10=33:33 -Key11=34:34 -Key12=35:35 -Key13=36:36 -Key14=37:37 -Key15=38:38 -Key16=39:39 -Key17=40:40 -Key18=41:41 -Key19=48:48 -Key20=61:61 -Key21=126:126 -Key22=65288:8 -Key23=65056:0 -Key24=81:81 -Key25=87:87 -Key26=69:69 -Key27=82:82 -Key28=84:84 -Key29=89:89 -Key30=85:85 -Key31=73:73 -Key32=79:79 -Key33=80:80 -Key34=96:96 -Key35=123:123 -Key36=65293:13 -Key37=65507:0 -Key38=65:65 -Key39=83:83 -Key40=68:68 -Key41=70:70 -Key42=71:71 -Key43=72:72 -Key44=74:74 -Key45=75:75 -Key46=76:76 -Key47=43:43 -Key48=42:42 -Key49=65322:0 -Key50=65505:0 -Key51=125:125 -Key52=90:90 -Key53=88:88 -Key54=67:67 -Key55=86:86 -Key56=66:66 -Key57=78:78 -Key58=77:77 -Key59=60:60 -Key60=62:62 -Key61=63:63 -Key62=65506:0 -Key63=65450:42 -Key64=65511:0 -Key65=32:32 -Key66=65509:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65463:55 -Key80=65464:56 -Key81=65465:57 -Key82=65453:45 -Key83=65460:52 -Key84=65461:53 -Key85=65462:54 -Key86=65451:43 -Key87=65457:49 -Key88=65458:50 -Key89=65459:51 -Key90=65456:48 -Key91=65454:46 -Key92=65377:0 -Key93=0:0 -Key94=62:62 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65512:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=95:95 -Key124=65027:0 -Key125=65513:0 -Key126=65469:61 -Key127=65515:0 -Key128=65517:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=124:124 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[altgr] -Key8=65406:0 -Key9=65307:27 -Key10=49:49 -Key11=50:50 -Key12=51:51 -Key13=52:52 -Key14=53:53 -Key15=54:54 -Key16=55:55 -Key17=56:56 -Key18=57:57 -Key19=48:48 -Key20=45:45 -Key21=94:94 -Key22=65288:8 -Key23=65289:9 -Key24=113:113 -Key25=119:119 -Key26=101:101 -Key27=114:114 -Key28=116:116 -Key29=121:121 -Key30=117:117 -Key31=105:105 -Key32=111:111 -Key33=112:112 -Key34=64:64 -Key35=91:91 -Key36=65293:13 -Key37=65507:0 -Key38=97:97 -Key39=115:115 -Key40=100:100 -Key41=102:102 -Key42=103:103 -Key43=104:104 -Key44=106:106 -Key45=107:107 -Key46=108:108 -Key47=59:59 -Key48=58:58 -Key49=65322:0 -Key50=65505:0 -Key51=93:93 -Key52=122:122 -Key53=120:120 -Key54=99:99 -Key55=118:118 -Key56=98:98 -Key57=110:110 -Key58=109:109 -Key59=44:44 -Key60=46:46 -Key61=47:47 -Key62=65506:0 -Key63=65450:42 -Key64=65513:0 -Key65=32:32 -Key66=65328:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65429:0 -Key80=65431:0 -Key81=65434:0 -Key82=65453:45 -Key83=65430:0 -Key84=65437:0 -Key85=65432:0 -Key86=65451:43 -Key87=65436:0 -Key88=65433:0 -Key89=65435:0 -Key90=65438:0 -Key91=65439:0 -Key92=65377:0 -Key93=0:0 -Key94=124:124 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65514:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=0:0 -Key124=65027:0 -Key125=0:0 -Key126=65469:61 -Key127=0:0 -Key128=0:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=165:165 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[shiftaltgr] -Key8=65406:0 -Key9=65307:27 -Key10=33:33 -Key11=34:34 -Key12=35:35 -Key13=36:36 -Key14=37:37 -Key15=38:38 -Key16=39:39 -Key17=40:40 -Key18=41:41 -Key19=48:48 -Key20=61:61 -Key21=126:126 -Key22=65288:8 -Key23=65056:0 -Key24=81:81 -Key25=87:87 -Key26=69:69 -Key27=82:82 -Key28=84:84 -Key29=89:89 -Key30=85:85 -Key31=73:73 -Key32=79:79 -Key33=80:80 -Key34=96:96 -Key35=123:123 -Key36=65293:13 -Key37=65507:0 -Key38=65:65 -Key39=83:83 -Key40=68:68 -Key41=70:70 -Key42=71:71 -Key43=72:72 -Key44=74:74 -Key45=75:75 -Key46=76:76 -Key47=43:43 -Key48=42:42 -Key49=65322:0 -Key50=65505:0 -Key51=125:125 -Key52=90:90 -Key53=88:88 -Key54=67:67 -Key55=86:86 -Key56=66:66 -Key57=78:78 -Key58=77:77 -Key59=60:60 -Key60=62:62 -Key61=63:63 -Key62=65506:0 -Key63=65450:42 -Key64=65511:0 -Key65=32:32 -Key66=65509:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65463:55 -Key80=65464:56 -Key81=65465:57 -Key82=65453:45 -Key83=65460:52 -Key84=65461:53 -Key85=65462:54 -Key86=65451:43 -Key87=65457:49 -Key88=65458:50 -Key89=65459:51 -Key90=65456:48 -Key91=65454:46 -Key92=65377:0 -Key93=0:0 -Key94=166:166 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65512:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=0:0 -Key124=65027:0 -Key125=65513:0 -Key126=65469:61 -Key127=65515:0 -Key128=65517:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=124:124 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[capslock] -Key8=65406:0 -Key9=65307:27 -Key10=49:49 -Key11=50:50 -Key12=51:51 -Key13=52:52 -Key14=53:53 -Key15=54:54 -Key16=55:55 -Key17=56:56 -Key18=57:57 -Key19=48:48 -Key20=45:45 -Key21=94:94 -Key22=65288:8 -Key23=65289:9 -Key24=81:81 -Key25=87:87 -Key26=69:69 -Key27=82:82 -Key28=84:84 -Key29=89:89 -Key30=85:85 -Key31=73:73 -Key32=79:79 -Key33=80:80 -Key34=64:64 -Key35=91:91 -Key36=65293:13 -Key37=65507:0 -Key38=65:65 -Key39=83:83 -Key40=68:68 -Key41=70:70 -Key42=71:71 -Key43=72:72 -Key44=74:74 -Key45=75:75 -Key46=76:76 -Key47=59:59 -Key48=58:58 -Key49=65322:0 -Key50=65505:0 -Key51=93:93 -Key52=90:90 -Key53=88:88 -Key54=67:67 -Key55=86:86 -Key56=66:66 -Key57=78:78 -Key58=77:77 -Key59=44:44 -Key60=46:46 -Key61=47:47 -Key62=65506:0 -Key63=65450:42 -Key64=65513:0 -Key65=32:32 -Key66=65328:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65429:0 -Key80=65431:0 -Key81=65434:0 -Key82=65453:45 -Key83=65430:0 -Key84=65437:0 -Key85=65432:0 -Key86=65451:43 -Key87=65436:0 -Key88=65433:0 -Key89=65435:0 -Key90=65438:0 -Key91=65439:0 -Key92=65377:0 -Key93=0:0 -Key94=60:60 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65514:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=0:0 -Key124=65027:0 -Key125=0:0 -Key126=65469:61 -Key127=0:0 -Key128=0:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=165:165 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[capslockaltgr] -Key8=65406:0 -Key9=65307:27 -Key10=49:49 -Key11=50:50 -Key12=51:51 -Key13=52:52 -Key14=53:53 -Key15=54:54 -Key16=55:55 -Key17=56:56 -Key18=57:57 -Key19=48:48 -Key20=45:45 -Key21=94:94 -Key22=65288:8 -Key23=65289:9 -Key24=81:81 -Key25=87:87 -Key26=69:69 -Key27=82:82 -Key28=84:84 -Key29=89:89 -Key30=85:85 -Key31=73:73 -Key32=79:79 -Key33=80:80 -Key34=64:64 -Key35=91:91 -Key36=65293:13 -Key37=65507:0 -Key38=65:65 -Key39=83:83 -Key40=68:68 -Key41=70:70 -Key42=71:71 -Key43=72:72 -Key44=74:74 -Key45=75:75 -Key46=76:76 -Key47=59:59 -Key48=58:58 -Key49=65322:0 -Key50=65505:0 -Key51=93:93 -Key52=90:90 -Key53=88:88 -Key54=67:67 -Key55=86:86 -Key56=66:66 -Key57=78:78 -Key58=77:77 -Key59=44:44 -Key60=46:46 -Key61=47:47 -Key62=65506:0 -Key63=65450:42 -Key64=65513:0 -Key65=32:32 -Key66=65328:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65429:0 -Key80=65431:0 -Key81=65434:0 -Key82=65453:45 -Key83=65430:0 -Key84=65437:0 -Key85=65432:0 -Key86=65451:43 -Key87=65436:0 -Key88=65433:0 -Key89=65435:0 -Key90=65438:0 -Key91=65439:0 -Key92=65377:0 -Key93=0:0 -Key94=124:124 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65514:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=0:0 -Key124=65027:0 -Key125=0:0 -Key126=65469:61 -Key127=0:0 -Key128=0:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=165:165 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[shiftcapslock] -Key8=65406:0 -Key9=65307:27 -Key10=33:33 -Key11=34:34 -Key12=35:35 -Key13=36:36 -Key14=37:37 -Key15=38:38 -Key16=39:39 -Key17=40:40 -Key18=41:41 -Key19=48:48 -Key20=61:61 -Key21=126:126 -Key22=65288:8 -Key23=65056:0 -Key24=113:113 -Key25=119:119 -Key26=101:101 -Key27=114:114 -Key28=116:116 -Key29=121:121 -Key30=117:117 -Key31=105:105 -Key32=111:111 -Key33=112:112 -Key34=96:96 -Key35=123:123 -Key36=65293:13 -Key37=65507:0 -Key38=97:97 -Key39=115:115 -Key40=100:100 -Key41=102:102 -Key42=103:103 -Key43=104:104 -Key44=106:106 -Key45=107:107 -Key46=108:108 -Key47=43:43 -Key48=42:42 -Key49=65322:0 -Key50=65505:0 -Key51=125:125 -Key52=122:122 -Key53=120:120 -Key54=99:99 -Key55=118:118 -Key56=98:98 -Key57=110:110 -Key58=109:109 -Key59=60:60 -Key60=62:62 -Key61=63:63 -Key62=65506:0 -Key63=65450:42 -Key64=65511:0 -Key65=32:32 -Key66=65509:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65463:55 -Key80=65464:56 -Key81=65465:57 -Key82=65453:45 -Key83=65460:52 -Key84=65461:53 -Key85=65462:54 -Key86=65451:43 -Key87=65457:49 -Key88=65458:50 -Key89=65459:51 -Key90=65456:48 -Key91=65454:46 -Key92=65377:0 -Key93=0:0 -Key94=62:62 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65512:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=0:0 -Key124=65027:0 -Key125=65513:0 -Key126=65469:61 -Key127=65515:0 -Key128=65517:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=124:124 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[shiftcapslockaltgr] -Key8=65406:0 -Key9=65307:27 -Key10=33:33 -Key11=34:34 -Key12=35:35 -Key13=36:36 -Key14=37:37 -Key15=38:38 -Key16=39:39 -Key17=40:40 -Key18=41:41 -Key19=48:48 -Key20=61:61 -Key21=126:126 -Key22=65288:8 -Key23=65056:0 -Key24=113:113 -Key25=119:119 -Key26=101:101 -Key27=114:114 -Key28=116:116 -Key29=121:121 -Key30=117:117 -Key31=105:105 -Key32=111:111 -Key33=112:112 -Key34=96:96 -Key35=123:123 -Key36=65293:13 -Key37=65507:0 -Key38=97:97 -Key39=115:115 -Key40=100:100 -Key41=102:102 -Key42=103:103 -Key43=104:104 -Key44=106:106 -Key45=107:107 -Key46=108:108 -Key47=43:43 -Key48=42:42 -Key49=65322:0 -Key50=65505:0 -Key51=125:125 -Key52=122:122 -Key53=120:120 -Key54=99:99 -Key55=118:118 -Key56=98:98 -Key57=110:110 -Key58=109:109 -Key59=60:60 -Key60=62:62 -Key61=63:63 -Key62=65506:0 -Key63=65450:42 -Key64=65511:0 -Key65=32:32 -Key66=65509:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65463:55 -Key80=65464:56 -Key81=65465:57 -Key82=65453:45 -Key83=65460:52 -Key84=65461:53 -Key85=65462:54 -Key86=65451:43 -Key87=65457:49 -Key88=65458:50 -Key89=65459:51 -Key90=65456:48 -Key91=65454:46 -Key92=65377:0 -Key93=0:0 -Key94=166:166 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65512:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=0:0 -Key124=65027:0 -Key125=65513:0 -Key126=65469:61 -Key127=65515:0 -Key128=65517:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=124:124 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 +[noshift]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=61:61
+Key22=65288:8
+Key23=65289:9
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=91:91
+Key35=93:93
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=59:59
+Key48=39:39
+Key49=96:96
+Key50=65505:0
+Key51=92:92
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=0:0
+Key93=0:0
+Key94=60:60
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=0:0
+Key115=65515:0
+Key116=65516:0
+Key117=65383:0
+Key118=0:0
+Key119=0:0
+Key120=0:0
+Key121=0:0
+Key122=0:0
+Key123=0:0
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=0:0
+Key134=65454:46
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shift]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=64:64
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=94:94
+Key16=38:38
+Key17=42:42
+Key18=40:40
+Key19=41:41
+Key20=95:95
+Key21=43:43
+Key22=65288:8
+Key23=65056:0
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=123:123
+Key35=125:125
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=58:58
+Key48=34:34
+Key49=126:126
+Key50=65505:0
+Key51=124:124
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=0:0
+Key93=0:0
+Key94=62:62
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=0:0
+Key115=65515:0
+Key116=65516:0
+Key117=65383:0
+Key118=0:0
+Key119=0:0
+Key120=0:0
+Key121=0:0
+Key122=0:0
+Key123=0:0
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=0:0
+Key134=65454:46
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[altgr]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=61:61
+Key22=65288:8
+Key23=65289:9
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=91:91
+Key35=93:93
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=59:59
+Key48=39:39
+Key49=96:96
+Key50=65505:0
+Key51=92:92
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=0:0
+Key93=0:0
+Key94=124:124
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=0:0
+Key115=65515:0
+Key116=65516:0
+Key117=65383:0
+Key118=0:0
+Key119=0:0
+Key120=0:0
+Key121=0:0
+Key122=0:0
+Key123=0:0
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=0:0
+Key134=65454:46
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shiftaltgr]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=64:64
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=94:94
+Key16=38:38
+Key17=42:42
+Key18=40:40
+Key19=41:41
+Key20=95:95
+Key21=43:43
+Key22=65288:8
+Key23=65056:0
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=123:123
+Key35=125:125
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=58:58
+Key48=34:34
+Key49=126:126
+Key50=65505:0
+Key51=124:124
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=0:0
+Key93=0:0
+Key94=166:166
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=0:0
+Key115=65515:0
+Key116=65516:0
+Key117=65383:0
+Key118=0:0
+Key119=0:0
+Key120=0:0
+Key121=0:0
+Key122=0:0
+Key123=0:0
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=0:0
+Key134=65454:46
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[capslock]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=61:61
+Key22=65288:8
+Key23=65289:9
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=91:91
+Key35=93:93
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=59:59
+Key48=39:39
+Key49=96:96
+Key50=65505:0
+Key51=92:92
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=0:0
+Key93=0:0
+Key94=60:60
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=0:0
+Key115=65515:0
+Key116=65516:0
+Key117=65383:0
+Key118=0:0
+Key119=0:0
+Key120=0:0
+Key121=0:0
+Key122=0:0
+Key123=0:0
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=0:0
+Key134=65454:46
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[capslockaltgr]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=61:61
+Key22=65288:8
+Key23=65289:9
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=91:91
+Key35=93:93
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=59:59
+Key48=39:39
+Key49=96:96
+Key50=65505:0
+Key51=92:92
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=0:0
+Key93=0:0
+Key94=124:124
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=0:0
+Key115=65515:0
+Key116=65516:0
+Key117=65383:0
+Key118=0:0
+Key119=0:0
+Key120=0:0
+Key121=0:0
+Key122=0:0
+Key123=0:0
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=0:0
+Key134=65454:46
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shiftcapslock]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=64:64
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=94:94
+Key16=38:38
+Key17=42:42
+Key18=40:40
+Key19=41:41
+Key20=95:95
+Key21=43:43
+Key22=65288:8
+Key23=65056:0
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=123:123
+Key35=125:125
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=58:58
+Key48=34:34
+Key49=126:126
+Key50=65505:0
+Key51=124:124
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=0:0
+Key93=0:0
+Key94=62:62
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=0:0
+Key115=65515:0
+Key116=65516:0
+Key117=65383:0
+Key118=0:0
+Key119=0:0
+Key120=0:0
+Key121=0:0
+Key122=0:0
+Key123=0:0
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=0:0
+Key134=65454:46
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shiftcapslockaltgr]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=64:64
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=94:94
+Key16=38:38
+Key17=42:42
+Key18=40:40
+Key19=41:41
+Key20=95:95
+Key21=43:43
+Key22=65288:8
+Key23=65056:0
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=123:123
+Key35=125:125
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=58:58
+Key48=34:34
+Key49=126:126
+Key50=65505:0
+Key51=124:124
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=0:0
+Key93=0:0
+Key94=166:166
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=0:0
+Key115=65515:0
+Key116=65516:0
+Key117=65383:0
+Key118=0:0
+Key119=0:0
+Key120=0:0
+Key121=0:0
+Key122=0:0
+Key123=0:0
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=0:0
+Key134=65454:46
+Key135=0:0
+Key136=0:0
+Key137=0:0
+Key209=65329:0
+Key210=65332:0
diff --git a/instfiles/km-e0200411.ini b/instfiles/km-e0200411.ini deleted file mode 100644 index e860e6fd..00000000 --- a/instfiles/km-e0200411.ini +++ /dev/null @@ -1,1055 +0,0 @@ -[noshift] -Key8=65406:0 -Key9=65307:27 -Key10=49:49 -Key11=50:50 -Key12=51:51 -Key13=52:52 -Key14=53:53 -Key15=54:54 -Key16=55:55 -Key17=56:56 -Key18=57:57 -Key19=48:48 -Key20=45:45 -Key21=94:94 -Key22=65288:8 -Key23=65289:9 -Key24=113:113 -Key25=119:119 -Key26=101:101 -Key27=114:114 -Key28=116:116 -Key29=121:121 -Key30=117:117 -Key31=105:105 -Key32=111:111 -Key33=112:112 -Key34=64:64 -Key35=91:91 -Key36=65293:13 -Key37=65507:0 -Key38=97:97 -Key39=115:115 -Key40=100:100 -Key41=102:102 -Key42=103:103 -Key43=104:104 -Key44=106:106 -Key45=107:107 -Key46=108:108 -Key47=59:59 -Key48=58:58 -Key49=65322:0 -Key50=65505:0 -Key51=93:93 -Key52=122:122 -Key53=120:120 -Key54=99:99 -Key55=118:118 -Key56=98:98 -Key57=110:110 -Key58=109:109 -Key59=44:44 -Key60=46:46 -Key61=47:47 -Key62=65506:0 -Key63=65450:42 -Key64=65513:0 -Key65=32:32 -Key66=65328:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65429:0 -Key80=65431:0 -Key81=65434:0 -Key82=65453:45 -Key83=65430:0 -Key84=65437:0 -Key85=65432:0 -Key86=65451:43 -Key87=65436:0 -Key88=65433:0 -Key89=65435:0 -Key90=65438:0 -Key91=65439:0 -Key92=65377:0 -Key93=0:0 -Key94=60:60 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65514:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=92:92 -Key124=65027:0 -Key125=0:0 -Key126=65469:61 -Key127=0:0 -Key128=0:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=165:165 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[shift] -Key8=65406:0 -Key9=65307:27 -Key10=33:33 -Key11=34:34 -Key12=35:35 -Key13=36:36 -Key14=37:37 -Key15=38:38 -Key16=39:39 -Key17=40:40 -Key18=41:41 -Key19=48:48 -Key20=61:61 -Key21=126:126 -Key22=65288:8 -Key23=65056:0 -Key24=81:81 -Key25=87:87 -Key26=69:69 -Key27=82:82 -Key28=84:84 -Key29=89:89 -Key30=85:85 -Key31=73:73 -Key32=79:79 -Key33=80:80 -Key34=96:96 -Key35=123:123 -Key36=65293:13 -Key37=65507:0 -Key38=65:65 -Key39=83:83 -Key40=68:68 -Key41=70:70 -Key42=71:71 -Key43=72:72 -Key44=74:74 -Key45=75:75 -Key46=76:76 -Key47=43:43 -Key48=42:42 -Key49=65322:0 -Key50=65505:0 -Key51=125:125 -Key52=90:90 -Key53=88:88 -Key54=67:67 -Key55=86:86 -Key56=66:66 -Key57=78:78 -Key58=77:77 -Key59=60:60 -Key60=62:62 -Key61=63:63 -Key62=65506:0 -Key63=65450:42 -Key64=65511:0 -Key65=32:32 -Key66=65509:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65463:55 -Key80=65464:56 -Key81=65465:57 -Key82=65453:45 -Key83=65460:52 -Key84=65461:53 -Key85=65462:54 -Key86=65451:43 -Key87=65457:49 -Key88=65458:50 -Key89=65459:51 -Key90=65456:48 -Key91=65454:46 -Key92=65377:0 -Key93=0:0 -Key94=62:62 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65512:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=95:95 -Key124=65027:0 -Key125=65513:0 -Key126=65469:61 -Key127=65515:0 -Key128=65517:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=124:124 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[altgr] -Key8=65406:0 -Key9=65307:27 -Key10=49:49 -Key11=50:50 -Key12=51:51 -Key13=52:52 -Key14=53:53 -Key15=54:54 -Key16=55:55 -Key17=56:56 -Key18=57:57 -Key19=48:48 -Key20=45:45 -Key21=94:94 -Key22=65288:8 -Key23=65289:9 -Key24=113:113 -Key25=119:119 -Key26=101:101 -Key27=114:114 -Key28=116:116 -Key29=121:121 -Key30=117:117 -Key31=105:105 -Key32=111:111 -Key33=112:112 -Key34=64:64 -Key35=91:91 -Key36=65293:13 -Key37=65507:0 -Key38=97:97 -Key39=115:115 -Key40=100:100 -Key41=102:102 -Key42=103:103 -Key43=104:104 -Key44=106:106 -Key45=107:107 -Key46=108:108 -Key47=59:59 -Key48=58:58 -Key49=65322:0 -Key50=65505:0 -Key51=93:93 -Key52=122:122 -Key53=120:120 -Key54=99:99 -Key55=118:118 -Key56=98:98 -Key57=110:110 -Key58=109:109 -Key59=44:44 -Key60=46:46 -Key61=47:47 -Key62=65506:0 -Key63=65450:42 -Key64=65513:0 -Key65=32:32 -Key66=65328:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65429:0 -Key80=65431:0 -Key81=65434:0 -Key82=65453:45 -Key83=65430:0 -Key84=65437:0 -Key85=65432:0 -Key86=65451:43 -Key87=65436:0 -Key88=65433:0 -Key89=65435:0 -Key90=65438:0 -Key91=65439:0 -Key92=65377:0 -Key93=0:0 -Key94=124:124 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65514:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=0:0 -Key124=65027:0 -Key125=0:0 -Key126=65469:61 -Key127=0:0 -Key128=0:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=165:165 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[shiftaltgr] -Key8=65406:0 -Key9=65307:27 -Key10=33:33 -Key11=34:34 -Key12=35:35 -Key13=36:36 -Key14=37:37 -Key15=38:38 -Key16=39:39 -Key17=40:40 -Key18=41:41 -Key19=48:48 -Key20=61:61 -Key21=126:126 -Key22=65288:8 -Key23=65056:0 -Key24=81:81 -Key25=87:87 -Key26=69:69 -Key27=82:82 -Key28=84:84 -Key29=89:89 -Key30=85:85 -Key31=73:73 -Key32=79:79 -Key33=80:80 -Key34=96:96 -Key35=123:123 -Key36=65293:13 -Key37=65507:0 -Key38=65:65 -Key39=83:83 -Key40=68:68 -Key41=70:70 -Key42=71:71 -Key43=72:72 -Key44=74:74 -Key45=75:75 -Key46=76:76 -Key47=43:43 -Key48=42:42 -Key49=65322:0 -Key50=65505:0 -Key51=125:125 -Key52=90:90 -Key53=88:88 -Key54=67:67 -Key55=86:86 -Key56=66:66 -Key57=78:78 -Key58=77:77 -Key59=60:60 -Key60=62:62 -Key61=63:63 -Key62=65506:0 -Key63=65450:42 -Key64=65511:0 -Key65=32:32 -Key66=65509:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65463:55 -Key80=65464:56 -Key81=65465:57 -Key82=65453:45 -Key83=65460:52 -Key84=65461:53 -Key85=65462:54 -Key86=65451:43 -Key87=65457:49 -Key88=65458:50 -Key89=65459:51 -Key90=65456:48 -Key91=65454:46 -Key92=65377:0 -Key93=0:0 -Key94=166:166 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65512:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=0:0 -Key124=65027:0 -Key125=65513:0 -Key126=65469:61 -Key127=65515:0 -Key128=65517:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=124:124 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[capslock] -Key8=65406:0 -Key9=65307:27 -Key10=49:49 -Key11=50:50 -Key12=51:51 -Key13=52:52 -Key14=53:53 -Key15=54:54 -Key16=55:55 -Key17=56:56 -Key18=57:57 -Key19=48:48 -Key20=45:45 -Key21=94:94 -Key22=65288:8 -Key23=65289:9 -Key24=81:81 -Key25=87:87 -Key26=69:69 -Key27=82:82 -Key28=84:84 -Key29=89:89 -Key30=85:85 -Key31=73:73 -Key32=79:79 -Key33=80:80 -Key34=64:64 -Key35=91:91 -Key36=65293:13 -Key37=65507:0 -Key38=65:65 -Key39=83:83 -Key40=68:68 -Key41=70:70 -Key42=71:71 -Key43=72:72 -Key44=74:74 -Key45=75:75 -Key46=76:76 -Key47=59:59 -Key48=58:58 -Key49=65322:0 -Key50=65505:0 -Key51=93:93 -Key52=90:90 -Key53=88:88 -Key54=67:67 -Key55=86:86 -Key56=66:66 -Key57=78:78 -Key58=77:77 -Key59=44:44 -Key60=46:46 -Key61=47:47 -Key62=65506:0 -Key63=65450:42 -Key64=65513:0 -Key65=32:32 -Key66=65328:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65429:0 -Key80=65431:0 -Key81=65434:0 -Key82=65453:45 -Key83=65430:0 -Key84=65437:0 -Key85=65432:0 -Key86=65451:43 -Key87=65436:0 -Key88=65433:0 -Key89=65435:0 -Key90=65438:0 -Key91=65439:0 -Key92=65377:0 -Key93=0:0 -Key94=60:60 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65514:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=0:0 -Key124=65027:0 -Key125=0:0 -Key126=65469:61 -Key127=0:0 -Key128=0:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=165:165 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[capslockaltgr] -Key8=65406:0 -Key9=65307:27 -Key10=49:49 -Key11=50:50 -Key12=51:51 -Key13=52:52 -Key14=53:53 -Key15=54:54 -Key16=55:55 -Key17=56:56 -Key18=57:57 -Key19=48:48 -Key20=45:45 -Key21=94:94 -Key22=65288:8 -Key23=65289:9 -Key24=81:81 -Key25=87:87 -Key26=69:69 -Key27=82:82 -Key28=84:84 -Key29=89:89 -Key30=85:85 -Key31=73:73 -Key32=79:79 -Key33=80:80 -Key34=64:64 -Key35=91:91 -Key36=65293:13 -Key37=65507:0 -Key38=65:65 -Key39=83:83 -Key40=68:68 -Key41=70:70 -Key42=71:71 -Key43=72:72 -Key44=74:74 -Key45=75:75 -Key46=76:76 -Key47=59:59 -Key48=58:58 -Key49=65322:0 -Key50=65505:0 -Key51=93:93 -Key52=90:90 -Key53=88:88 -Key54=67:67 -Key55=86:86 -Key56=66:66 -Key57=78:78 -Key58=77:77 -Key59=44:44 -Key60=46:46 -Key61=47:47 -Key62=65506:0 -Key63=65450:42 -Key64=65513:0 -Key65=32:32 -Key66=65328:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65429:0 -Key80=65431:0 -Key81=65434:0 -Key82=65453:45 -Key83=65430:0 -Key84=65437:0 -Key85=65432:0 -Key86=65451:43 -Key87=65436:0 -Key88=65433:0 -Key89=65435:0 -Key90=65438:0 -Key91=65439:0 -Key92=65377:0 -Key93=0:0 -Key94=124:124 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65514:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=0:0 -Key124=65027:0 -Key125=0:0 -Key126=65469:61 -Key127=0:0 -Key128=0:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=165:165 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[shiftcapslock] -Key8=65406:0 -Key9=65307:27 -Key10=33:33 -Key11=34:34 -Key12=35:35 -Key13=36:36 -Key14=37:37 -Key15=38:38 -Key16=39:39 -Key17=40:40 -Key18=41:41 -Key19=48:48 -Key20=61:61 -Key21=126:126 -Key22=65288:8 -Key23=65056:0 -Key24=113:113 -Key25=119:119 -Key26=101:101 -Key27=114:114 -Key28=116:116 -Key29=121:121 -Key30=117:117 -Key31=105:105 -Key32=111:111 -Key33=112:112 -Key34=96:96 -Key35=123:123 -Key36=65293:13 -Key37=65507:0 -Key38=97:97 -Key39=115:115 -Key40=100:100 -Key41=102:102 -Key42=103:103 -Key43=104:104 -Key44=106:106 -Key45=107:107 -Key46=108:108 -Key47=43:43 -Key48=42:42 -Key49=65322:0 -Key50=65505:0 -Key51=125:125 -Key52=122:122 -Key53=120:120 -Key54=99:99 -Key55=118:118 -Key56=98:98 -Key57=110:110 -Key58=109:109 -Key59=60:60 -Key60=62:62 -Key61=63:63 -Key62=65506:0 -Key63=65450:42 -Key64=65511:0 -Key65=32:32 -Key66=65509:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65463:55 -Key80=65464:56 -Key81=65465:57 -Key82=65453:45 -Key83=65460:52 -Key84=65461:53 -Key85=65462:54 -Key86=65451:43 -Key87=65457:49 -Key88=65458:50 -Key89=65459:51 -Key90=65456:48 -Key91=65454:46 -Key92=65377:0 -Key93=0:0 -Key94=62:62 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65512:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=0:0 -Key124=65027:0 -Key125=65513:0 -Key126=65469:61 -Key127=65515:0 -Key128=65517:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=124:124 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[shiftcapslockaltgr] -Key8=65406:0 -Key9=65307:27 -Key10=33:33 -Key11=34:34 -Key12=35:35 -Key13=36:36 -Key14=37:37 -Key15=38:38 -Key16=39:39 -Key17=40:40 -Key18=41:41 -Key19=48:48 -Key20=61:61 -Key21=126:126 -Key22=65288:8 -Key23=65056:0 -Key24=113:113 -Key25=119:119 -Key26=101:101 -Key27=114:114 -Key28=116:116 -Key29=121:121 -Key30=117:117 -Key31=105:105 -Key32=111:111 -Key33=112:112 -Key34=96:96 -Key35=123:123 -Key36=65293:13 -Key37=65507:0 -Key38=97:97 -Key39=115:115 -Key40=100:100 -Key41=102:102 -Key42=103:103 -Key43=104:104 -Key44=106:106 -Key45=107:107 -Key46=108:108 -Key47=43:43 -Key48=42:42 -Key49=65322:0 -Key50=65505:0 -Key51=125:125 -Key52=122:122 -Key53=120:120 -Key54=99:99 -Key55=118:118 -Key56=98:98 -Key57=110:110 -Key58=109:109 -Key59=60:60 -Key60=62:62 -Key61=63:63 -Key62=65506:0 -Key63=65450:42 -Key64=65511:0 -Key65=32:32 -Key66=65509:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65463:55 -Key80=65464:56 -Key81=65465:57 -Key82=65453:45 -Key83=65460:52 -Key84=65461:53 -Key85=65462:54 -Key86=65451:43 -Key87=65457:49 -Key88=65458:50 -Key89=65459:51 -Key90=65456:48 -Key91=65454:46 -Key92=65377:0 -Key93=0:0 -Key94=166:166 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65512:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=0:0 -Key124=65027:0 -Key125=65513:0 -Key126=65469:61 -Key127=65515:0 -Key128=65517:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=124:124 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 diff --git a/instfiles/km-e0210411.ini b/instfiles/km-e0210411.ini deleted file mode 100644 index e860e6fd..00000000 --- a/instfiles/km-e0210411.ini +++ /dev/null @@ -1,1055 +0,0 @@ -[noshift] -Key8=65406:0 -Key9=65307:27 -Key10=49:49 -Key11=50:50 -Key12=51:51 -Key13=52:52 -Key14=53:53 -Key15=54:54 -Key16=55:55 -Key17=56:56 -Key18=57:57 -Key19=48:48 -Key20=45:45 -Key21=94:94 -Key22=65288:8 -Key23=65289:9 -Key24=113:113 -Key25=119:119 -Key26=101:101 -Key27=114:114 -Key28=116:116 -Key29=121:121 -Key30=117:117 -Key31=105:105 -Key32=111:111 -Key33=112:112 -Key34=64:64 -Key35=91:91 -Key36=65293:13 -Key37=65507:0 -Key38=97:97 -Key39=115:115 -Key40=100:100 -Key41=102:102 -Key42=103:103 -Key43=104:104 -Key44=106:106 -Key45=107:107 -Key46=108:108 -Key47=59:59 -Key48=58:58 -Key49=65322:0 -Key50=65505:0 -Key51=93:93 -Key52=122:122 -Key53=120:120 -Key54=99:99 -Key55=118:118 -Key56=98:98 -Key57=110:110 -Key58=109:109 -Key59=44:44 -Key60=46:46 -Key61=47:47 -Key62=65506:0 -Key63=65450:42 -Key64=65513:0 -Key65=32:32 -Key66=65328:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65429:0 -Key80=65431:0 -Key81=65434:0 -Key82=65453:45 -Key83=65430:0 -Key84=65437:0 -Key85=65432:0 -Key86=65451:43 -Key87=65436:0 -Key88=65433:0 -Key89=65435:0 -Key90=65438:0 -Key91=65439:0 -Key92=65377:0 -Key93=0:0 -Key94=60:60 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65514:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=92:92 -Key124=65027:0 -Key125=0:0 -Key126=65469:61 -Key127=0:0 -Key128=0:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=165:165 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[shift] -Key8=65406:0 -Key9=65307:27 -Key10=33:33 -Key11=34:34 -Key12=35:35 -Key13=36:36 -Key14=37:37 -Key15=38:38 -Key16=39:39 -Key17=40:40 -Key18=41:41 -Key19=48:48 -Key20=61:61 -Key21=126:126 -Key22=65288:8 -Key23=65056:0 -Key24=81:81 -Key25=87:87 -Key26=69:69 -Key27=82:82 -Key28=84:84 -Key29=89:89 -Key30=85:85 -Key31=73:73 -Key32=79:79 -Key33=80:80 -Key34=96:96 -Key35=123:123 -Key36=65293:13 -Key37=65507:0 -Key38=65:65 -Key39=83:83 -Key40=68:68 -Key41=70:70 -Key42=71:71 -Key43=72:72 -Key44=74:74 -Key45=75:75 -Key46=76:76 -Key47=43:43 -Key48=42:42 -Key49=65322:0 -Key50=65505:0 -Key51=125:125 -Key52=90:90 -Key53=88:88 -Key54=67:67 -Key55=86:86 -Key56=66:66 -Key57=78:78 -Key58=77:77 -Key59=60:60 -Key60=62:62 -Key61=63:63 -Key62=65506:0 -Key63=65450:42 -Key64=65511:0 -Key65=32:32 -Key66=65509:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65463:55 -Key80=65464:56 -Key81=65465:57 -Key82=65453:45 -Key83=65460:52 -Key84=65461:53 -Key85=65462:54 -Key86=65451:43 -Key87=65457:49 -Key88=65458:50 -Key89=65459:51 -Key90=65456:48 -Key91=65454:46 -Key92=65377:0 -Key93=0:0 -Key94=62:62 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65512:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=95:95 -Key124=65027:0 -Key125=65513:0 -Key126=65469:61 -Key127=65515:0 -Key128=65517:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=124:124 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[altgr] -Key8=65406:0 -Key9=65307:27 -Key10=49:49 -Key11=50:50 -Key12=51:51 -Key13=52:52 -Key14=53:53 -Key15=54:54 -Key16=55:55 -Key17=56:56 -Key18=57:57 -Key19=48:48 -Key20=45:45 -Key21=94:94 -Key22=65288:8 -Key23=65289:9 -Key24=113:113 -Key25=119:119 -Key26=101:101 -Key27=114:114 -Key28=116:116 -Key29=121:121 -Key30=117:117 -Key31=105:105 -Key32=111:111 -Key33=112:112 -Key34=64:64 -Key35=91:91 -Key36=65293:13 -Key37=65507:0 -Key38=97:97 -Key39=115:115 -Key40=100:100 -Key41=102:102 -Key42=103:103 -Key43=104:104 -Key44=106:106 -Key45=107:107 -Key46=108:108 -Key47=59:59 -Key48=58:58 -Key49=65322:0 -Key50=65505:0 -Key51=93:93 -Key52=122:122 -Key53=120:120 -Key54=99:99 -Key55=118:118 -Key56=98:98 -Key57=110:110 -Key58=109:109 -Key59=44:44 -Key60=46:46 -Key61=47:47 -Key62=65506:0 -Key63=65450:42 -Key64=65513:0 -Key65=32:32 -Key66=65328:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65429:0 -Key80=65431:0 -Key81=65434:0 -Key82=65453:45 -Key83=65430:0 -Key84=65437:0 -Key85=65432:0 -Key86=65451:43 -Key87=65436:0 -Key88=65433:0 -Key89=65435:0 -Key90=65438:0 -Key91=65439:0 -Key92=65377:0 -Key93=0:0 -Key94=124:124 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65514:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=0:0 -Key124=65027:0 -Key125=0:0 -Key126=65469:61 -Key127=0:0 -Key128=0:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=165:165 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[shiftaltgr] -Key8=65406:0 -Key9=65307:27 -Key10=33:33 -Key11=34:34 -Key12=35:35 -Key13=36:36 -Key14=37:37 -Key15=38:38 -Key16=39:39 -Key17=40:40 -Key18=41:41 -Key19=48:48 -Key20=61:61 -Key21=126:126 -Key22=65288:8 -Key23=65056:0 -Key24=81:81 -Key25=87:87 -Key26=69:69 -Key27=82:82 -Key28=84:84 -Key29=89:89 -Key30=85:85 -Key31=73:73 -Key32=79:79 -Key33=80:80 -Key34=96:96 -Key35=123:123 -Key36=65293:13 -Key37=65507:0 -Key38=65:65 -Key39=83:83 -Key40=68:68 -Key41=70:70 -Key42=71:71 -Key43=72:72 -Key44=74:74 -Key45=75:75 -Key46=76:76 -Key47=43:43 -Key48=42:42 -Key49=65322:0 -Key50=65505:0 -Key51=125:125 -Key52=90:90 -Key53=88:88 -Key54=67:67 -Key55=86:86 -Key56=66:66 -Key57=78:78 -Key58=77:77 -Key59=60:60 -Key60=62:62 -Key61=63:63 -Key62=65506:0 -Key63=65450:42 -Key64=65511:0 -Key65=32:32 -Key66=65509:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65463:55 -Key80=65464:56 -Key81=65465:57 -Key82=65453:45 -Key83=65460:52 -Key84=65461:53 -Key85=65462:54 -Key86=65451:43 -Key87=65457:49 -Key88=65458:50 -Key89=65459:51 -Key90=65456:48 -Key91=65454:46 -Key92=65377:0 -Key93=0:0 -Key94=166:166 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65512:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=0:0 -Key124=65027:0 -Key125=65513:0 -Key126=65469:61 -Key127=65515:0 -Key128=65517:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=124:124 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[capslock] -Key8=65406:0 -Key9=65307:27 -Key10=49:49 -Key11=50:50 -Key12=51:51 -Key13=52:52 -Key14=53:53 -Key15=54:54 -Key16=55:55 -Key17=56:56 -Key18=57:57 -Key19=48:48 -Key20=45:45 -Key21=94:94 -Key22=65288:8 -Key23=65289:9 -Key24=81:81 -Key25=87:87 -Key26=69:69 -Key27=82:82 -Key28=84:84 -Key29=89:89 -Key30=85:85 -Key31=73:73 -Key32=79:79 -Key33=80:80 -Key34=64:64 -Key35=91:91 -Key36=65293:13 -Key37=65507:0 -Key38=65:65 -Key39=83:83 -Key40=68:68 -Key41=70:70 -Key42=71:71 -Key43=72:72 -Key44=74:74 -Key45=75:75 -Key46=76:76 -Key47=59:59 -Key48=58:58 -Key49=65322:0 -Key50=65505:0 -Key51=93:93 -Key52=90:90 -Key53=88:88 -Key54=67:67 -Key55=86:86 -Key56=66:66 -Key57=78:78 -Key58=77:77 -Key59=44:44 -Key60=46:46 -Key61=47:47 -Key62=65506:0 -Key63=65450:42 -Key64=65513:0 -Key65=32:32 -Key66=65328:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65429:0 -Key80=65431:0 -Key81=65434:0 -Key82=65453:45 -Key83=65430:0 -Key84=65437:0 -Key85=65432:0 -Key86=65451:43 -Key87=65436:0 -Key88=65433:0 -Key89=65435:0 -Key90=65438:0 -Key91=65439:0 -Key92=65377:0 -Key93=0:0 -Key94=60:60 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65514:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=0:0 -Key124=65027:0 -Key125=0:0 -Key126=65469:61 -Key127=0:0 -Key128=0:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=165:165 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[capslockaltgr] -Key8=65406:0 -Key9=65307:27 -Key10=49:49 -Key11=50:50 -Key12=51:51 -Key13=52:52 -Key14=53:53 -Key15=54:54 -Key16=55:55 -Key17=56:56 -Key18=57:57 -Key19=48:48 -Key20=45:45 -Key21=94:94 -Key22=65288:8 -Key23=65289:9 -Key24=81:81 -Key25=87:87 -Key26=69:69 -Key27=82:82 -Key28=84:84 -Key29=89:89 -Key30=85:85 -Key31=73:73 -Key32=79:79 -Key33=80:80 -Key34=64:64 -Key35=91:91 -Key36=65293:13 -Key37=65507:0 -Key38=65:65 -Key39=83:83 -Key40=68:68 -Key41=70:70 -Key42=71:71 -Key43=72:72 -Key44=74:74 -Key45=75:75 -Key46=76:76 -Key47=59:59 -Key48=58:58 -Key49=65322:0 -Key50=65505:0 -Key51=93:93 -Key52=90:90 -Key53=88:88 -Key54=67:67 -Key55=86:86 -Key56=66:66 -Key57=78:78 -Key58=77:77 -Key59=44:44 -Key60=46:46 -Key61=47:47 -Key62=65506:0 -Key63=65450:42 -Key64=65513:0 -Key65=32:32 -Key66=65328:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65429:0 -Key80=65431:0 -Key81=65434:0 -Key82=65453:45 -Key83=65430:0 -Key84=65437:0 -Key85=65432:0 -Key86=65451:43 -Key87=65436:0 -Key88=65433:0 -Key89=65435:0 -Key90=65438:0 -Key91=65439:0 -Key92=65377:0 -Key93=0:0 -Key94=124:124 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65514:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=0:0 -Key124=65027:0 -Key125=0:0 -Key126=65469:61 -Key127=0:0 -Key128=0:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=165:165 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[shiftcapslock] -Key8=65406:0 -Key9=65307:27 -Key10=33:33 -Key11=34:34 -Key12=35:35 -Key13=36:36 -Key14=37:37 -Key15=38:38 -Key16=39:39 -Key17=40:40 -Key18=41:41 -Key19=48:48 -Key20=61:61 -Key21=126:126 -Key22=65288:8 -Key23=65056:0 -Key24=113:113 -Key25=119:119 -Key26=101:101 -Key27=114:114 -Key28=116:116 -Key29=121:121 -Key30=117:117 -Key31=105:105 -Key32=111:111 -Key33=112:112 -Key34=96:96 -Key35=123:123 -Key36=65293:13 -Key37=65507:0 -Key38=97:97 -Key39=115:115 -Key40=100:100 -Key41=102:102 -Key42=103:103 -Key43=104:104 -Key44=106:106 -Key45=107:107 -Key46=108:108 -Key47=43:43 -Key48=42:42 -Key49=65322:0 -Key50=65505:0 -Key51=125:125 -Key52=122:122 -Key53=120:120 -Key54=99:99 -Key55=118:118 -Key56=98:98 -Key57=110:110 -Key58=109:109 -Key59=60:60 -Key60=62:62 -Key61=63:63 -Key62=65506:0 -Key63=65450:42 -Key64=65511:0 -Key65=32:32 -Key66=65509:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65463:55 -Key80=65464:56 -Key81=65465:57 -Key82=65453:45 -Key83=65460:52 -Key84=65461:53 -Key85=65462:54 -Key86=65451:43 -Key87=65457:49 -Key88=65458:50 -Key89=65459:51 -Key90=65456:48 -Key91=65454:46 -Key92=65377:0 -Key93=0:0 -Key94=62:62 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65512:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=0:0 -Key124=65027:0 -Key125=65513:0 -Key126=65469:61 -Key127=65515:0 -Key128=65517:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=124:124 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 - -[shiftcapslockaltgr] -Key8=65406:0 -Key9=65307:27 -Key10=33:33 -Key11=34:34 -Key12=35:35 -Key13=36:36 -Key14=37:37 -Key15=38:38 -Key16=39:39 -Key17=40:40 -Key18=41:41 -Key19=48:48 -Key20=61:61 -Key21=126:126 -Key22=65288:8 -Key23=65056:0 -Key24=113:113 -Key25=119:119 -Key26=101:101 -Key27=114:114 -Key28=116:116 -Key29=121:121 -Key30=117:117 -Key31=105:105 -Key32=111:111 -Key33=112:112 -Key34=96:96 -Key35=123:123 -Key36=65293:13 -Key37=65507:0 -Key38=97:97 -Key39=115:115 -Key40=100:100 -Key41=102:102 -Key42=103:103 -Key43=104:104 -Key44=106:106 -Key45=107:107 -Key46=108:108 -Key47=43:43 -Key48=42:42 -Key49=65322:0 -Key50=65505:0 -Key51=125:125 -Key52=122:122 -Key53=120:120 -Key54=99:99 -Key55=118:118 -Key56=98:98 -Key57=110:110 -Key58=109:109 -Key59=60:60 -Key60=62:62 -Key61=63:63 -Key62=65506:0 -Key63=65450:42 -Key64=65511:0 -Key65=32:32 -Key66=65509:0 -Key67=65470:0 -Key68=65471:0 -Key69=65472:0 -Key70=65473:0 -Key71=65474:0 -Key72=65475:0 -Key73=65476:0 -Key74=65477:0 -Key75=65478:0 -Key76=65479:0 -Key77=65407:0 -Key78=65300:0 -Key79=65463:55 -Key80=65464:56 -Key81=65465:57 -Key82=65453:45 -Key83=65460:52 -Key84=65461:53 -Key85=65462:54 -Key86=65451:43 -Key87=65457:49 -Key88=65458:50 -Key89=65459:51 -Key90=65456:48 -Key91=65454:46 -Key92=65377:0 -Key93=0:0 -Key94=166:166 -Key95=65480:0 -Key96=65481:0 -Key97=65360:0 -Key98=65362:0 -Key99=65365:0 -Key100=65361:0 -Key101=0:0 -Key102=65363:0 -Key103=65367:0 -Key104=65364:0 -Key105=65366:0 -Key106=65379:0 -Key107=65535:127 -Key108=65421:13 -Key109=65508:0 -Key110=65299:0 -Key111=65377:0 -Key112=65455:47 -Key113=65512:0 -Key114=269025049:0 -Key115=65515:0 -Key116=65516:0 -Key117=0:0 -Key118=269025153:0 -Key119=269025093:0 -Key120=269025094:0 -Key121=269025095:0 -Key122=269025096:0 -Key123=0:0 -Key124=65027:0 -Key125=65513:0 -Key126=65469:61 -Key127=65515:0 -Key128=65517:0 -Key129=65315:0 -Key130=0:0 -Key131=65314:0 -Key132=0:0 -Key133=124:124 -Key134=0:0 -Key135=0:0 -Key136=0:0 -Key137=0:0 diff --git a/instfiles/pam.d/Makefile.am b/instfiles/pam.d/Makefile.am index 3e09802b..d28a18e4 100644 --- a/instfiles/pam.d/Makefile.am +++ b/instfiles/pam.d/Makefile.am @@ -1,7 +1,10 @@ -EXTRA_DIST = \ - xrdp-sesman.common \ - xrdp-sesman.other \ - xrdp-sesman.password-auth +PAM_FILES = \ + xrdp-sesman.debian \ + xrdp-sesman.redhat \ + xrdp-sesman.suse \ + xrdp-sesman.unix + +EXTRA_DIST = $(PAM_FILES) mkpamrules CLEANFILES = xrdp-sesman @@ -24,14 +27,5 @@ pamddir = $(sysconfdir)/pam.d pamd_DATA = \ $(PAMFILE) -xrdp-sesman: - if test -e /etc/pam.d/password-auth; then \ - pamrules=xrdp-sesman.password-auth; \ - else \ - if test -e /etc/pam.d/common-auth; then \ - pamrules=xrdp-sesman.common; \ - else \ - pamrules=xrdp-sesman.other; \ - fi; \ - fi; \ - $(LN_S) $(srcdir)/$$pamrules $@ +xrdp-sesman: mkpamrules + $(srcdir)/mkpamrules $(PAM_RULES) $(srcdir) $@ diff --git a/instfiles/pam.d/mkpamrules b/instfiles/pam.d/mkpamrules new file mode 100755 index 00000000..e2cfb77b --- /dev/null +++ b/instfiles/pam.d/mkpamrules @@ -0,0 +1,41 @@ +#!/bin/sh + +# Find suitable PAM config file + +rules="$1" +srcdir="$2" +outfile="$3" + +service="xrdp-sesman" +pamdir="/etc/pam.d" + +guess_rules () +{ + if test -s "$pamdir/password-auth"; then + rules="redhat" + return + fi + + if test -s "$pamdir/common-account"; then + if grep "^@include" "$pamdir/passwd" >/dev/null 2>&1; then + rules="debian" + else + rules="suse" + fi + return + fi + + rules="unix" + return +} + +if test "$rules" = "auto"; then + guess_rules +fi + +if test -s "$srcdir/$service.$rules"; then + ln -nsf "$srcdir/$service.$rules" "$outfile" +else + echo "Cannot find $srcdir/$service.$rules" + exit 1 +fi diff --git a/instfiles/pam.d/xrdp-sesman.common b/instfiles/pam.d/xrdp-sesman.debian index b2089987..789ce8f7 100644 --- a/instfiles/pam.d/xrdp-sesman.common +++ b/instfiles/pam.d/xrdp-sesman.debian @@ -2,3 +2,4 @@ @include common-auth @include common-account @include common-session +@include common-password diff --git a/instfiles/pam.d/xrdp-sesman.other b/instfiles/pam.d/xrdp-sesman.other deleted file mode 100644 index 56c8d56a..00000000 --- a/instfiles/pam.d/xrdp-sesman.other +++ /dev/null @@ -1,4 +0,0 @@ -#%PAM-1.0 -auth required pam_unix.so shadow nullok -auth required pam_env.so readenv=1 -account required pam_unix.so diff --git a/instfiles/pam.d/xrdp-sesman.password-auth b/instfiles/pam.d/xrdp-sesman.password-auth deleted file mode 100644 index b17187c8..00000000 --- a/instfiles/pam.d/xrdp-sesman.password-auth +++ /dev/null @@ -1,4 +0,0 @@ -#%PAM-1.0 -auth include password-auth -account include password-auth -session include password-auth diff --git a/instfiles/pam.d/xrdp-sesman.redhat b/instfiles/pam.d/xrdp-sesman.redhat new file mode 100644 index 00000000..9da2690b --- /dev/null +++ b/instfiles/pam.d/xrdp-sesman.redhat @@ -0,0 +1,5 @@ +#%PAM-1.0 +auth include password-auth +account include password-auth +session include password-auth +password include password-auth diff --git a/instfiles/pam.d/xrdp-sesman.suse b/instfiles/pam.d/xrdp-sesman.suse new file mode 100644 index 00000000..a7c7836c --- /dev/null +++ b/instfiles/pam.d/xrdp-sesman.suse @@ -0,0 +1,5 @@ +#%PAM-1.0 +auth include common-auth +account include common-account +session include common-session +password include common-password diff --git a/instfiles/pam.d/xrdp-sesman.unix b/instfiles/pam.d/xrdp-sesman.unix new file mode 100644 index 00000000..5025a0f9 --- /dev/null +++ b/instfiles/pam.d/xrdp-sesman.unix @@ -0,0 +1,5 @@ +#%PAM-1.0 +auth include system-auth +account include system-auth +password include system-auth +session include system-auth diff --git a/keygen/openssl.conf b/keygen/openssl.conf index 79b1dfb4..09db6c25 100644 --- a/keygen/openssl.conf +++ b/keygen/openssl.conf @@ -1,4 +1,36 @@ [req] distinguished_name = req_distinguished_name +# The extensions to add to the self signed cert +x509_extensions = v3_ca [req_distinguished_name] + +[v3_ca] +# Extensions for a typical CA - PKIX recommendation. +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid:always, issuer + +# This is what PKIX recommends but some broken software chokes on critical +# extensions. +#basicConstraints = critical, CA:true +# So we do this instead. +basicConstraints = CA:true + +# Key usage: this is typical for a CA certificate. However since it will +# prevent it being used as an test self-signed certificate it is best +# left out by default. +#keyUsage = cRLSign, keyCertSign + +# Some might want this also +#nsCertType = sslCA, emailCA + +# Include email address in subject alt name: another PKIX recommendation +#subjectAltName = email:copy +# Copy issuer details +#issuerAltName = issuer:copy + +# DER hex encoding of an extension: experts only! +#obj = DER:02:03 +# Where 'obj' is a standard or added object +# You can even override a supported extension: +#basicConstraints = critical, DER:30:03:01:01:FF diff --git a/libpainter b/libpainter new file mode 160000 +Subproject 71561310ccb2cf9c086e1ca533cd3b846283c3e diff --git a/librfxcodec b/librfxcodec -Subproject 2a90952148888faea1cb02796cf62fb2c53e809 +Subproject 03a36890da75d6c27a31bcd1caae4bb9c839c6f diff --git a/libxrdp/Makefile.am b/libxrdp/Makefile.am index b7d1dc26..3812de9c 100644 --- a/libxrdp/Makefile.am +++ b/libxrdp/Makefile.am @@ -1,3 +1,6 @@ +EXTRA_DIST = \ + xrdp_surface.c + AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ @@ -11,8 +14,6 @@ LIBXRDP_EXTRA_LIBS = if XRDP_DEBUG AM_CPPFLAGS += -DXRDP_DEBUG -else -AM_CPPFLAGS += -DXRDP_NODEBUG endif if XRDP_NEUTRINORDP @@ -20,6 +21,10 @@ AM_CPPFLAGS += -DXRDP_NEUTRINORDP LIBXRDP_EXTRA_LIBS += $(FREERDP_LIBS) endif +if XRDP_RFXCODEC +AM_CPPFLAGS += -DXRDP_RFXCODEC +endif + if XRDP_TJPEG AM_CPPFLAGS += -DXRDP_JPEG -DXRDP_TJPEG @TurboJpegIncDir@ AM_LDFLAGS += @TurboJpegLibDir@ diff --git a/libxrdp/libxrdp.c b/libxrdp/libxrdp.c index c3763bf5..827b1247 100644 --- a/libxrdp/libxrdp.c +++ b/libxrdp/libxrdp.c @@ -27,6 +27,8 @@ #define LLOGLN(_level, _args) \ do { if (_level < LOG_LEVEL) { g_writeln _args ; } } while (0) +#define MAX_BITMAP_BUF_SIZE (16 * 1024) /* 16K */ + /******************************************************************************/ struct xrdp_session *EXPORT_CC libxrdp_init(tbus id, struct trans *trans) @@ -373,15 +375,15 @@ libxrdp_send_bell(struct xrdp_session *session) return 0; } - /*****************************************************************************/ int EXPORT_CC libxrdp_send_bitmap(struct xrdp_session *session, int width, int height, int bpp, char *data, int x, int y, int cx, int cy) { - int line_size = 0; + int line_bytes = 0; int i = 0; int j = 0; + int k; int total_lines = 0; int lines_sending = 0; int Bpp = 0; @@ -389,27 +391,43 @@ libxrdp_send_bitmap(struct xrdp_session *session, int width, int height, int bufsize = 0; int total_bufsize = 0; int num_updates = 0; + int line_pad_bytes; + int server_line_bytes; char *p_num_updates = (char *)NULL; char *p = (char *)NULL; char *q = (char *)NULL; struct stream *s = (struct stream *)NULL; struct stream *temp_s = (struct stream *)NULL; + tui32 pixel; - DEBUG(("libxrdp_send_bitmap sending bitmap")); + LLOGLN(10, ("libxrdp_send_bitmap: sending bitmap")); Bpp = (bpp + 7) / 8; - e = width % 4; - - if (e != 0) + e = (4 - width) & 3; + switch (bpp) { - e = 4 - e; + case 15: + case 16: + server_line_bytes = width * 2; + break; + case 24: + case 32: + server_line_bytes = width * 4; + break; + default: /* 8 bpp */ + server_line_bytes = width; + break; } + line_bytes = width * Bpp; + line_pad_bytes = line_bytes + e * Bpp; - line_size = width * Bpp; + LLOGLN(10, ("libxrdp_send_bitmap: bpp %d Bpp %d line_bytes %d " + "server_line_bytes %d", bpp, Bpp, line_bytes, server_line_bytes)); make_stream(s); - init_stream(s, 8192); + init_stream(s, MAX_BITMAP_BUF_SIZE); if (session->client_info->use_bitmap_comp) { + LLOGLN(10, ("libxrdp_send_bitmap: compression")); make_stream(temp_s); init_stream(temp_s, 65536); i = 0; @@ -421,6 +439,8 @@ libxrdp_send_bitmap(struct xrdp_session *session, int width, int height, while (i > 0) { + LLOGLN(10, ("libxrdp_send_bitmap: i %d", i)); + total_bufsize = 0; num_updates = 0; xrdp_rdp_init_data((struct xrdp_rdp *)session->rdp, s); @@ -440,10 +460,26 @@ libxrdp_send_bitmap(struct xrdp_session *session, int width, int height, } p = s->p; - lines_sending = xrdp_bitmap_compress(data, width, height, - s, bpp, - 4096 - total_bufsize, - i - 1, temp_s, e); + + if (bpp > 24) + { + LLOGLN(10, ("libxrdp_send_bitmap: 32 bpp")); + lines_sending = xrdp_bitmap32_compress(data, width, height, + s, 32, + (MAX_BITMAP_BUF_SIZE - 100) - total_bufsize, + i - 1, temp_s, e, 0x10); + LLOGLN(10, ("libxrdp_send_bitmap: i %d lines_sending %d", + i, lines_sending)); + } + else + { + lines_sending = xrdp_bitmap_compress(data, width, height, + s, bpp, + (MAX_BITMAP_BUF_SIZE - 100) - total_bufsize, + i - 1, temp_s, e); + LLOGLN(10, ("libxrdp_send_bitmap: i %d lines_sending %d", + i, lines_sending)); + } if (lines_sending == 0) { @@ -470,6 +506,7 @@ libxrdp_send_bitmap(struct xrdp_session *session, int width, int height, out_uint16_le(s, bufsize); /* compressed size */ j = (width + e) * Bpp; j = j * lines_sending; + total_bufsize += 18; /* bytes since pop layer */ } else { @@ -481,31 +518,42 @@ libxrdp_send_bitmap(struct xrdp_session *session, int width, int height, out_uint16_le(s, j); /* line size */ j = j * lines_sending; out_uint16_le(s, j); /* final size */ + total_bufsize += 26; /* bytes since pop layer */ } - if (j > 32768) + LLOGLN(10, ("libxrdp_send_bitmap: decompressed pixels %d " + "decompressed bytes %d compressed bytes %d", + lines_sending * (width + e), + line_pad_bytes * lines_sending, bufsize)); + + if (j > MAX_BITMAP_BUF_SIZE) { - g_writeln("error, decompressed size too big: %d bytes", j); + LLOGLN(0, ("libxrdp_send_bitmap: error, decompressed " + "size too big: %d bytes", j)); } - if (bufsize > 8192) + if (bufsize > MAX_BITMAP_BUF_SIZE) { - g_writeln("error, compressed size too big: %d bytes", bufsize); + LLOGLN(0, ("libxrdp_send_bitmap: error, compressed size " + "too big: %d bytes", bufsize)); } s->p = s->end; } - while (total_bufsize < 4096 && i > 0); + while (total_bufsize < MAX_BITMAP_BUF_SIZE && i > 0); + + LLOGLN(10, ("libxrdp_send_bitmap: num_updates %d total_bufsize %d", + num_updates, total_bufsize)); p_num_updates[0] = num_updates; p_num_updates[1] = num_updates >> 8; xrdp_rdp_send_data((struct xrdp_rdp *)session->rdp, s, RDP_DATA_PDU_UPDATE); - if (total_bufsize > 8192) + if (total_bufsize > MAX_BITMAP_BUF_SIZE) { - g_writeln("error, total compressed size too big: %d bytes", - total_bufsize); + LLOGLN(0, ("libxrdp_send_bitmap: error, total compressed " + "size too big: %d bytes", total_bufsize)); } } @@ -513,22 +561,30 @@ libxrdp_send_bitmap(struct xrdp_session *session, int width, int height, } else { + LLOGLN(10, ("libxrdp_send_bitmap: no compression")); total_lines = height; i = 0; p = data; - if (line_size > 0 && total_lines > 0) + if (line_bytes > 0 && total_lines > 0) { while (i < total_lines) { - lines_sending = 4096 / (line_size + e * Bpp); + + lines_sending = (MAX_BITMAP_BUF_SIZE - 100) / line_pad_bytes; if (i + lines_sending > total_lines) { lines_sending = total_lines - i; } - p = p + line_size * lines_sending; + if (lines_sending == 0) + { + LLOGLN(0, ("libxrdp_send_bitmap: error, lines_sending == zero")); + break; + } + + p += server_line_bytes * lines_sending; xrdp_rdp_init_data((struct xrdp_rdp *)session->rdp, s); out_uint16_le(s, RDP_UPDATE_BITMAP); out_uint16_le(s, 1); /* num updates */ @@ -540,14 +596,58 @@ libxrdp_send_bitmap(struct xrdp_session *session, int width, int height, out_uint16_le(s, lines_sending); out_uint16_le(s, bpp); /* bpp */ out_uint16_le(s, 0); /* compress */ - out_uint16_le(s, (line_size + e * Bpp) * lines_sending); /* bufsize */ + out_uint16_le(s, line_pad_bytes * lines_sending); /* bufsize */ q = p; - for (j = 0; j < lines_sending; j++) + switch (bpp) { - q = q - line_size; - out_uint8a(s, q, line_size); /* B_ENDIAN doesn't work here, todo */ - out_uint8s(s, e * Bpp); + case 8: + for (j = 0; j < lines_sending; j++) + { + q = q - line_bytes; + out_uint8a(s, q, line_bytes); + out_uint8s(s, e); + } + break; + case 15: + case 16: + for (j = 0; j < lines_sending; j++) + { + q = q - server_line_bytes; + for (k = 0; k < width; k++) + { + pixel = *((tui16*)(q + k * 2)); + out_uint16_le(s, pixel); + } + out_uint8s(s, e * 2); + } + break; + case 24: + for (j = 0; j < lines_sending; j++) + { + q = q - server_line_bytes; + for (k = 0; k < width; k++) + { + pixel = *((tui32*)(q + k * 4)); + out_uint8(s, pixel); + out_uint8(s, pixel >> 8); + out_uint8(s, pixel >> 16); + } + out_uint8s(s, e * 3); + } + break; + case 32: + for (j = 0; j < lines_sending; j++) + { + q = q - server_line_bytes; + for (k = 0; k < width; k++) + { + pixel = *((int*)(q + k * 4)); + out_uint32_le(s, pixel); + } + out_uint8s(s, e * 4); + } + break; } s_mark_end(s); @@ -1142,7 +1242,7 @@ libxrdp_send_to_channel(struct xrdp_session *session, int channel_id, if (xrdp_channel_send(chan, s, channel_id, total_data_len, flags) != 0) { - g_writeln("Debug - data NOT sent to channel"); + g_writeln("libxrdp_send_to_channel: error, server channel data NOT sent to client channel"); free_stream(s); return 1; } @@ -1332,13 +1432,13 @@ libxrdp_fastpath_send_surface(struct xrdp_session *session, s->rdp_hdr = s->sec_hdr + sec_bytes; s->end = data_pad + pad_bytes + data_bytes; s->p = s->data + (rdp_bytes + sec_bytes); - /* TS_SURFCMD_SET_SURF_BITS */ - out_uint16_le(s, 0x0001); /* CMDTYPE_SET_SURFACE_BITS */ + /* TS_SURFCMD_STREAM_SURF_BITS */ + out_uint16_le(s, CMDTYPE_STREAM_SURFACE_BITS); out_uint16_le(s, destLeft); out_uint16_le(s, destTop); out_uint16_le(s, destRight); out_uint16_le(s, destBottom); - /* TS_ BITMAP_DATA_EX */ + /* TS_BITMAP_DATA_EX */ out_uint8(s, bpp); out_uint8(s, 0); out_uint8(s, 0); diff --git a/libxrdp/xrdp_bitmap32_compress.c b/libxrdp/xrdp_bitmap32_compress.c index 083c4409..daec9f28 100644 --- a/libxrdp/xrdp_bitmap32_compress.c +++ b/libxrdp/xrdp_bitmap32_compress.c @@ -107,7 +107,7 @@ fsplit3(char *in_data, int start_line, int width, int e, } start_line--; cy++; - if (out_index > 64 * 64) + if (out_index + width + e > 64 * 64) { break; } @@ -195,7 +195,7 @@ fsplit4(char *in_data, int start_line, int width, int e, } start_line--; cy++; - if (out_index > 64 * 64) + if (out_index + width + e > 64 * 64) { break; } @@ -422,6 +422,7 @@ xrdp_bitmap32_compress(char *in_data, int width, int height, char *sr_data; char *sg_data; char *sb_data; + char *hold_p; int a_bytes; int r_bytes; int g_bytes; @@ -449,6 +450,7 @@ xrdp_bitmap32_compress(char *in_data, int width, int height, r_data = a_data + max_bytes; g_data = r_data + max_bytes; b_data = g_data + max_bytes; + hold_p = s->p; if (header & FLAGS_NOALPHA) { @@ -459,35 +461,44 @@ xrdp_bitmap32_compress(char *in_data, int width, int height, fdelta(sr_data, r_data, cx, cy); fdelta(sg_data, g_data, cx, cy); fdelta(sb_data, b_data, cx, cy); - out_uint8(s, header); - r_bytes = fpack(r_data, cx, cy, s); - g_bytes = fpack(g_data, cx, cy, s); - b_bytes = fpack(b_data, cx, cy, s); - total_bytes = r_bytes + g_bytes + b_bytes; - if (1 + total_bytes > byte_limit) + while (cy > 0) { - /* failed */ - LLOGLN(0, ("xrdp_bitmap32_compress: too big, rgb " - "bytes %d %d %d total_bytes %d cx %d cy %d " - "byte_limit %d", r_bytes, g_bytes, b_bytes, - total_bytes, cx, cy, byte_limit)); - return 0; - } - max_bytes = cx * cy * 3; - if (total_bytes > max_bytes) - { - /* raw is better */ - LLOGLN(10, ("xrdp_bitmap32_compress: too big, rgb " - "bytes %d %d %d total_bytes %d cx %d cy %d " - "max_bytes %d", r_bytes, g_bytes, b_bytes, - total_bytes, cx, cy, max_bytes)); - init_stream(s, 0); - foutraw3(s, cx * cy, FLAGS_NOALPHA, sr_data, sg_data, sb_data); + s->p = hold_p; + out_uint8(s, header); + r_bytes = fpack(r_data, cx, cy, s); + g_bytes = fpack(g_data, cx, cy, s); + b_bytes = fpack(b_data, cx, cy, s); + max_bytes = cx * cy * 3; + total_bytes = r_bytes + g_bytes + b_bytes; + if (total_bytes > max_bytes) + { + if (2 + max_bytes <= byte_limit) + { + s->p = hold_p; + foutraw3(s, cx * cy, FLAGS_NOALPHA, sr_data, sg_data, sb_data); + break; + } + } + if (1 + total_bytes <= byte_limit) + { + break; + } + cy--; } } else { - foutraw3(s, cx * cy, FLAGS_NOALPHA, sr_data, sg_data, sb_data); + while (cy > 0) + { + max_bytes = cx * cy * 3; + if (2 + max_bytes <= byte_limit) + { + s->p = hold_p; + foutraw3(s, cx * cy, FLAGS_NOALPHA, sr_data, sg_data, sb_data); + break; + } + cy--; + } } } else @@ -500,36 +511,45 @@ xrdp_bitmap32_compress(char *in_data, int width, int height, fdelta(sr_data, r_data, cx, cy); fdelta(sg_data, g_data, cx, cy); fdelta(sb_data, b_data, cx, cy); - out_uint8(s, header); - a_bytes = fpack(a_data, cx, cy, s); - r_bytes = fpack(r_data, cx, cy, s); - g_bytes = fpack(g_data, cx, cy, s); - b_bytes = fpack(b_data, cx, cy, s); - max_bytes = cx * cy * 4; - total_bytes = a_bytes + r_bytes + g_bytes + b_bytes; - if (1 + total_bytes > byte_limit) + while (cy > 0) { - /* failed */ - LLOGLN(0, ("xrdp_bitmap32_compress: too big, argb " - "bytes %d %d %d %d total_bytes %d cx %d cy %d " - "byte_limit %d", a_bytes, r_bytes, g_bytes, b_bytes, - total_bytes, cx, cy, byte_limit)); - return 0; - } - if (total_bytes > max_bytes) - { - /* raw is better */ - LLOGLN(10, ("xrdp_bitmap32_compress: too big, argb " - "bytes %d %d %d %d total_bytes %d cx %d cy %d " - "max_bytes %d", a_bytes, r_bytes, g_bytes, b_bytes, - total_bytes, cx, cy, max_bytes)); - init_stream(s, 0); - foutraw4(s, cx * cy, 0, sa_data, sr_data, sg_data, sb_data); + s->p = hold_p; + out_uint8(s, header); + a_bytes = fpack(a_data, cx, cy, s); + r_bytes = fpack(r_data, cx, cy, s); + g_bytes = fpack(g_data, cx, cy, s); + b_bytes = fpack(b_data, cx, cy, s); + max_bytes = cx * cy * 4; + total_bytes = a_bytes + r_bytes + g_bytes + b_bytes; + if (total_bytes > max_bytes) + { + if (2 + max_bytes <= byte_limit) + { + s->p = hold_p; + foutraw4(s, cx * cy, 0, sa_data, sr_data, sg_data, sb_data); + break; + } + } + if (1 + total_bytes <= byte_limit) + { + break; + } + cy--; } } else { - foutraw4(s, cx * cy, 0, sa_data, sr_data, sg_data, sb_data); + while (cy > 0) + { + max_bytes = cx * cy * 4; + if (2 + max_bytes <= byte_limit) + { + s->p = hold_p; + foutraw4(s, cx * cy, 0, sa_data, sr_data, sg_data, sb_data); + break; + } + cy--; + } } } return cy; diff --git a/libxrdp/xrdp_bitmap_compress.c b/libxrdp/xrdp_bitmap_compress.c index 03c56f10..56898776 100644 --- a/libxrdp/xrdp_bitmap_compress.c +++ b/libxrdp/xrdp_bitmap_compress.c @@ -22,6 +22,8 @@ #include "libxrdp.h" +#define BC_MAX_BYTES (16 * 1024) + /*****************************************************************************/ #define IN_PIXEL8(in_ptr, in_x, in_y, in_w, in_last_pixel, in_pixel); \ do { \ @@ -695,7 +697,7 @@ xrdp_bitmap_compress(char *in_data, int width, int height, out_count = end; line = in_data + width * start_line; - while (start_line >= 0 && out_count < 32768) + while (start_line >= 0 && out_count <= BC_MAX_BYTES) { i = (s->p - s->data) + count; @@ -987,7 +989,7 @@ xrdp_bitmap_compress(char *in_data, int width, int height, out_count = end * 2; line = in_data + width * start_line * 2; - while (start_line >= 0 && out_count < 32768) + while (start_line >= 0 && out_count <= BC_MAX_BYTES) { i = (s->p - s->data) + count * 2; @@ -1279,7 +1281,7 @@ xrdp_bitmap_compress(char *in_data, int width, int height, out_count = end * 3; line = in_data + width * start_line * 4; - while (start_line >= 0 && out_count < 32768) + while (start_line >= 0 && out_count <= BC_MAX_BYTES) { i = (s->p - s->data) + count * 3; diff --git a/libxrdp/xrdp_caps.c b/libxrdp/xrdp_caps.c index 9dfe6fef..c4ec7b02 100644 --- a/libxrdp/xrdp_caps.c +++ b/libxrdp/xrdp_caps.c @@ -74,8 +74,13 @@ xrdp_caps_process_general(struct xrdp_rdp *self, struct stream *s, g_writeln("xrdp_caps_process_general: error"); return 1; } - in_uint8s(s, 10); - in_uint16_le(s, extraFlags); + + in_uint16_le(s, self->client_info.client_os_major); /* osMajorType (2 bytes) */ + in_uint16_le(s, self->client_info.client_os_minor); /* osMinorType (2 bytes) */ + in_uint8s(s, 6); + in_uint16_le(s, extraFlags); /* extraFlags (2 bytes) */ + + self->client_info.op1 = extraFlags & NO_BITMAP_COMPRESSION_HDR; /* use_compact_packets is pretty much 'use rdp5' */ self->client_info.use_compact_packets = (extraFlags != 0); /* op2 is a boolean to use compact bitmap headers in bitmap cache */ @@ -155,6 +160,15 @@ xrdp_caps_process_order(struct xrdp_rdp *self, struct stream *s, DEBUG(("desktop cache size %d", i)); in_uint8s(s, 4); /* Unknown */ in_uint8s(s, 4); /* Unknown */ + + /* check if libpainter should be used for drawing, instead of orders */ + if (!(order_caps[TS_NEG_DSTBLT_INDEX] && order_caps[TS_NEG_PATBLT_INDEX] && + order_caps[TS_NEG_SCRBLT_INDEX] && order_caps[TS_NEG_MEMBLT_INDEX])) + { + g_writeln("xrdp_caps_process_order: not enough orders supported by client, using painter."); + self->client_info.no_orders_supported = 1; + } + return 0; } @@ -453,7 +467,7 @@ xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len) if (g_memcmp(codec_guid, XR_CODEC_GUID_NSCODEC, 16) == 0) { - g_writeln("xrdp_caps_process_codecs: nscodec codec id %d prop len %d", + g_writeln("xrdp_caps_process_codecs: nscodec, codec id %d, properties len %d", codec_id, codec_properties_length); self->client_info.ns_codec_id = codec_id; i1 = MIN(64, codec_properties_length); @@ -462,7 +476,7 @@ xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len) } else if (g_memcmp(codec_guid, XR_CODEC_GUID_REMOTEFX, 16) == 0) { - g_writeln("xrdp_caps_process_codecs: rfx codec id %d prop len %d", + g_writeln("xrdp_caps_process_codecs: RemoteFX, codec id %d, properties len %d", codec_id, codec_properties_length); self->client_info.rfx_codec_id = codec_id; i1 = MIN(64, codec_properties_length); @@ -471,7 +485,7 @@ xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len) } else if (g_memcmp(codec_guid, XR_CODEC_GUID_JPEG, 16) == 0) { - g_writeln("xrdp_caps_process_codecs: jpeg codec id %d prop len %d", + g_writeln("xrdp_caps_process_codecs: jpeg, codec id %d, properties len %d", codec_id, codec_properties_length); self->client_info.jpeg_codec_id = codec_id; i1 = MIN(64, codec_properties_length); @@ -488,7 +502,7 @@ xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len) } else if (g_memcmp(codec_guid, XR_CODEC_GUID_H264, 16) == 0) { - g_writeln("xrdp_caps_process_codecs: h264 codec id %d prop len %d", + g_writeln("xrdp_caps_process_codecs: h264, codec id %d, properties len %d", codec_id, codec_properties_length); self->client_info.h264_codec_id = codec_id; i1 = MIN(64, codec_properties_length); @@ -525,11 +539,29 @@ xrdp_caps_process_frame_ack(struct xrdp_rdp *self, struct stream *s, int len) g_writeln("xrdp_caps_process_frame_ack:"); self->client_info.use_frame_acks = 1; in_uint32_le(s, self->client_info.max_unacknowledged_frame_count); + if (self->client_info.max_unacknowledged_frame_count < 0) + { + g_writeln(" invalid max_unacknowledged_frame_count value (%d), setting to 0", + self->client_info.max_unacknowledged_frame_count); + self->client_info.max_unacknowledged_frame_count = 0; + } g_writeln(" max_unacknowledged_frame_count %d", self->client_info.max_unacknowledged_frame_count); return 0; } /*****************************************************************************/ +static int APP_CC +xrdp_caps_process_surface_cmds(struct xrdp_rdp *self, struct stream *s, int len) +{ + int cmdFlags; + g_writeln("xrdp_caps_process_surface_cmds:"); + in_uint32_le(s, cmdFlags); + in_uint8s(s, 4); /* reserved */ + g_writeln(" cmdFlags 0x%08x", cmdFlags); + return 0; +} + +/*****************************************************************************/ int APP_CC xrdp_caps_process_confirm_active(struct xrdp_rdp *self, struct stream *s) { @@ -655,6 +687,9 @@ xrdp_caps_process_confirm_active(struct xrdp_rdp *self, struct stream *s) case 0x001E: /* CAPSSETTYPE_FRAME_ACKNOWLEDGE */ xrdp_caps_process_frame_ack(self, s, len); break; + case RDP_CAPSET_SURFCMDS: /* CAPSETTYPE_SURFACE_COMMANDS */ + xrdp_caps_process_surface_cmds(self, s, len); + break; default: g_writeln("unknown in xrdp_caps_process_confirm_active %d", type); break; @@ -663,6 +698,17 @@ xrdp_caps_process_confirm_active(struct xrdp_rdp *self, struct stream *s) s->p = p + len + 4; } + if (self->client_info.no_orders_supported && + (self->client_info.offscreen_support_level != 0)) + { + g_writeln("xrdp_caps_process_confirm_active: not enough orders " + "supported by client, client wants off screen bitmap but " + "offscreen bitmaps disabled"); + self->client_info.offscreen_support_level = 0; + self->client_info.offscreen_cache_size = 0; + self->client_info.offscreen_cache_entries = 0; + } + DEBUG(("out xrdp_caps_process_confirm_active")); return 0; } @@ -823,22 +869,30 @@ xrdp_caps_send_demand_active(struct xrdp_rdp *self) codec_caps_count++; out_uint8a(s, XR_CODEC_GUID_NSCODEC, 16); out_uint8(s, 1); /* codec id, must be 1 */ - out_uint16_le(s, 3); + out_uint16_le(s, 3); /* codecPropertiesLength */ out_uint8(s, 0x01); /* fAllowDynamicFidelity */ out_uint8(s, 0x01); /* fAllowSubsampling */ out_uint8(s, 0x03); /* colorLossLevel */ +#if defined(XRDP_RFXCODEC) || defined(XRDP_NEUTRINORDP) /* remotefx */ codec_caps_count++; out_uint8a(s, XR_CODEC_GUID_REMOTEFX, 16); out_uint8(s, 0); /* codec id, client sets */ - out_uint16_le(s, 256); - out_uint8s(s, 256); + out_uint16_le(s, 4); /* codecPropertiesLength */ + out_uint32_le(s, 0); /* reserved */ + /* image remotefx */ + codec_caps_count++; + out_uint8a(s, XR_CODEC_GUID_IMAGE_REMOTEFX, 16); + out_uint8(s, 0); /* codec id, client sets */ + out_uint16_le(s, 4); /* codecPropertiesLength */ + out_uint32_le(s, 0); /* reserved */ +#endif /* jpeg */ codec_caps_count++; out_uint8a(s, XR_CODEC_GUID_JPEG, 16); out_uint8(s, 0); /* codec id, client sets */ - out_uint16_le(s, 1); /* ext length */ - out_uint8(s, 75); + out_uint16_le(s, 1); /* codecPropertiesLength */ + out_uint8(s, 75); /* jpeg compression ratio */ /* calculate and set size and count */ codec_caps_size = (int)(s->p - codec_caps_size_ptr); codec_caps_size += 2; /* 2 bytes for RDP_CAPSET_BMPCODECS above */ @@ -866,16 +920,10 @@ xrdp_caps_send_demand_active(struct xrdp_rdp *self) out_uint16_le(s, RDP_CAPSET_INPUT); /* 13(0xd) */ out_uint16_le(s, RDP_CAPLEN_INPUT); /* 88(0x58) */ - /* INPUT_FLAG_SCANCODES 0x0001 - INPUT_FLAG_MOUSEX 0x0004 - INPUT_FLAG_FASTPATH_INPUT 0x0008 - INPUT_FLAG_FASTPATH_INPUT2 0x0020 */ - flags = 0x0001 | 0x0004; + flags = INPUT_FLAG_SCANCODES | INPUT_FLAG_MOUSEX | INPUT_FLAG_UNICODE; if (self->client_info.use_fast_path & 2) { - /* 0x0008 INPUT_FLAG_FASTPATH_INPUT */ - /* 0x0020 INPUT_FLAG_FASTPATH_INPUT2 */ - flags |= 0x0008 | 0x0020; + flags |= INPUT_FLAG_FASTPATH_INPUT | INPUT_FLAG_FASTPATH_INPUT2; } out_uint16_le(s, flags); out_uint8s(s, 82); @@ -901,19 +949,29 @@ xrdp_caps_send_demand_active(struct xrdp_rdp *self) out_uint16_le(s, 5); out_uint8(s, 0); /* client sets */ - if (self->client_info.use_fast_path & 1) /* fastpath output on */ + if (self->client_info.use_fast_path & FASTPATH_OUTPUT_SUPPORTED) /* fastpath output on */ { + /* multifragment update */ caps_count++; - out_uint16_le(s, 0x001A); /* 26 CAPSETTYPE_MULTIFRAGMENTUPDATE */ - out_uint16_le(s, 8); + out_uint16_le(s, RDP_CAPSET_MULTIFRAGMENT); /* 26 CAPSETTYPE_MULTIFRAGMENTUPDATE */ + out_uint16_le(s, RDP_CAPLEN_MULTIFRAGMENT); out_uint32_le(s, 3 * 1024 * 1024); /* 3MB */ - } - /* frame acks */ - caps_count++; - out_uint16_le(s, 0x001E); /* CAPSETTYPE_FRAME_ACKNOWLEDGE */ - out_uint16_le(s, 8); - out_uint32_le(s, 2); /* 2 frames in flight */ + /* frame acks */ + caps_count++; + out_uint16_le(s, RDP_CAPSET_FRAME_ACKNOWLEDGE); /* CAPSETTYPE_FRAME_ACKNOWLEDGE */ + out_uint16_le(s, RDP_CAPLEN_FRAME_ACKNOWLEDGE); + out_uint32_le(s, 2); /* 2 frames in flight */ + + /* surface commands */ + caps_count++; + out_uint16_le(s, RDP_CAPSET_SURFCMDS); /* CAPSETTYPE_SURFACE_COMMANDS */ + out_uint16_le(s, RDP_CAPLEN_SURFCMDS); /* lengthCapability */ + out_uint32_le(s, (SURFCMDS_SETSURFACEBITS | + SURFCMDS_FRAMEMARKER | + SURFCMDS_STREAMSUFRACEBITS)); /* cmdFlags */ + out_uint32_le(s, 0); /* reserved */ + } out_uint8s(s, 4); /* pad */ diff --git a/libxrdp/xrdp_fastpath.c b/libxrdp/xrdp_fastpath.c index 008c8289..33e9c9d0 100644 --- a/libxrdp/xrdp_fastpath.c +++ b/libxrdp/xrdp_fastpath.c @@ -265,12 +265,30 @@ static int APP_CC xrdp_fastpath_process_EVENT_UNICODE(struct xrdp_fastpath *self, int eventFlags, struct stream *s) { - if (!s_check_rem(s, 2)) - { - return 1; - } - in_uint8s(s, 2); - return 0; + int flags; + int code; + + flags = 0; + if (!s_check_rem(s, 2)) + { + return 1; + } + in_uint16_le(s, code); /* unicode (2 byte) */ + if (eventFlags & FASTPATH_INPUT_KBDFLAGS_RELEASE) + { + flags |= KBD_FLAG_UP; + } + else + { + flags |= KBD_FLAG_DOWN; + } + if (eventFlags & FASTPATH_INPUT_KBDFLAGS_EXTENDED) + { + flags |= KBD_FLAG_EXT; + } + xrdp_fastpath_session_callback(self, RDP_INPUT_UNICODE, + code, 0, flags, 0); + return 0; } /*****************************************************************************/ diff --git a/libxrdp/xrdp_iso.c b/libxrdp/xrdp_iso.c index fa7a3f1a..b89e1616 100644 --- a/libxrdp/xrdp_iso.c +++ b/libxrdp/xrdp_iso.c @@ -20,6 +20,7 @@ */ #include "libxrdp.h" +#include "log.h" #define LOG_LEVEL 1 #define LLOG(_level, _args) \ @@ -97,7 +98,9 @@ xrdp_iso_negotiate_security(struct xrdp_iso *self) case PROTOCOL_HYBRID: case PROTOCOL_HYBRID_EX: default: - if (self->requestedProtocol & PROTOCOL_SSL) + if ((self->requestedProtocol & PROTOCOL_SSL) && + g_file_exist(client_info->certificate) && + g_file_exist(client_info->key_file)) { /* that's a patch since we don't support CredSSP for now */ self->selectedProtocol = PROTOCOL_SSL; @@ -109,8 +112,8 @@ xrdp_iso_negotiate_security(struct xrdp_iso *self) break; } - LLOGLN(10, ("xrdp_iso_negotiate_security: server security layer %d , client security layer %d", - self->selectedProtocol, self->requestedProtocol)); + log_message(LOG_LEVEL_DEBUG, "Security layer: requested %d, selected %d", + self->requestedProtocol, self->selectedProtocol); return rv; } diff --git a/libxrdp/xrdp_jpeg_compress.c b/libxrdp/xrdp_jpeg_compress.c index 27c31639..d337af1b 100644 --- a/libxrdp/xrdp_jpeg_compress.c +++ b/libxrdp/xrdp_jpeg_compress.c @@ -28,6 +28,7 @@ #include <stdlib.h> #include <string.h> #include <turbojpeg.h> +#include "log.h" /*****************************************************************************/ int APP_CC @@ -81,10 +82,13 @@ xrdp_jpeg_compress(void *handle, char *in_data, int width, int height, *dst32 = pixel; dst32++; } - for (i = 0; i < e; i++) + if (width > 0) { - *dst32 = pixel; - dst32++; + for (i = 0; i < e; i++) + { + *dst32 = pixel; + dst32++; + } } } src_buf = (unsigned char *) temp_buf; @@ -93,6 +97,13 @@ xrdp_jpeg_compress(void *handle, char *in_data, int width, int height, error = tjCompress(tj_han, src_buf, width + e, (width + e) * 4, height, TJPF_XBGR, dst_buf, &cdata_bytes, TJSAMP_420, quality, 0); + if (error != 0) + { + log_message(LOG_LEVEL_ERROR, + "xrdp_jpeg_compress: tjCompress error: %s", + tjGetErrorStr()); + } + s->p += cdata_bytes; g_free(temp_buf); return height; @@ -160,17 +171,24 @@ xrdp_codec_jpeg_compress(void *handle, * TJPF_ARGB no works, zero bytes */ error = tjCompress(tj_han, /* opaque handle */ - src_ptr, /* source buf */ + (unsigned char *) src_ptr, /* source buf */ cx, /* width of area to compress */ stride, /* pitch */ cy, /* height of area to compress */ TJPF_XBGR, /* pixel size */ - out_data, /* dest buf */ + (unsigned char *) out_data, /* dest buf */ &lio_len, /* inner_buf length & compressed_size */ TJSAMP_420, /* jpeg sub sample */ quality, /* jpeg quality */ 0 /* flags */ ); + if (error != 0) + { + log_message(LOG_LEVEL_ERROR, + "xrdp_codec_jpeg_compress: tjCompress error: %s", + tjGetErrorStr()); + } + *io_len = lio_len; return height; } @@ -213,7 +231,7 @@ xrdp_jpeg_deinit(void *handle) struct mydata_comp { - char *cb; + JOCTET *cb; int cb_bytes; int total_done; int overwrite; @@ -265,8 +283,8 @@ my_term_destination(j_compress_ptr cinfo) /*****************************************************************************/ static int APP_CC -jp_do_compress(char *data, int width, int height, int bpp, int quality, - char *comp_data, int *comp_data_bytes) +jp_do_compress(JOCTET *data, int width, int height, int bpp, int quality, + JOCTET *comp_data, int *comp_data_bytes) { struct jpeg_compress_struct cinfo; struct jpeg_error_mgr jerr; @@ -336,9 +354,8 @@ jpeg_compress(char *in_data, int width, int height, struct stream *s, struct stream *temp_s, int bpp, int byte_limit, int e, int quality) { - char *data; + JOCTET *data; tui32 *src32; - tui16 *src16; tui8 *dst8; tui32 pixel; int red; @@ -348,7 +365,7 @@ jpeg_compress(char *in_data, int width, int height, int i; int cdata_bytes; - data = temp_s->data; + data = (JOCTET *) temp_s->data; dst8 = data; if (bpp == 24) @@ -366,11 +383,14 @@ jpeg_compress(char *in_data, int width, int height, *(dst8++) = red; } - for (i = 0; i < e; i++) + if (width > 0) { - *(dst8++) = blue; - *(dst8++) = green; - *(dst8++) = red; + for (i = 0; i < e; i++) + { + *(dst8++) = blue; + *(dst8++) = green; + *(dst8++) = red; + } } } } @@ -380,7 +400,8 @@ jpeg_compress(char *in_data, int width, int height, } cdata_bytes = byte_limit; - jp_do_compress(data, width + e, height, 24, quality, s->p, &cdata_bytes); + jp_do_compress(data, width + e, height, 24, quality, (JOCTET *) s->p, + &cdata_bytes); s->p += cdata_bytes; return cdata_bytes; } diff --git a/libxrdp/xrdp_orders.c b/libxrdp/xrdp_orders.c index 18a5ad38..b0c28ed8 100644 --- a/libxrdp/xrdp_orders.c +++ b/libxrdp/xrdp_orders.c @@ -2235,6 +2235,11 @@ xrdp_orders_send_raw_bitmap(struct xrdp_orders *self, Bpp = (bpp + 7) / 8; bufsize = (width + e) * height * Bpp; + while (bufsize + 16 > MAX_ORDERS_SIZE) + { + height--; + bufsize = (width + e) * height * Bpp; + } if (xrdp_orders_check(self, bufsize + 16) != 0) { return 1; @@ -2254,33 +2259,58 @@ xrdp_orders_send_raw_bitmap(struct xrdp_orders *self, out_uint16_le(self->out_s, bufsize); out_uint16_le(self->out_s, cache_idx); - for (i = height - 1; i >= 0; i--) + if (Bpp == 4) { - for (j = 0; j < width; j++) + for (i = height - 1; i >= 0; i--) { - if (Bpp == 3) + for (j = 0; j < width; j++) { pixel = GETPIXEL32(data, j, i, width); out_uint8(self->out_s, pixel); out_uint8(self->out_s, pixel >> 8); out_uint8(self->out_s, pixel >> 16); + out_uint8(self->out_s, pixel >> 24); } - else if (Bpp == 2) + out_uint8s(self->out_s, Bpp * e); + } + } + else if (Bpp == 3) + { + for (i = height - 1; i >= 0; i--) + { + for (j = 0; j < width; j++) { - pixel = GETPIXEL16(data, j, i, width); + pixel = GETPIXEL32(data, j, i, width); out_uint8(self->out_s, pixel); out_uint8(self->out_s, pixel >> 8); + out_uint8(self->out_s, pixel >> 16); } - else if (Bpp == 1) + out_uint8s(self->out_s, Bpp * e); + } + } + else if (Bpp == 2) + { + for (i = height - 1; i >= 0; i--) + { + for (j = 0; j < width; j++) { - pixel = GETPIXEL8(data, j, i, width); + pixel = GETPIXEL16(data, j, i, width); out_uint8(self->out_s, pixel); + out_uint8(self->out_s, pixel >> 8); } + out_uint8s(self->out_s, Bpp * e); } - - for (j = 0; j < e; j++) + } + else if (Bpp == 1) + { + for (i = height - 1; i >= 0; i--) { - out_uint8s(self->out_s, Bpp); + for (j = 0; j < width; j++) + { + pixel = GETPIXEL8(data, j, i, width); + out_uint8(self->out_s, pixel); + } + out_uint8s(self->out_s, Bpp * e); } } @@ -2334,20 +2364,19 @@ xrdp_orders_send_bitmap(struct xrdp_orders *self, if (bpp > 24) { lines_sending = xrdp_bitmap32_compress(data, width, height, s, - bpp, 16384, + bpp, MAX_ORDERS_SIZE, i - 1, temp_s, e, 0x10); } else { - lines_sending = xrdp_bitmap_compress(data, width, height, s, bpp, 16384, + lines_sending = xrdp_bitmap_compress(data, width, height, s, + bpp, MAX_ORDERS_SIZE, i - 1, temp_s, e); } if (lines_sending != height) { - g_writeln("error in xrdp_orders_send_bitmap, lines_sending(%d) != \ -height(%d)", lines_sending, height); - return 1; + height = lines_sending; } bufsize = (int)(s->p - p); @@ -2458,6 +2487,7 @@ xrdp_orders_send_raw_bitmap2(struct xrdp_orders *self, int pixel = 0; int e = 0; + g_writeln("xrdp_orders_send_raw_bitmap2:"); if (width > 64) { g_writeln("error, width > 64"); @@ -2479,6 +2509,11 @@ xrdp_orders_send_raw_bitmap2(struct xrdp_orders *self, Bpp = (bpp + 7) / 8; bufsize = (width + e) * height * Bpp; + while (bufsize + 14 > MAX_ORDERS_SIZE) + { + height--; + bufsize = (width + e) * height * Bpp; + } if (xrdp_orders_check(self, bufsize + 14) != 0) { return 1; @@ -2499,7 +2534,7 @@ xrdp_orders_send_raw_bitmap2(struct xrdp_orders *self, i = cache_idx & 0xff; out_uint8(self->out_s, i); - if (1 && Bpp == 3) + if (Bpp == 4) { for (i = height - 1; i >= 0; i--) { @@ -2509,44 +2544,49 @@ xrdp_orders_send_raw_bitmap2(struct xrdp_orders *self, out_uint8(self->out_s, pixel); out_uint8(self->out_s, pixel >> 8); out_uint8(self->out_s, pixel >> 16); + out_uint8(self->out_s, pixel >> 24); } - for (j = 0; j < e; j++) - { - out_uint8s(self->out_s, Bpp); - } + out_uint8s(self->out_s, Bpp * e); } } - else - { - for (i = height - 1; i >= 0; i--) + else if (Bpp == 3) { - for (j = 0; j < width; j++) + for (i = height - 1; i >= 0; i--) { - if (Bpp == 3) + for (j = 0; j < width; j++) { pixel = GETPIXEL32(data, j, i, width); out_uint8(self->out_s, pixel); out_uint8(self->out_s, pixel >> 8); out_uint8(self->out_s, pixel >> 16); } - else if (Bpp == 2) + out_uint8s(self->out_s, Bpp * e); + } + } + else if (Bpp == 2) + { + for (i = height - 1; i >= 0; i--) + { + for (j = 0; j < width; j++) { pixel = GETPIXEL16(data, j, i, width); out_uint8(self->out_s, pixel); out_uint8(self->out_s, pixel >> 8); } - else if (Bpp == 1) + out_uint8s(self->out_s, Bpp * e); + } + } + else if (Bpp == 1) + { + for (i = height - 1; i >= 0; i--) + { + for (j = 0; j < width; j++) { pixel = GETPIXEL8(data, j, i, width); out_uint8(self->out_s, pixel); } + out_uint8s(self->out_s, Bpp * e); } - - for (j = 0; j < e; j++) - { - out_uint8s(self->out_s, Bpp); - } - } } return 0; @@ -2599,20 +2639,19 @@ xrdp_orders_send_bitmap2(struct xrdp_orders *self, if (bpp > 24) { lines_sending = xrdp_bitmap32_compress(data, width, height, s, - bpp, 16384, + bpp, MAX_ORDERS_SIZE, i - 1, temp_s, e, 0x10); } else { - lines_sending = xrdp_bitmap_compress(data, width, height, s, bpp, 16384, + lines_sending = xrdp_bitmap_compress(data, width, height, s, + bpp, MAX_ORDERS_SIZE, i - 1, temp_s, e); } if (lines_sending != height) { - g_writeln("error in xrdp_orders_send_bitmap2, lines_sending(%d) != \ -height(%d)", lines_sending, height); - return 1; + height = lines_sending; } bufsize = (int)(s->p - p); diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c index 1520cb37..ca82df70 100644 --- a/libxrdp/xrdp_rdp.c +++ b/libxrdp/xrdp_rdp.c @@ -105,8 +105,8 @@ xrdp_rdp_read_config(struct xrdp_client_info *client_info) } else if (g_strcasecmp(item, "allow_channels") == 0) { - client_info->channel_code = g_text2bool(value); - if (client_info->channel_code == 0) + client_info->channels_allowed = g_text2bool(value); + if (client_info->channels_allowed == 0) { log_message(LOG_LEVEL_DEBUG,"Info - All channels are disabled"); } @@ -182,10 +182,15 @@ xrdp_rdp_read_config(struct xrdp_client_info *client_info) { client_info->security_layer = PROTOCOL_SSL | PROTOCOL_HYBRID; } + else if (g_strcasecmp(value, "negotiate") == 0) + { + client_info->security_layer = PROTOCOL_SSL | PROTOCOL_HYBRID | PROTOCOL_HYBRID_EX; + } else { - log_message(LOG_LEVEL_ALWAYS,"Warning: Your configured security layer is " - "undefined, xrdp will negotiate client compatible"); + log_message(LOG_LEVEL_ERROR, "security_layer=%s is not " + "recognized, will use security_layer=negotiate", + value); client_info->security_layer = PROTOCOL_SSL | PROTOCOL_HYBRID | PROTOCOL_HYBRID_EX; } } @@ -777,9 +782,9 @@ xrdp_rdp_send_data_update_sync(struct xrdp_rdp *self) return 1; } out_uint16_le(s, RDP_UPDATE_SYNCHRONIZE); + out_uint16_le(s, 0); /* pad */ } - out_uint16_le(s, 0); /* pad */ s_mark_end(s); if (self->client_info.use_fast_path & 1) /* fastpath output supported */ diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index 06813d25..422acfe2 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -1829,12 +1829,12 @@ xrdp_sec_process_mcs_data_channels(struct xrdp_sec *self, struct stream *s) client_info = &(self->rdp_layer->client_info); - DEBUG(("processing channels, channel_code is %d", client_info->channel_code)); + DEBUG(("processing channels, channels_allowed is %d", client_info->channels_allowed)); /* this is an option set in xrdp.ini */ - if (client_info->channel_code != 1) /* are channels on? */ + if (client_info->channels_allowed != 1) /* are channels on? */ { - g_writeln("Processing channel data from client - The channel is off"); + g_writeln("xrdp_sec_process_mcs_data_channels: all channels are disabled by configuration"); return 0; } @@ -1862,6 +1862,12 @@ xrdp_sec_process_mcs_data_channels(struct xrdp_sec *self, struct stream *s) return 1; } in_uint8a(s, channel_item->name, 8); + if (g_strlen(channel_item->name) == 0) + { + log_message(LOG_LEVEL_WARNING, "xrdp_sec_process_mcs_data_channels: got an empty channel name, ignoring it"); + g_free(channel_item); + continue; + } in_uint32_le(s, channel_item->flags); channel_item->chanid = MCS_GLOBAL_CHANNEL + (index + 1); list_add_item(self->mcs_layer->channel_list, (tintptr) channel_item); diff --git a/mc/Makefile.am b/mc/Makefile.am index e705ff0d..09d07068 100644 --- a/mc/Makefile.am +++ b/mc/Makefile.am @@ -5,6 +5,10 @@ AM_CPPFLAGS = \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common +if XRDP_DEBUG +AM_CPPFLAGS += -DXRDP_DEBUG +endif + module_LTLIBRARIES = \ libmc.la @@ -14,3 +18,5 @@ libmc_la_SOURCES = \ libmc_la_LIBADD = \ $(top_builddir)/common/libcommon.la + +libmc_la_LDFLAGS = -avoid-version -module @@ -75,7 +75,7 @@ lib_mod_end(struct mod *mod) /******************************************************************************/ /* return error */ int DEFAULT_CC -lib_mod_set_param(struct mod *mod, const char *name, char *value) +lib_mod_set_param(struct mod *mod, const char *name, const char *value) { return 0; } @@ -37,7 +37,7 @@ struct mod long param3, long param4); int (*mod_signal)(struct mod* v); int (*mod_end)(struct mod* v); - int (*mod_set_param)(struct mod* v, const char *name, char* value); + int (*mod_set_param)(struct mod *v, const char *name, const char *value); int (*mod_session_change)(struct mod* v, int, int); int (*mod_get_wait_objs)(struct mod* v, tbus* read_objs, int* rcount, tbus* write_objs, int* wcount, int* timeout); diff --git a/neutrinordp/Makefile.am b/neutrinordp/Makefile.am index d3adc756..673a7885 100644 --- a/neutrinordp/Makefile.am +++ b/neutrinordp/Makefile.am @@ -8,8 +8,6 @@ AM_CPPFLAGS = \ if XRDP_DEBUG AM_CPPFLAGS += -DXRDP_DEBUG -else -AM_CPPFLAGS += -DXRDP_NODEBUG endif module_LTLIBRARIES = \ @@ -17,9 +15,12 @@ module_LTLIBRARIES = \ libxrdpneutrinordp_la_SOURCES = \ xrdp-color.c \ + xrdp-color.h \ xrdp-neutrinordp.c \ xrdp-neutrinordp.h libxrdpneutrinordp_la_LIBADD = \ $(top_builddir)/common/libcommon.la \ $(FREERDP_LIBS) + +libxrdpneutrinordp_la_LDFLAGS = -avoid-version -module diff --git a/neutrinordp/xrdp-neutrinordp.c b/neutrinordp/xrdp-neutrinordp.c index 34ed9c2c..37b4eefb 100644 --- a/neutrinordp/xrdp-neutrinordp.c +++ b/neutrinordp/xrdp-neutrinordp.c @@ -427,7 +427,7 @@ lxrdp_end(struct mod *mod) /******************************************************************************/ /* return error */ static int DEFAULT_CC -lxrdp_set_param(struct mod *mod, const char *name, char *value) +lxrdp_set_param(struct mod *mod, const char *name, const char *value) { rdpSettings *settings; diff --git a/neutrinordp/xrdp-neutrinordp.h b/neutrinordp/xrdp-neutrinordp.h index 79bb460d..fd4560d0 100644 --- a/neutrinordp/xrdp-neutrinordp.h +++ b/neutrinordp/xrdp-neutrinordp.h @@ -71,7 +71,7 @@ struct mod long param3, long param4); int (*mod_signal)(struct mod *v); int (*mod_end)(struct mod *v); - int (*mod_set_param)(struct mod *v, const char *name, char *value); + int (*mod_set_param)(struct mod *v, const char *name, const char *value); int (*mod_session_change)(struct mod *v, int, int); int (*mod_get_wait_objs)(struct mod *v, tbus *read_objs, int *rcount, tbus *write_objs, int *wcount, int *timeout); diff --git a/rdp/Makefile.am b/rdp/Makefile.am index 30368156..6065cc11 100644 --- a/rdp/Makefile.am +++ b/rdp/Makefile.am @@ -7,8 +7,6 @@ AM_CPPFLAGS = \ if XRDP_DEBUG AM_CPPFLAGS += -DXRDP_DEBUG -else -AM_CPPFLAGS += -DXRDP_NODEBUG endif module_LTLIBRARIES = \ @@ -28,3 +26,5 @@ librdp_la_SOURCES = \ librdp_la_LIBADD = \ $(top_builddir)/common/libcommon.la + +librdp_la_LDFLAGS = -avoid-version -module @@ -242,7 +242,7 @@ lib_mod_end(struct mod *mod) /******************************************************************************/ /* return error */ int DEFAULT_CC -lib_mod_set_param(struct mod *mod, const char *name, char *value) +lib_mod_set_param(struct mod *mod, const char *name, const char *value) { if (g_strncasecmp(name, "ip", 255) == 0) { @@ -262,7 +262,7 @@ struct mod long param3, long param4); int (*mod_signal)(struct mod* v); int (*mod_end)(struct mod* v); - int (*mod_set_param)(struct mod* v, const char *name, char* value); + int (*mod_set_param)(struct mod *v, const char *name, const char *value); int (*mod_session_change)(struct mod* v, int, int); int (*mod_get_wait_objs)(struct mod* v, tbus* read_objs, int* rcount, tbus* write_objs, int* wcount, int* timeout); @@ -1,39 +1,3 @@ +xrdp 0.9.1 -xrdp 0.9.0 - -Credits - This project is very much dependent on NeutrinoRDP, FreeRDP, rdesktop, and - the work of Matt Chapman and the NeutrinoRDP team members, of which I'm a - member. - - Mark from up 19.9 was the first to work with rdp server code. - -Tested with linux on i386, x64, sparc, and ppc. -I've got it compiling and working in windows with Borland free tools. -None of the sesman or Xserver stuff works in windows of course. - -xrdp directory is the main server code -vnc directory is a simple vnc client module for xrdp -sesman directory is a session manager for xrdp that uses Xvnc for the Xserver -libxrdp directory is a static library needed by xrdp -rdp is an rdp client module for connecting to another rdp server -xup is a module used to connect to an rdp specific X11 server -Xserver is the files needed to build an rdp specific X11 server -COPYING is the license file -design.txt is an attempt to explain the project design -coding_style.md describes the coding style for the project - -since version 0.5.0 we switch to autotools to build xrdp - -to build and install - -change to the xrdp directory and run -./bootstrap -./configure -make -then as root -make install - -see file-loc.txt to see what files are installed where - -Jay Sorg +The contents of this file has been moved to README.md diff --git a/sesman/Makefile.am b/sesman/Makefile.am index 68dba28e..207890ac 100644 --- a/sesman/Makefile.am +++ b/sesman/Makefile.am @@ -1,3 +1,6 @@ +EXTRA_DIST = \ + Doxyfile + AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ @@ -6,6 +9,10 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/common \ -I$(top_srcdir)/sesman/libscp +if XRDP_DEBUG +AM_CPPFLAGS += -DXRDP_DEBUG +endif + if SESMAN_NOPAM AUTH_C = verify_user.c AUTH_LIB = -lcrypt @@ -54,6 +61,8 @@ xrdp_sesman_SOURCES = \ session.h \ sig.c \ sig.h \ + xauth.c \ + xauth.h \ $(AUTH_C) xrdp_sesman_LDADD = \ diff --git a/sesman/chansrv/Makefile.am b/sesman/chansrv/Makefile.am index 2ecd67b4..05ca50f5 100644 --- a/sesman/chansrv/Makefile.am +++ b/sesman/chansrv/Makefile.am @@ -1,3 +1,9 @@ +EXTRA_DIST = \ + clipboard-notes.txt \ + pcsc \ + pulse \ + wave-format-server.txt + AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ @@ -5,11 +11,15 @@ AM_CPPFLAGS = \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common +if XRDP_DEBUG +AM_CPPFLAGS += -DXRDP_DEBUG +endif + CHANSRV_EXTRA_LIBS = if XRDP_FUSE -AM_CPPFLAGS += -DXRDP_FUSE -CHANSRV_EXTRA_LIBS += -lfuse +AM_CPPFLAGS += -DXRDP_FUSE $(FUSE_CFLAGS) +CHANSRV_EXTRA_LIBS += $(FUSE_LIBS) endif if XRDP_OPUS diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c index 25133fec..b9717c8b 100644 --- a/sesman/chansrv/chansrv.c +++ b/sesman/chansrv/chansrv.c @@ -1637,7 +1637,7 @@ main(int argc, char **argv) * @return unused slot index on success, -1 on failure ******************************************************************************/ int APP_CC -find_empty_slot_in_dvc_channels() +find_empty_slot_in_dvc_channels(void) { int i; diff --git a/sesman/chansrv/chansrv.h b/sesman/chansrv/chansrv.h index a3e8ed51..389f2bd3 100644 --- a/sesman/chansrv/chansrv.h +++ b/sesman/chansrv/chansrv.h @@ -61,7 +61,7 @@ int APP_CC send_channel_data(int chan_id, char *data, int size); int APP_CC send_rail_drawing_orders(char* data, int size); int APP_CC main_cleanup(void); int APP_CC add_timeout(int msoffset, void (*callback)(void* data), void* data); -int APP_CC find_empty_slot_in_dvc_channels(); +int APP_CC find_empty_slot_in_dvc_channels(void); struct xrdp_api_data * APP_CC struct_from_dvc_chan_id(tui32 dvc_chan_id); int remove_struct_with_chan_id(tui32 dvc_chan_id); diff --git a/sesman/chansrv/chansrv_fuse.c b/sesman/chansrv/chansrv_fuse.c index 04209fd9..e5ff1da4 100644 --- a/sesman/chansrv/chansrv_fuse.c +++ b/sesman/chansrv/chansrv_fuse.c @@ -87,9 +87,8 @@ void xfuse_devredir_cb_file_close(void *vp) {} ******************************************************************************/ #define FUSE_USE_VERSION 26 -#define _FILE_OFFSET_BITS 64 -#include <fuse/fuse_lowlevel.h> +#include <fuse_lowlevel.h> #include <stdio.h> #include <stdlib.h> #include <errno.h> @@ -101,9 +100,12 @@ void xfuse_devredir_cb_file_close(void *vp) {} #include "arch.h" #include "os_calls.h" +#include "clipboard_file.h" #include "chansrv_fuse.h" +#include "devredir.h" #include "list.h" #include "fifo.h" +#include "file.h" #ifndef EREMOTEIO #define EREMOTEIO EIO @@ -256,7 +258,7 @@ static tintptr g_bufsize = 0; static int xfuse_init_xrdp_fs(void); static int xfuse_deinit_xrdp_fs(void); static int xfuse_init_lib(struct fuse_args *args); -static int xfuse_is_inode_valid(int ino); +static int xfuse_is_inode_valid(fuse_ino_t ino); // LK_TODO #if 0 @@ -265,39 +267,26 @@ static void xfuse_create_file(fuse_req_t req, fuse_ino_t parent, #endif static void xfuse_dump_fs(void); -static void xfuse_dump_xrdp_inode(struct xrdp_inode *xino); -static tui32 xfuse_get_device_id_for_inode(tui32 ino, char *full_path); +static tui32 xfuse_get_device_id_for_inode(fuse_ino_t ino, char *full_path); static void fuse_reverse_pathname(char *full_path, char *reverse_path); -static struct xrdp_inode * xfuse_get_inode_from_pinode_name(tui32 pinode, +static struct xrdp_inode * xfuse_get_inode_from_pinode_name(fuse_ino_t pinode, const char *name); static struct xrdp_inode * xfuse_create_file_in_xrdp_fs(tui32 device_id, int pinode, char *name, int type); -static int xfuse_does_file_exist(int parent, char *name); -static int xfuse_delete_file(int parent, char *name); +static int xfuse_does_file_exist(fuse_ino_t parent, char *name); static int xfuse_delete_file_with_xinode(XRDP_INODE *xinode); static int xfuse_delete_dir_with_xinode(XRDP_INODE *xinode); static int xfuse_recursive_delete_dir_with_xinode(XRDP_INODE *xinode); static void xfuse_update_xrdpfs_size(void); + +#ifdef USE_SYNC_FLAG static void xfuse_enum_dir(fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *fi); - -/* forward declarations for calls we make into devredir */ -int dev_redir_get_dir_listing(void *fusep, tui32 device_id, char *path); - -int dev_redir_file_open(void *fusep, tui32 device_id, char *path, - int mode, int type, char *gen_buf); - -int devredir_file_read(void *fusep, tui32 device_id, tui32 FileId, - tui32 Length, tui64 Offset); - -int dev_redir_file_write(void *fusep, tui32 device_id, tui32 FileId, - const char *buf, int Length, tui64 Offset); - -int devredir_file_close(void *fusep, tui32 device_id, tui32 FileId); +#endif /* forward declarations for FUSE callbacks */ static void xfuse_cb_lookup(fuse_req_t req, fuse_ino_t parent, @@ -307,9 +296,6 @@ static void xfuse_cb_getattr(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi); /* this is not a callback, but it's used by xfuse_cb_readdir() */ -static void xfuse_dirbuf_add(fuse_req_t req, struct dirbuf *b, - const char *name, fuse_ino_t ino); - static int xfuse_dirbuf_add1(fuse_req_t req, struct dirbuf1 *b, const char *name, fuse_ino_t ino); @@ -353,8 +339,10 @@ static void xfuse_cb_create(fuse_req_t req, fuse_ino_t parent, const char *name, mode_t mode, struct fuse_file_info *fi); +#if 0 static void xfuse_cb_fsync(fuse_req_t req, fuse_ino_t ino, int datasync, struct fuse_file_info *fi); +#endif static void xfuse_cb_setattr(fuse_req_t req, fuse_ino_t ino, struct stat *attr, int to_set, struct fuse_file_info *fi); @@ -368,13 +356,9 @@ static int xfuse_proc_opendir_req(fuse_req_t req, fuse_ino_t ino, static void xfuse_cb_releasedir(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi); -/* clipboard calls */ -int clipboard_request_file_data(int stream_id, int lindex, int offset, - int request_bytes); - /* misc calls */ -static void xfuse_mark_as_stale(int pinode); -static void xfuse_delete_stale_entries(int pinode); +static void xfuse_mark_as_stale(fuse_ino_t pinode); +static void xfuse_delete_stale_entries(fuse_ino_t pinode); /*****************************************************************************/ int APP_CC @@ -623,9 +607,10 @@ int xfuse_create_share(tui32 device_id, char *dirname) if (dirname == NULL || strlen(dirname) == 0) return -1; - if ((xinode = calloc(1, sizeof(struct xrdp_inode))) == NULL) + xinode = g_new0(struct xrdp_inode, 1); + if (xinode == NULL) { - log_debug("calloc() failed"); + log_debug("g_new0() failed"); return -1; } @@ -658,7 +643,8 @@ int xfuse_create_share(tui32 device_id, char *dirname) xinode->nentries++; #if 0 - if ((fip = calloc(1, sizeof(XFUSE_INFO))) == NULL) + fip = g_new0(XFUSE_INFO, 1); + if (fip == NULL) { log_error("system out of memory"); return -1; @@ -687,7 +673,7 @@ int xfuse_create_share(tui32 device_id, char *dirname) int xfuse_clear_clip_dir(void) { - int i; + fuse_ino_t i; XRDP_INODE *xinode; XRDP_INODE *xip; @@ -846,7 +832,7 @@ static int xfuse_init_lib(struct fuse_args *args) fuse_session_add_chan(g_se, g_ch); g_bufsize = fuse_chan_bufsize(g_ch); - g_buffer = calloc(g_bufsize, 1); + g_buffer = g_new0(char, g_bufsize); g_fd = fuse_chan_fd(g_ch); g_req_list = list_create(); @@ -862,11 +848,11 @@ static int xfuse_init_lib(struct fuse_args *args) * *****************************************************************************/ -static int xfuse_init_xrdp_fs() +static int xfuse_init_xrdp_fs(void) { struct xrdp_inode *xino; - g_xrdp_fs.inode_table = calloc(4096, sizeof(struct xrdp_inode *)); + g_xrdp_fs.inode_table = g_new0(struct xrdp_inode *, 4096); if (g_xrdp_fs.inode_table == NULL) { log_error("system out of memory"); @@ -877,7 +863,8 @@ static int xfuse_init_xrdp_fs() * index 0 is our .. dir */ - if ((xino = calloc(1, sizeof(struct xrdp_inode))) == NULL) + xino = g_new0(struct xrdp_inode, 1); + if (xino == NULL) { log_error("system out of memory"); free(g_xrdp_fs.inode_table); @@ -900,7 +887,8 @@ static int xfuse_init_xrdp_fs() * index 1 is our . dir */ - if ((xino = calloc(1, sizeof(struct xrdp_inode))) == NULL) + xino = g_new0(struct xrdp_inode, 1); + if (xino == NULL) { log_error("system out of memory"); free(g_xrdp_fs.inode_table[0]); @@ -924,7 +912,8 @@ static int xfuse_init_xrdp_fs() * index 2 is for clipboard use */ - if ((xino = calloc(1, sizeof(struct xrdp_inode))) == NULL) + xino = g_new0(struct xrdp_inode, 1); + if (xino == NULL) { log_error("system out of memory"); free(g_xrdp_fs.inode_table[0]); @@ -960,7 +949,7 @@ static int xfuse_init_xrdp_fs() * @return 0 on success, -1 on failure *****************************************************************************/ -static int xfuse_deinit_xrdp_fs() +static int xfuse_deinit_xrdp_fs(void) { return 0; } @@ -971,7 +960,7 @@ static int xfuse_deinit_xrdp_fs() * @return 1 if it does, 0 otherwise *****************************************************************************/ -static int xfuse_is_inode_valid(int ino) +static int xfuse_is_inode_valid(fuse_ino_t ino) { /* is ino present in our table? */ if ((ino < FIRST_INODE) || (ino >= g_xrdp_fs.next_node)) @@ -1004,9 +993,10 @@ static void xfuse_create_file(fuse_req_t req, fuse_ino_t parent, fuse_reply_err(req, EBADF); } - if ((xinode = calloc(1, sizeof(struct xrdp_inode))) == NULL) + xinode = g_new0(struct xrdp_inode, 1); + if (xinode == NULL) { - log_error("calloc() failed"); + log_error("g_new0() failed"); fuse_reply_err(req, ENOMEM); } @@ -1053,9 +1043,9 @@ static void xfuse_create_file(fuse_req_t req, fuse_ino_t parent, } #endif -static void xfuse_dump_fs() +static void xfuse_dump_fs(void) { - int i; + fuse_ino_t i; struct xrdp_inode *xinode; log_debug("found %d entries", g_xrdp_fs.num_entries - FIRST_INODE); @@ -1084,6 +1074,7 @@ static void xfuse_dump_fs() * @param xino xinode structure to dump *****************************************************************************/ +#if 0 static void xfuse_dump_xrdp_inode(struct xrdp_inode *xino) { log_debug("--- dumping struct xinode ---"); @@ -1098,6 +1089,7 @@ static void xfuse_dump_xrdp_inode(struct xrdp_inode *xino) log_debug("device_id: %d", xino->device_id); log_debug("%s", ""); } +#endif /** * Return the device_id associated with specified inode and copy the @@ -1109,10 +1101,10 @@ static void xfuse_dump_xrdp_inode(struct xrdp_inode *xino) * @return the device_id of specified inode *****************************************************************************/ -static tui32 xfuse_get_device_id_for_inode(tui32 ino, char *full_path) +static tui32 xfuse_get_device_id_for_inode(fuse_ino_t ino, char *full_path) { - tui32 parent_inode = 0; - tui32 child_inode = ino; + fuse_ino_t parent_inode = 0; + fuse_ino_t child_inode = ino; char reverse_path[4096]; /* ino == 1 is a special case; we already know that it is not */ @@ -1120,7 +1112,7 @@ static tui32 xfuse_get_device_id_for_inode(tui32 ino, char *full_path) if (ino == 1) { /* just return the device_id for the file in full_path */ - log_debug("looking for file with pinode=%d name=%s", ino, full_path); + log_debug("looking for file with pinode=%ld name=%s", ino, full_path); xfuse_dump_fs(); XRDP_INODE *xinode = xfuse_get_inode_from_pinode_name(ino, full_path); @@ -1179,10 +1171,10 @@ static void fuse_reverse_pathname(char *full_path, char *reverse_path) * Return the inode that matches the name and parent inode *****************************************************************************/ -static struct xrdp_inode * xfuse_get_inode_from_pinode_name(tui32 pinode, +static struct xrdp_inode * xfuse_get_inode_from_pinode_name(fuse_ino_t pinode, const char *name) { - int i; + fuse_ino_t i; struct xrdp_inode * xinode; for (i = FIRST_INODE; i < g_xrdp_fs.num_entries; i++) @@ -1222,7 +1214,8 @@ static struct xrdp_inode * xfuse_create_file_in_xrdp_fs(tui32 device_id, if ((name == NULL) || (strlen(name) == 0)) return NULL; - if ((xinode = calloc(1, sizeof(XRDP_INODE))) == NULL) + xinode = g_new0(XRDP_INODE, 1); + if (xinode == NULL) { log_error("system out of memory"); return NULL; @@ -1274,9 +1267,9 @@ static struct xrdp_inode * xfuse_create_file_in_xrdp_fs(tui32 device_id, * @return 1 if specified file exists, 0 otherwise *****************************************************************************/ -static int xfuse_does_file_exist(int parent, char *name) +static int xfuse_does_file_exist(fuse_ino_t parent, char *name) { - int i; + fuse_ino_t i; XRDP_INODE *xinode; for (i = FIRST_INODE; i < g_xrdp_fs.num_entries; i++) @@ -1294,11 +1287,6 @@ static int xfuse_does_file_exist(int parent, char *name) return 0; } -static int xfuse_delete_file(int parent, char *name) -{ - return -1; -} - static int xfuse_delete_file_with_xinode(XRDP_INODE *xinode) { /* make sure it is not a dir */ @@ -1318,7 +1306,7 @@ static int xfuse_delete_file_with_xinode(XRDP_INODE *xinode) static int xfuse_delete_dir_with_xinode(XRDP_INODE *xinode) { XRDP_INODE *xip; - int i; + fuse_ino_t i; /* make sure it is not a file */ if ((xinode == NULL) || (xinode->mode & S_IFREG)) @@ -1354,7 +1342,7 @@ static int xfuse_delete_dir_with_xinode(XRDP_INODE *xinode) static int xfuse_recursive_delete_dir_with_xinode(XRDP_INODE *xinode) { XRDP_INODE *xip; - int i; + fuse_ino_t i; /* make sure it is not a file */ if ((xinode == NULL) || (xinode->mode & S_IFREG)) @@ -1399,7 +1387,7 @@ static int xfuse_recursive_delete_dir_with_xinode(XRDP_INODE *xinode) return 0; } -static void xfuse_update_xrdpfs_size() +static void xfuse_update_xrdpfs_size(void) { void *vp; int diff; @@ -1419,12 +1407,12 @@ static void xfuse_update_xrdpfs_size() } /* zero newly added memory */ - memset(vp + g_xrdp_fs.max_entries * sizeof(struct xrdp_inode *), + memset((char *) vp + g_xrdp_fs.max_entries * sizeof(struct xrdp_inode *), 0, 100 * sizeof(struct xrdp_inode *)); g_xrdp_fs.max_entries += 100; - g_xrdp_fs.inode_table = vp; + g_xrdp_fs.inode_table = (struct xrdp_inode **) vp; } /****************************************************************************** @@ -1530,9 +1518,9 @@ void xfuse_devredir_cb_enum_dir_done(void *vp, tui32 IoStatus) xfuse_delete_stale_entries(fip->inode); /* this will be used by xfuse_cb_readdir() */ - di = calloc(1, sizeof(struct dir_info)); + di = g_new0(struct dir_info, 1); di->index = FIRST_INODE; - fip->fi->fh = (long) di; + fip->fi->fh = (tintptr) di; fuse_reply_open(fip->req, fip->fi); @@ -1547,7 +1535,7 @@ done: while (1) { /* process next request */ - odreq = fifo_peek(&g_fifo_opendir); + odreq = (struct opendir_req *) fifo_peek(&g_fifo_opendir); if (!odreq) return; @@ -1600,7 +1588,8 @@ void xfuse_devredir_cb_open_file(void *vp, tui32 IoStatus, tui32 DeviceId, if (fip->fi != NULL) { - if ((fh = calloc(1, sizeof(XFUSE_HANDLE))) == NULL) + fh = g_new0(XFUSE_HANDLE, 1); + if (fh == NULL) { log_error("system out of memory"); if (fip->invoke_fuse) @@ -1614,7 +1603,7 @@ void xfuse_devredir_cb_open_file(void *vp, tui32 IoStatus, tui32 DeviceId, fh->DeviceId = DeviceId; fh->FileId = FileId; - fip->fi->fh = (uint64_t) ((long) fh); + fip->fi->fh = (tintptr) fh; log_debug("+++ XFUSE_INFO=%p XFUSE_INFO->fi=%p XFUSE_INFO->fi->fh=0x%llx", fip, fip->fi, (long long) fip->fi->fh); } @@ -1872,7 +1861,7 @@ void xfuse_devredir_cb_file_close(void *vp) fip->fi, (long long) fip->fi->fh); free((char *) (tintptr) (fip->fi->fh)); - fip->fi->fh = NULL; + fip->fi->fh = 0; } #endif @@ -1976,6 +1965,7 @@ static void xfuse_cb_getattr(fuse_req_t req, fuse_ino_t ino, * *****************************************************************************/ +#if 0 static void xfuse_dirbuf_add(fuse_req_t req, struct dirbuf *b, const char *name, fuse_ino_t ino) { @@ -1992,6 +1982,7 @@ static void xfuse_dirbuf_add(fuse_req_t req, struct dirbuf *b, fuse_add_direntry(req, b->p + oldsize, b->size - oldsize, name, &stbuf, b->size); } +#endif static int xfuse_dirbuf_add1(fuse_req_t req, struct dirbuf1 *b, const char *name, fuse_ino_t ino) @@ -2032,7 +2023,7 @@ static void xfuse_cb_readdir(fuse_req_t req, fuse_ino_t ino, size_t size, XRDP_INODE *ti; struct dir_info *di; struct dirbuf1 b; - int i; + fuse_ino_t i; int first_time; log_debug("req=%p inode=%ld size=%zd offset=%lld", req, ino, size, (long long) off); @@ -2214,7 +2205,8 @@ static void xfuse_remove_dir_or_file(fuse_req_t req, fuse_ino_t parent, /* specified file resides on redirected share */ - if ((fip = calloc(1, sizeof(XFUSE_INFO))) == NULL) + fip = g_new0(XFUSE_INFO, 1); + if (fip == NULL) { log_error("system out of memory"); fuse_reply_err(req, ENOMEM); @@ -2263,7 +2255,7 @@ static void xfuse_cb_rename(fuse_req_t req, char *cptr; char old_full_path[1024]; char new_full_path[1024]; - char *cp; + const char *cp; tui32 device_id; @@ -2343,7 +2335,8 @@ static void xfuse_cb_rename(fuse_req_t req, strcat(old_full_path, "/"); strcat(old_full_path, old_name); - if ((fip = calloc(1, sizeof(XFUSE_INFO))) == NULL) + fip = g_new0(XFUSE_INFO, 1); + if (fip == NULL) { log_error("system out of memory"); fuse_reply_err(req, ENOMEM); @@ -2447,7 +2440,8 @@ static void xfuse_create_dir_or_file(fuse_req_t req, fuse_ino_t parent, /* specified file resides on redirected share */ - if ((fip = calloc(1, sizeof(XFUSE_INFO))) == NULL) + fip = g_new0(XFUSE_INFO, 1); + if (fip == NULL) { log_error("system out of memory"); fuse_reply_err(req, ENOMEM); @@ -2527,21 +2521,22 @@ static void xfuse_cb_open(fuse_req_t req, fuse_ino_t ino, return; } - device_id = xfuse_get_device_id_for_inode((tui32) ino, full_path); + device_id = xfuse_get_device_id_for_inode(ino, full_path); if (xinode->is_loc_resource) { /* specified file is a local resource */ - XFUSE_HANDLE *fh = calloc(1, sizeof(XFUSE_HANDLE)); + XFUSE_HANDLE *fh = g_new0(XFUSE_HANDLE, 1); fh->is_loc_resource = 1; - fi->fh = (uint64_t) ((long) fh); + fi->fh = (tintptr) fh; fuse_reply_open(req, fi); return; } /* specified file resides on redirected share */ - if ((fip = calloc(1, sizeof(XFUSE_INFO))) == NULL) + fip = g_new0(XFUSE_INFO, 1); + if (fip == NULL) { log_error("system out of memory"); fuse_reply_err(req, ENOMEM); @@ -2587,7 +2582,6 @@ static void xfuse_cb_release(fuse_req_t req, fuse_ino_t ino, struct { XFUSE_INFO *fip = NULL; XFUSE_HANDLE *handle = (XFUSE_HANDLE *) (tintptr) (fi->fh); - tui32 FileId; log_debug("entered: ino=%ld fi=%p fi->fh=0x%llx", ino, fi, (long long) fi->fh); @@ -2625,7 +2619,8 @@ static void xfuse_cb_release(fuse_req_t req, fuse_ino_t ino, struct return; } - if ((fip = calloc(1, sizeof(XFUSE_INFO))) == NULL) + fip = g_new0(XFUSE_INFO, 1); + if (fip == NULL) { log_error("system out of memory"); fuse_reply_err(req, ENOMEM); @@ -2641,7 +2636,6 @@ static void xfuse_cb_release(fuse_req_t req, fuse_ino_t ino, struct log_debug(" +++ created XFUSE_INFO=%p XFUSE_INFO->fi=%p XFUSE_INFO->fi->fh=0x%llx", fip, fip->fi, (long long) fip->fi->fh); - FileId = handle->FileId; fip->fi->fh = 0; xinode->close_in_progress = 1; @@ -2690,8 +2684,7 @@ static void xfuse_cb_read(fuse_req_t req, fuse_ino_t ino, size_t size, return; } - rli = (struct req_list_item *) - g_malloc(sizeof(struct req_list_item), 1); + rli = g_new0(struct req_list_item, 1); rli->stream_id = 0; rli->req = req; @@ -2714,7 +2707,8 @@ static void xfuse_cb_read(fuse_req_t req, fuse_ino_t ino, size_t size, /* target file is on a remote device */ - if ((fusep = calloc(1, sizeof(XFUSE_INFO))) == NULL) + fusep = g_new0(XFUSE_INFO, 1); + if (fusep == NULL) { log_error("system out of memory"); fuse_reply_err(req, ENOMEM); @@ -2761,7 +2755,8 @@ static void xfuse_cb_write(fuse_req_t req, fuse_ino_t ino, const char *buf, /* target file is on a remote device */ - if ((fusep = calloc(1, sizeof(XFUSE_INFO))) == NULL) + fusep = g_new0(XFUSE_INFO, 1); + if (fusep == NULL) { log_error("system out of memory"); fuse_reply_err(req, ENOMEM); @@ -2797,6 +2792,7 @@ static void xfuse_cb_create(fuse_req_t req, fuse_ino_t parent, /** *****************************************************************************/ +#if 0 static void xfuse_cb_fsync(fuse_req_t req, fuse_ino_t ino, int datasync, struct fuse_file_info *fi) { @@ -2804,6 +2800,7 @@ static void xfuse_cb_fsync(fuse_req_t req, fuse_ino_t ino, int datasync, log_debug("function not required"); fuse_reply_err(req, EINVAL); } +#endif /** *****************************************************************************/ @@ -2902,7 +2899,7 @@ static void xfuse_cb_opendir(fuse_req_t req, fuse_ino_t ino, struct opendir_req *odreq; /* save request */ - odreq = malloc(sizeof(struct opendir_req)); + odreq = g_new(struct opendir_req, 1); odreq->req = req; odreq->ino = ino; odreq->fi = fi; @@ -2971,18 +2968,19 @@ static int xfuse_proc_opendir_req(fuse_req_t req, fuse_ino_t ino, { goto do_remote_lookup; } -#endif do_remote_lookup: +#endif - xfuse_mark_as_stale((int) ino); + xfuse_mark_as_stale(ino); log_debug("did not find entry; redirecting call to dev_redir"); - device_id = xfuse_get_device_id_for_inode((tui32) ino, full_path); + device_id = xfuse_get_device_id_for_inode(ino, full_path); log_debug("dev_id=%d ino=%ld full_path=%s", device_id, ino, full_path); - if ((fip = calloc(1, sizeof(XFUSE_INFO))) == NULL) + fip = g_new0(XFUSE_INFO, 1); + if (fip == NULL) { log_error("system out of memory"); fuse_reply_err(req, ENOMEM); @@ -3024,9 +3022,9 @@ do_remote_lookup: done: - di = calloc(1, sizeof(struct dir_info)); + di = g_new0(struct dir_info, 1); di->index = FIRST_INODE; - fi->fh = (long) di; + fi->fh = (tintptr) di; fuse_reply_open(req, fi); g_free(fifo_remove(&g_fifo_opendir)); return -1; @@ -3058,9 +3056,9 @@ static void xfuse_cb_releasedir(fuse_req_t req, fuse_ino_t ino, *****************************************************************************/ static void -xfuse_mark_as_stale(int pinode) +xfuse_mark_as_stale(fuse_ino_t pinode) { - int i; + fuse_ino_t i; XRDP_INODE *xinode; if ((pinode < FIRST_INODE) || (pinode >= g_xrdp_fs.num_entries)) @@ -3087,9 +3085,9 @@ xfuse_mark_as_stale(int pinode) *****************************************************************************/ static void -xfuse_delete_stale_entries(int pinode) +xfuse_delete_stale_entries(fuse_ino_t pinode) { - int i; + fuse_ino_t i; XRDP_INODE *xinode; if ((pinode < FIRST_INODE) || (pinode >= g_xrdp_fs.num_entries)) diff --git a/sesman/chansrv/chansrv_fuse.h b/sesman/chansrv/chansrv_fuse.h index 4638add5..63e4b5d1 100644 --- a/sesman/chansrv/chansrv_fuse.h +++ b/sesman/chansrv/chansrv_fuse.h @@ -45,8 +45,8 @@ struct xrdp_inode }; typedef struct xrdp_inode XRDP_INODE; // LK_TODO use this instead of using struct xrdp_inode -int xfuse_init(); -int xfuse_deinit(); +int xfuse_init(void); +int xfuse_deinit(void); int xfuse_check_wait_objs(void); int xfuse_get_wait_objs(tbus *objs, int *count, int *timeout); int xfuse_create_share(tui32 share_id, char *dirname); diff --git a/sesman/chansrv/devredir.c b/sesman/chansrv/devredir.c index 2ce30286..a8377e7d 100644 --- a/sesman/chansrv/devredir.c +++ b/sesman/chansrv/devredir.c @@ -46,6 +46,7 @@ #include "parse.h" #include "os_calls.h" #include "log.h" +#include "chansrv.h" #include "chansrv_fuse.h" #include "devredir.h" #include "smartcard.h" @@ -430,7 +431,8 @@ void devredir_send_server_device_announce_resp(tui32 device_id) * @return 0 on success, -1 on failure *****************************************************************************/ -int dev_redir_send_drive_create_request(tui32 device_id, char *path, +int dev_redir_send_drive_create_request(tui32 device_id, + const char *path, tui32 DesiredAccess, tui32 CreateOptions, tui32 CreateDisposition, @@ -697,9 +699,8 @@ void devredir_proc_client_devlist_announce_req(struct stream *s) /* for smart cards, device data len always 0 */ - log_debug("device_type=SMARTCARD device_id=0x%x dosname=%s " - "device_data_len=%d", - g_device_id, preferred_dos_name, device_data_len); + log_debug("device_type=SMARTCARD device_id=0x%x dosname=%s", + g_device_id, preferred_dos_name); devredir_send_server_device_announce_resp(g_device_id); scard_device_announce(g_device_id); @@ -997,7 +998,7 @@ dev_redir_proc_query_dir_response(IRP *irp, *****************************************************************************/ int APP_CC -dev_redir_get_dir_listing(void *fusep, tui32 device_id, char *path) +dev_redir_get_dir_listing(void *fusep, tui32 device_id, const char *path) { tui32 DesiredAccess; tui32 CreateOptions; @@ -1010,26 +1011,27 @@ dev_redir_get_dir_listing(void *fusep, tui32 device_id, char *path) if ((irp = devredir_irp_new()) == NULL) return -1; - /* cvt / to windows compatible \ */ - devredir_cvt_slash(path); + strncpy(irp->pathname, path, 255); + + /* convert / to windows compatible \ */ + devredir_cvt_slash(irp->pathname); irp->CompletionId = g_completion_id++; irp->completion_type = CID_CREATE_DIR_REQ; irp->DeviceId = device_id; - strncpy(irp->pathname, path, 255); devredir_fuse_data_enqueue(irp, fusep); DesiredAccess = DA_FILE_READ_DATA | DA_SYNCHRONIZE; CreateOptions = CO_FILE_DIRECTORY_FILE | CO_FILE_SYNCHRONOUS_IO_NONALERT; CreateDisposition = CD_FILE_OPEN; - rval = dev_redir_send_drive_create_request(device_id, path, + rval = dev_redir_send_drive_create_request(device_id, irp->pathname, DesiredAccess, CreateOptions, CreateDisposition, irp->CompletionId); - log_debug("looking for device_id=%d path=%s", device_id, path); + log_debug("looking for device_id=%d path=%s", device_id, irp->pathname); /* when we get a response to dev_redir_send_drive_create_request(), we */ /* call dev_redir_send_drive_dir_request(), which needs the following */ @@ -1043,8 +1045,8 @@ dev_redir_get_dir_listing(void *fusep, tui32 device_id, char *path) } int APP_CC -dev_redir_file_open(void *fusep, tui32 device_id, char *path, - int mode, int type, char *gen_buf) +dev_redir_file_open(void *fusep, tui32 device_id, const char *path, + int mode, int type, const char *gen_buf) { tui32 DesiredAccess; tui32 CreateOptions; @@ -1161,7 +1163,7 @@ int devredir_file_close(void *fusep, tui32 device_id, tui32 FileId) *****************************************************************************/ int APP_CC -devredir_rmdir_or_file(void *fusep, tui32 device_id, char *path, int mode) +devredir_rmdir_or_file(void *fusep, tui32 device_id, const char *path, int mode) { tui32 DesiredAccess; tui32 CreateOptions; @@ -1445,7 +1447,7 @@ devredir_cvt_slash(char *path) } void APP_CC -devredir_cvt_to_unicode(char *unicode, char *path) +devredir_cvt_to_unicode(char *unicode, const char *path) { char *dest; char *src; diff --git a/sesman/chansrv/devredir.h b/sesman/chansrv/devredir.h index b49eb1dd..cbe279db 100644 --- a/sesman/chansrv/devredir.h +++ b/sesman/chansrv/devredir.h @@ -40,15 +40,16 @@ int APP_CC dev_redir_data_in(struct stream* s, int chan_id, int chan_flags, int APP_CC dev_redir_get_wait_objs(tbus* objs, int* count, int* timeout); int APP_CC dev_redir_check_wait_objs(void); -void dev_redir_send_server_core_cap_req(); -void dev_redir_send_server_clientID_confirm(); -void dev_redir_send_server_user_logged_on(); +void dev_redir_send_server_core_cap_req(void); +void dev_redir_send_server_clientID_confirm(void); +void dev_redir_send_server_user_logged_on(void); void devredir_send_server_device_announce_resp(tui32 device_id); void dev_redir_send_drive_dir_request(IRP *irp, tui32 device_id, tui32 InitialQuery, char *Path); -int dev_redir_send_drive_create_request(tui32 device_id, char *path, +int dev_redir_send_drive_create_request(tui32 device_id, + const char *path, tui32 DesiredAccess, tui32 CreateOptions, tui32 CreateDisposition, @@ -81,7 +82,7 @@ void devredir_insert_DeviceIoRequest(struct stream *s, tui32 MinorFunction); void devredir_cvt_slash(char *path); -void devredir_cvt_to_unicode(char *unicode, char *path); +void devredir_cvt_to_unicode(char *unicode, const char *path); void devredir_cvt_from_unicode_len(char *path, char *unicode, int len); int dev_redir_string_ends_with(char *string, char c); @@ -94,17 +95,22 @@ void devredir_proc_cid_rename_file(IRP *irp, tui32 IoStatus); void devredir_proc_cid_rename_file_resp(IRP *irp, tui32 IoStatus); /* called from FUSE module */ -int dev_redir_get_dir_listing(void *fusep, tui32 device_id, char *path); +int dev_redir_get_dir_listing(void *fusep, tui32 device_id, const char *path); -int dev_redir_file_open(void *fusep, tui32 device_id, char *path, - int mode, int type, char *gen_buf); +int dev_redir_file_open(void *fusep, tui32 device_id, const char *path, + int mode, int type, const char *gen_buf); int devredir_file_close(void *fusep, tui32 device_id, tui32 file_id); int devredir_file_read(void *fusep, tui32 device_id, tui32 FileId, tui32 Length, tui64 Offset); -int send_channel_data(int chan_id, char *data, int size); +int APP_CC +dev_redir_file_write(void *fusep, tui32 DeviceId, tui32 FileId, + const char *buf, int Length, tui64 Offset); + +int APP_CC +devredir_rmdir_or_file(void *fusep, tui32 device_id, const char *path, int mode); /* * RDPDR_HEADER definitions diff --git a/sesman/chansrv/irp.c b/sesman/chansrv/irp.c index ad318cb1..d8527270 100644 --- a/sesman/chansrv/irp.c +++ b/sesman/chansrv/irp.c @@ -69,7 +69,7 @@ IRP *g_irp_head = NULL; * @return new IRP or NULL on error *****************************************************************************/ -IRP * devredir_irp_new() +IRP * devredir_irp_new(void) { IRP *irp; IRP *irp_last; @@ -239,7 +239,7 @@ IRP * devredir_irp_find_by_fileid(tui32 FileId) * Return last IRP in linked list *****************************************************************************/ -IRP * devredir_irp_get_last() +IRP * devredir_irp_get_last(void) { IRP *irp = g_irp_head; @@ -255,7 +255,7 @@ IRP * devredir_irp_get_last() return irp; } -void devredir_irp_dump() +void devredir_irp_dump(void) { IRP *irp = g_irp_head; diff --git a/sesman/chansrv/rail.c b/sesman/chansrv/rail.c index 3470cece..e790a76b 100644 --- a/sesman/chansrv/rail.c +++ b/sesman/chansrv/rail.c @@ -356,7 +356,7 @@ rail_deinit(void) } int APP_CC -rail_startup() +rail_startup(void) { int dummy; int ver_maj; @@ -612,9 +612,6 @@ rail_process_activate(struct stream *s, int size) LOG(10, ("chansrv::rail_process_activate: calling XSetInputFocus 0x%8.8x", window_id)); XSetInputFocus(g_display, window_id, RevertToParent, CurrentTime); } else { - XWindowAttributes window_attributes; - XGetWindowAttributes(g_display, window_id, &window_attributes); - LOG(10, (" window attributes: override_redirect %d", window_attributes.override_redirect)); add_timeout(200, my_timeout, (void*)(long)g_focus_counter); diff --git a/sesman/chansrv/sound.c b/sesman/chansrv/sound.c index e2b6f53b..1662cf28 100644 --- a/sesman/chansrv/sound.c +++ b/sesman/chansrv/sound.c @@ -212,8 +212,8 @@ static int APP_CC sound_input_start_recording(void); static int APP_CC sound_input_stop_recording(void); static int APP_CC sound_process_input_data(struct stream *s, int bytes); static int DEFAULT_CC sound_sndsrvr_source_data_in(struct trans *trans); -static int APP_CC sound_start_source_listener(); -static int APP_CC sound_start_sink_listener(); +static int APP_CC sound_start_source_listener(void); +static int APP_CC sound_start_sink_listener(void); /*****************************************************************************/ static int APP_CC @@ -1513,7 +1513,7 @@ sound_sndsrvr_source_data_in(struct trans *trans) * Start a listener for microphone redirection connections *****************************************************************************/ static int APP_CC -sound_start_source_listener() +sound_start_source_listener(void) { char port[1024]; @@ -1530,7 +1530,7 @@ sound_start_source_listener() * Start a listener for speaker redirection connections *****************************************************************************/ static int APP_CC -sound_start_sink_listener() +sound_start_sink_listener(void) { char port[1024]; diff --git a/sesman/config.c b/sesman/config.c index 0c169938..39849bc5 100644 --- a/sesman/config.c +++ b/sesman/config.c @@ -357,7 +357,7 @@ config_read_sessions(int file, struct config_sessions *se, struct list *param_n, g_printf("\tX11DisplayOffset: %i\r\n", se->x11_display_offset); g_printf("\tKillDisconnected: %i\r\n", se->kill_disconnected); g_printf("\tIdleTimeLimit: %i\r\n", se->max_idle_time); - g_printf("\tDisconnectedTimeLimit: %i\r\n", se->max_idle_time); + g_printf("\tDisconnectedTimeLimit: %i\r\n", se->max_disc_time); g_printf("\tPolicy: %i\r\n", se->policy); return 0; diff --git a/sesman/env.c b/sesman/env.c index 1a4fa679..adbfc788 100644 --- a/sesman/env.c +++ b/sesman/env.c @@ -24,9 +24,10 @@ * */ +#include <grp.h> + #include "list.h" #include "sesman.h" -#include "grp.h" #include "ssl_calls.h" extern unsigned char g_fixedkey[8]; /* in sesman.c */ @@ -150,7 +151,7 @@ env_set_user(const char *username, char **passwd_file, int display, if (0 == g_cfg->auth_file_path) { /* if no auth_file_path is set, then we go for - $HOME/.vnc/sesman_username_passwd */ + $HOME/.vnc/sesman_username_passwd:DISPLAY */ if (!g_directory_exist(".vnc")) { if (g_mkdir(".vnc") < 0) @@ -161,12 +162,24 @@ env_set_user(const char *username, char **passwd_file, int display, } } - len = g_snprintf(NULL, 0, "%s/.vnc/sesman_%s_passwd", pw_dir, username); + len = g_snprintf(NULL, 0, "%s/.vnc/sesman_%s_passwd:%d", + pw_dir, username, display); *passwd_file = (char *) g_malloc(len + 1, 1); if (*passwd_file != NULL) { - g_sprintf(*passwd_file, "%s/.vnc/sesman_%s_passwd", pw_dir, username); + /* Try legacy name first, remove if found */ + g_sprintf(*passwd_file, "%s/.vnc/sesman_%s_passwd", + pw_dir, username); + if (g_file_exist(*passwd_file)) + { + log_message(LOG_LEVEL_WARNING, "Removing insecure " + "password file %s", *passwd_file); + g_file_delete(*passwd_file); + } + + g_sprintf(*passwd_file, "%s/.vnc/sesman_%s_passwd:%d", + pw_dir, username, display); } } else diff --git a/sesman/libscp/Makefile.am b/sesman/libscp/Makefile.am index 1bb89910..fc382b43 100644 --- a/sesman/libscp/Makefile.am +++ b/sesman/libscp/Makefile.am @@ -5,6 +5,10 @@ AM_CPPFLAGS = \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common +if XRDP_DEBUG +AM_CPPFLAGS += -DXRDP_DEBUG +endif + module_LTLIBRARIES = \ libscp.la diff --git a/sesman/libscp/libscp_init.c b/sesman/libscp/libscp_init.c index 9d1e7308..11f0678e 100644 --- a/sesman/libscp/libscp_init.c +++ b/sesman/libscp/libscp_init.c @@ -30,7 +30,7 @@ /* server API */ int DEFAULT_CC -scp_init() +scp_init(void) { /* if (0 == log) diff --git a/sesman/libscp/libscp_init.h b/sesman/libscp/libscp_init.h index 91fb4090..7e74640c 100644 --- a/sesman/libscp/libscp_init.h +++ b/sesman/libscp/libscp_init.h @@ -41,6 +41,6 @@ * */ int DEFAULT_CC -scp_init(); +scp_init(void); #endif diff --git a/sesman/libscp/libscp_session.c b/sesman/libscp/libscp_session.c index 210414c3..e932c82b 100644 --- a/sesman/libscp/libscp_session.c +++ b/sesman/libscp/libscp_session.c @@ -34,7 +34,7 @@ /*******************************************************************/ struct SCP_SESSION * -scp_session_create() +scp_session_create(void) { struct SCP_SESSION *s; @@ -416,6 +416,21 @@ scp_session_set_addr(struct SCP_SESSION *s, int type, const void *addr) } /*******************************************************************/ +int +scp_session_set_guid(struct SCP_SESSION *s, const tui8 *guid) +{ + if (0 == guid) + { + log_message(LOG_LEVEL_WARNING, "[session:%d] set_guid: null guid", __LINE__); + return 1; + } + + g_memcpy(s->guid, guid, 16); + + return 0; +} + +/*******************************************************************/ void scp_session_destroy(struct SCP_SESSION *s) { diff --git a/sesman/libscp/libscp_session.h b/sesman/libscp/libscp_session.h index 51b6d03e..eb902722 100644 --- a/sesman/libscp/libscp_session.h +++ b/sesman/libscp/libscp_session.h @@ -38,7 +38,7 @@ * */ struct SCP_SESSION* -scp_session_create(); +scp_session_create(void); int scp_session_set_type(struct SCP_SESSION* s, tui8 type); @@ -91,6 +91,9 @@ scp_session_set_display(struct SCP_SESSION* s, SCP_DISPLAY display); int scp_session_set_errstr(struct SCP_SESSION* s, const char *str); +int +scp_session_set_guid(struct SCP_SESSION *s, const tui8 *guid); + /** * * @brief destroys a session object diff --git a/sesman/libscp/libscp_types.h b/sesman/libscp/libscp_types.h index 78d53e56..8cb9166c 100644 --- a/sesman/libscp/libscp_types.h +++ b/sesman/libscp/libscp_types.h @@ -88,6 +88,7 @@ struct SCP_SESSION char* program; char* directory; char* client_ip; + tui8 guid[16]; }; struct SCP_DISCONNECTED_SESSION diff --git a/sesman/libscp/libscp_v0.c b/sesman/libscp/libscp_v0.c index 7fbdd2e8..93f9e072 100644 --- a/sesman/libscp/libscp_v0.c +++ b/sesman/libscp/libscp_v0.c @@ -364,13 +364,20 @@ scp_v0s_accept(struct SCP_CONNECTION *c, struct SCP_SESSION **s, int skipVchk) /******************************************************************************/ enum SCP_SERVER_STATES_E -scp_v0s_allow_connection(struct SCP_CONNECTION *c, SCP_DISPLAY d) +scp_v0s_allow_connection(struct SCP_CONNECTION *c, SCP_DISPLAY d, const tui8 *guid) { + int msg_size; + + msg_size = guid == 0 ? 14 : 14 + 16; out_uint32_be(c->out_s, 0); /* version */ - out_uint32_be(c->out_s, 14); /* size */ + out_uint32_be(c->out_s, msg_size); /* size */ out_uint16_be(c->out_s, 3); /* cmd */ out_uint16_be(c->out_s, 1); /* data */ out_uint16_be(c->out_s, d); /* data */ + if (msg_size > 14) + { + out_uint8a(c->out_s, guid, 16); + } s_mark_end(c->out_s); if (0 != scp_tcp_force_send(c->in_sck, c->out_s->data, c->out_s->end - c->out_s->data)) diff --git a/sesman/libscp/libscp_v0.h b/sesman/libscp/libscp_v0.h index 16e49e05..21fc16cd 100644 --- a/sesman/libscp/libscp_v0.h +++ b/sesman/libscp/libscp_v0.h @@ -61,7 +61,7 @@ scp_v0s_accept(struct SCP_CONNECTION* c, struct SCP_SESSION** s, int skipVchk); * */ enum SCP_SERVER_STATES_E -scp_v0s_allow_connection(struct SCP_CONNECTION* c, SCP_DISPLAY d); +scp_v0s_allow_connection(struct SCP_CONNECTION* c, SCP_DISPLAY d, const tui8 *guid); /** * diff --git a/sesman/libscp/libscp_v1c.c b/sesman/libscp/libscp_v1c.c index 7bc9a1d3..14f3bb0f 100644 --- a/sesman/libscp/libscp_v1c.c +++ b/sesman/libscp/libscp_v1c.c @@ -136,13 +136,6 @@ scp_v1c_resend_credentials(struct SCP_CONNECTION *c, struct SCP_SESSION *s) return _scp_v1c_check_response(c, s); } -/* 021 */ -enum SCP_CLIENT_STATES_E -scp_v1c_pwd_change(struct SCP_CONNECTION *c, char *newpass); -/* 022 */ -enum SCP_CLIENT_STATES_E -scp_v1c_pwd_change_cancel(struct SCP_CONNECTION *c); - /* 041 */ enum SCP_CLIENT_STATES_E scp_v1c_get_session_list(struct SCP_CONNECTION *c, int *scount, diff --git a/sesman/libscp/libscp_v1c_mng.h b/sesman/libscp/libscp_v1c_mng.h index 126c9113..256ca491 100644 --- a/sesman/libscp/libscp_v1c_mng.h +++ b/sesman/libscp/libscp_v1c_mng.h @@ -52,8 +52,4 @@ enum SCP_CLIENT_STATES_E scp_v1c_mng_get_session_list(struct SCP_CONNECTION* c, int* scount, struct SCP_DISCONNECTED_SESSION** s); -/* 044 */ -enum SCP_CLIENT_STATES_E -scp_v1c_select_session_cancel(struct SCP_CONNECTION* c); - #endif diff --git a/sesman/scp.c b/sesman/scp.c index d81de0ab..89176dcb 100644 --- a/sesman/scp.c +++ b/sesman/scp.c @@ -54,12 +54,12 @@ scp_process_start(void *sck) if (sdata->version == 0) { /* starts processing an scp v0 connection */ - LOG_DBG("accept ok, go on with scp v0", 0); + LOG_DBG("accept ok, go on with scp v0"); scp_v0_process(&scon, sdata); } else { - LOG_DBG("accept ok, go on with scp v1", 0); + LOG_DBG("accept ok, go on with scp v1"); /*LOG_DBG("user: %s\npass: %s",sdata->username, sdata->password);*/ scp_v1_process(&scon, sdata); } diff --git a/sesman/scp_v0.c b/sesman/scp_v0.c index 565dacb8..81ecc3a6 100644 --- a/sesman/scp_v0.c +++ b/sesman/scp_v0.c @@ -77,7 +77,7 @@ scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s) if (s_item != 0) { display = s_item->display; - + g_memcpy(s->guid, s_item->guid, 16); if (0 != s->client_ip) { log_message( LOG_LEVEL_INFO, "++ reconnected session: username %s, " @@ -99,6 +99,11 @@ scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s) if (1 == access_login_allowed(s->username)) { + tui8 guid[16]; + + g_random((char*)guid, 16); + scp_session_set_guid(s, guid); + if (0 != s->client_ip) { log_message(LOG_LEVEL_INFO, "++ created session (access granted): " @@ -113,27 +118,18 @@ scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s) if (SCP_SESSION_TYPE_XVNC == s->type) { log_message( LOG_LEVEL_INFO, "starting Xvnc session..."); - display = session_start(s->width, s->height, s->bpp, s->username, - s->password, data, SESMAN_SESSION_TYPE_XVNC, - s->domain, s->program, s->directory, - s->client_ip); + display = session_start(data, SESMAN_SESSION_TYPE_XVNC, s); } else if (SCP_SESSION_TYPE_XRDP == s->type) { log_message(LOG_LEVEL_INFO, "starting X11rdp session..."); - display = session_start(s->width, s->height, s->bpp, s->username, - s->password, data, SESMAN_SESSION_TYPE_XRDP, - s->domain, s->program, s->directory, - s->client_ip); + display = session_start(data, SESMAN_SESSION_TYPE_XRDP, s); } else if (SCP_SESSION_TYPE_XORG == s->type) { /* type is SCP_SESSION_TYPE_XORG */ log_message(LOG_LEVEL_INFO, "starting Xorg session..."); - display = session_start(s->width, s->height, s->bpp, s->username, - s->password, data, SESMAN_SESSION_TYPE_XORG, - s->domain, s->program, s->directory, - s->client_ip); + display = session_start(data, SESMAN_SESSION_TYPE_XORG, s); } } else @@ -148,7 +144,7 @@ scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s) } else { - scp_v0s_allow_connection(c, display); + scp_v0s_allow_connection(c, display, s->guid); } } else diff --git a/sesman/scp_v1.c b/sesman/scp_v1.c index df138147..36e3892f 100644 --- a/sesman/scp_v1.c +++ b/sesman/scp_v1.c @@ -122,16 +122,12 @@ scp_v1_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s) if (SCP_SESSION_TYPE_XVNC == s->type) { log_message(LOG_LEVEL_INFO, "starting Xvnc session..."); - display = session_start(s->width, s->height, s->bpp, s->username, - s->password, data, SESMAN_SESSION_TYPE_XVNC, - s->domain, s->program, s->directory, s->client_ip); + display = session_start(data, SESMAN_SESSION_TYPE_XVNC, s); } else { log_message(LOG_LEVEL_INFO, "starting X11rdp session..."); - display = session_start(s->width, s->height, s->bpp, s->username, - s->password, data, SESMAN_SESSION_TYPE_XRDP, - s->domain, s->program, s->directory, s->client_ip); + display = session_start(data, SESMAN_SESSION_TYPE_XRDP, s); } e = scp_v1s_connect_new_session(c, display); diff --git a/sesman/sesman.ini b/sesman/sesman.ini index d1f18d9e..674665e9 100644 --- a/sesman/sesman.ini +++ b/sesman/sesman.ini @@ -64,7 +64,6 @@ SyslogLevel=DEBUG [X11rdp] param=X11rdp param=-bs -param=-ac param=-nolisten param=tcp param=-uds @@ -72,7 +71,6 @@ param=-uds [Xvnc] param=Xvnc param=-bs -param=-ac param=-nolisten param=tcp param=-localhost @@ -84,11 +82,10 @@ param=Xorg param=-config param=xrdp/xorg.conf param=-noreset -param=-ac param=-nolisten param=tcp param=-logfile -param=/dev/null +param=.xorgxrdp.%s.log [Chansrv] ; drive redirection, defaults to xrdp_client if not set diff --git a/sesman/session.c b/sesman/session.c index 581af1ae..cf6f45c4 100644 --- a/sesman/session.c +++ b/sesman/session.c @@ -29,8 +29,22 @@ * */ +#if defined(HAVE_CONFIG_H) +#include "config_ac.h" +#endif + +#ifdef HAVE_SYS_PRCTL_H +#include <sys/prctl.h> +#endif + #include "sesman.h" #include "libscp_types.h" +#include "xauth.h" + +#ifndef PR_SET_NO_NEW_PRIVS +#define PR_SET_NO_NEW_PRIVS 38 +#endif + extern unsigned char g_fixedkey[8]; extern struct config_sesman *g_cfg; /* in sesman.c */ @@ -408,9 +422,7 @@ wait_for_xserver(int display) /******************************************************************************/ /* called with the main thread */ static int APP_CC -session_start_fork(int width, int height, int bpp, char *username, - char *password, tbus data, tui8 type, char *domain, - char *program, char *directory, char *client_ip) +session_start_fork(tbus data, tui8 type, struct SCP_SESSION *s) { int display = 0; int pid = 0; @@ -430,6 +442,7 @@ session_start_fork(int width, int height, int bpp, char *username, struct list *xserver_params = (struct list *)NULL; struct tm stime; time_t ltime; + char authfile[256]; /* The filename for storing xauth informations */ /* initialize (zero out) local variables: */ g_memset(<ime, 0, sizeof(time_t)); @@ -445,7 +458,7 @@ session_start_fork(int width, int height, int bpp, char *username, if (g_session_count >= g_cfg->sess.max_sessions) { log_message(LOG_LEVEL_INFO, "max concurrent session limit " - "exceeded. login for user %s denied", username); + "exceeded. login for user %s denied", s->username); return 0; } @@ -454,7 +467,7 @@ session_start_fork(int width, int height, int bpp, char *username, if (temp == 0) { log_message(LOG_LEVEL_ERROR, "cannot create new chain " - "element - user %s", username); + "element - user %s", s->username); return 0; } @@ -464,7 +477,7 @@ session_start_fork(int width, int height, int bpp, char *username, { g_free(temp); log_message(LOG_LEVEL_ERROR, "cannot create new session " - "item - user %s", username); + "item - user %s", s->username); return 0; } @@ -487,8 +500,8 @@ session_start_fork(int width, int height, int bpp, char *username, { g_delete_wait_obj(g_term_event); g_tcp_close(g_sck); - g_sprintf(geometry, "%dx%d", width, height); - g_sprintf(depth, "%d", bpp); + g_sprintf(geometry, "%dx%d", s->width, s->height); + g_sprintf(depth, "%d", s->bpp); g_sprintf(screen, ":%d", display); #ifdef __FreeBSD__ /* @@ -517,10 +530,10 @@ session_start_fork(int width, int height, int bpp, char *username, "setsid failed - pid %d", g_getpid()); } - if (g_setlogin(username) < 0) + if (g_setlogin(s->username) < 0) { log_message(LOG_LEVEL_ERROR, - "setlogin failed for user %s - pid %d", username, + "setlogin failed for user %s - pid %d", s->username, g_getpid()); } } @@ -543,7 +556,7 @@ session_start_fork(int width, int height, int bpp, char *username, } else if (pampid == 0) { - env_set_user(username, + env_set_user(s->username, 0, display, g_cfg->session_variables1, @@ -551,21 +564,21 @@ session_start_fork(int width, int height, int bpp, char *username, if (x_server_running(display)) { auth_set_env(data); - if (directory != 0) + if (s->directory != 0) { - if (directory[0] != 0) + if (s->directory[0] != 0) { - g_set_current_dir(directory); + g_set_current_dir(s->directory); } } - if (program != 0) + if (s->program != 0) { - if (program[0] != 0) + if (s->program[0] != 0) { - g_execlp3(program, program, 0); + g_execlp3(s->program, s->program, 0); log_message(LOG_LEVEL_ALWAYS, "error starting program %s for user %s - pid %d", - program, username, g_getpid()); + s->program, s->username, g_getpid()); } } /* try to execute user window manager if enabled */ @@ -576,7 +589,7 @@ session_start_fork(int width, int height, int bpp, char *username, { g_execlp3(text, g_cfg->user_wm, 0); log_message(LOG_LEVEL_ALWAYS, "error starting user " - "wm for user %s - pid %d", username, g_getpid()); + "wm for user %s - pid %d", s->username, g_getpid()); /* logging parameters */ log_message(LOG_LEVEL_DEBUG, "errno: %d, " "description: %s", g_get_errno(), g_get_strerror()); @@ -594,7 +607,7 @@ session_start_fork(int width, int height, int bpp, char *username, g_execlp3(text, g_cfg->default_wm, 0); log_message(LOG_LEVEL_ALWAYS, "error starting default " - "wm for user %s - pid %d", username, g_getpid()); + "wm for user %s - pid %d", s->username, g_getpid()); /* logging parameters */ log_message(LOG_LEVEL_DEBUG, "errno: %d, description: " "%s", g_get_errno(), g_get_strerror()); @@ -609,7 +622,7 @@ session_start_fork(int width, int height, int bpp, char *username, /* should not get here */ log_message(LOG_LEVEL_ALWAYS, "error starting xterm " - "for user %s - pid %d", username, g_getpid()); + "for user %s - pid %d", s->username, g_getpid()); /* logging parameters */ log_message(LOG_LEVEL_DEBUG, "errno: %d, description: " "%s", g_get_errno(), g_get_strerror()); @@ -642,7 +655,7 @@ session_start_fork(int width, int height, int bpp, char *username, { if (type == SESMAN_SESSION_TYPE_XVNC) { - env_set_user(username, + env_set_user(s->username, &passwd_file, display, g_cfg->session_variables1, @@ -650,7 +663,7 @@ session_start_fork(int width, int height, int bpp, char *username, } else { - env_set_user(username, + env_set_user(s->username, 0, display, g_cfg->session_variables1, @@ -665,8 +678,39 @@ session_start_fork(int width, int height, int bpp, char *username, g_snprintf(text, 255, "%d", g_cfg->sess.kill_disconnected); g_setenv("XRDP_SESMAN_KILL_DISCONNECTED", text, 1); + /* prepare the Xauthority stuff */ + if (g_getenv("XAUTHORITY") != NULL) + { + g_snprintf(authfile, 255, "%s", g_getenv("XAUTHORITY")); + } + else + { + g_snprintf(authfile, 255, "%s", ".Xauthority"); + } + + /* Add the entry in XAUTHORITY file or exit if error */ + if (add_xauth_cookie(display, authfile) != 0) + { + g_exit(1); + } + if (type == SESMAN_SESSION_TYPE_XORG) { +#ifdef HAVE_SYS_PRCTL_H + /* + * Make sure Xorg doesn't run setuid root. Root access is not + * needed. Xorg can fail when run as root and the user has no + * console permissions. + * PR_SET_NO_NEW_PRIVS requires Linux kernel 3.5 and newer. + */ + if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) < 0) + { + log_message(LOG_LEVEL_WARNING, + "Failed to disable setuid on X server: %s", + g_get_strerror()); + } +#endif + xserver_params = list_create(); xserver_params->auto_free = 1; @@ -676,6 +720,8 @@ session_start_fork(int width, int height, int bpp, char *username, /* these are the must have parameters */ list_add_item(xserver_params, (tintptr) g_strdup(xserver)); list_add_item(xserver_params, (tintptr) g_strdup(screen)); + list_add_item(xserver_params, (tintptr) g_strdup("-auth")); + list_add_item(xserver_params, (tintptr) g_strdup(authfile)); /* additional parameters from sesman.ini file */ list_append_list_strdup(g_cfg->xorg_params, xserver_params, 1); @@ -688,10 +734,10 @@ session_start_fork(int width, int height, int bpp, char *username, log_message(LOG_LEVEL_INFO, "%s", dumpItemsToString(xserver_params, execvpparams, 2048)); /* some args are passed via env vars */ - g_sprintf(geometry, "%d", width); + g_sprintf(geometry, "%d", s->width); g_setenv("XRDP_START_WIDTH", geometry, 1); - g_sprintf(geometry, "%d", height); + g_sprintf(geometry, "%d", s->height); g_setenv("XRDP_START_HEIGHT", geometry, 1); /* fire up Xorg */ @@ -699,7 +745,9 @@ session_start_fork(int width, int height, int bpp, char *username, } else if (type == SESMAN_SESSION_TYPE_XVNC) { - env_check_password_file(passwd_file, password); + char guid_str[64]; + g_bytes_to_hexstr(s->guid, 16, guid_str, 64); + env_check_password_file(passwd_file, guid_str); xserver_params = list_create(); xserver_params->auto_free = 1; @@ -709,6 +757,8 @@ session_start_fork(int width, int height, int bpp, char *username, /* these are the must have parameters */ list_add_item(xserver_params, (tintptr)g_strdup(xserver)); list_add_item(xserver_params, (tintptr)g_strdup(screen)); + list_add_item(xserver_params, (tintptr)g_strdup("-auth")); + list_add_item(xserver_params, (tintptr)g_strdup(authfile)); list_add_item(xserver_params, (tintptr)g_strdup("-geometry")); list_add_item(xserver_params, (tintptr)g_strdup(geometry)); list_add_item(xserver_params, (tintptr)g_strdup("-depth")); @@ -740,6 +790,8 @@ session_start_fork(int width, int height, int bpp, char *username, /* these are the must have parameters */ list_add_item(xserver_params, (tintptr)g_strdup(xserver)); list_add_item(xserver_params, (tintptr)g_strdup(screen)); + list_add_item(xserver_params, (tintptr)g_strdup("-auth")); + list_add_item(xserver_params, (tintptr)g_strdup(authfile)); list_add_item(xserver_params, (tintptr)g_strdup("-geometry")); list_add_item(xserver_params, (tintptr)g_strdup(geometry)); list_add_item(xserver_params, (tintptr)g_strdup("-depth")); @@ -759,13 +811,13 @@ session_start_fork(int width, int height, int bpp, char *username, else { log_message(LOG_LEVEL_ALWAYS, "bad session type - " - "user %s - pid %d", username, g_getpid()); + "user %s - pid %d", s->username, g_getpid()); g_exit(1); } /* should not get here */ log_message(LOG_LEVEL_ALWAYS, "error starting X server " - "- user %s - pid %d", username, g_getpid()); + "- user %s - pid %d", s->username, g_getpid()); /* logging parameters */ log_message(LOG_LEVEL_DEBUG, "errno: %d, description: " @@ -790,7 +842,7 @@ session_start_fork(int width, int height, int bpp, char *username, g_snprintf(text, 255, ":%d.0", display); g_setenv("DISPLAY", text, 1); /* new style waiting for clients */ - session_start_sessvc(xpid, wmpid, data, username, display); + session_start_sessvc(xpid, wmpid, data, s->username, display); } } } @@ -798,12 +850,13 @@ session_start_fork(int width, int height, int bpp, char *username, { temp->item->pid = pid; temp->item->display = display; - temp->item->width = width; - temp->item->height = height; - temp->item->bpp = bpp; + temp->item->width = s->width; + temp->item->height = s->height; + temp->item->bpp = s->bpp; temp->item->data = data; - g_strncpy(temp->item->client_ip, client_ip, 255); /* store client ip data */ - g_strncpy(temp->item->name, username, 255); + g_strncpy(temp->item->client_ip, s->client_ip, 255); /* store client ip data */ + g_strncpy(temp->item->name, s->username, 255); + g_memcpy(temp->item->guid, s->guid, 16); ltime = g_time1(); localtime_r(<ime, &stime); @@ -867,13 +920,9 @@ session_reconnect_fork(int display, char *username) /* called by a worker thread, ask the main thread to call session_sync_start and wait till done */ int DEFAULT_CC -session_start(int width, int height, int bpp, char *username, char *password, - long data, tui8 type, char *domain, char *program, - char *directory, char *client_ip) +session_start(long data, tui8 type, struct SCP_SESSION *s) { - return session_start_fork(width, height, bpp, username, - password, data, type, domain, - program, directory, client_ip); + return session_start_fork(data, type, s); } /******************************************************************************/ @@ -948,7 +997,7 @@ session_kill(int pid) /******************************************************************************/ void DEFAULT_CC -session_sigkill_all() +session_sigkill_all(void) { struct session_chain *tmp; diff --git a/sesman/session.h b/sesman/session.h index 80dbdaba..04bf4267 100644 --- a/sesman/session.h +++ b/sesman/session.h @@ -76,6 +76,7 @@ struct session_item struct session_date disconnect_time; struct session_date idle_time; char client_ip[256]; + tui8 guid[16]; }; struct session_chain @@ -104,9 +105,7 @@ session_get_bydata(const char *name, int width, int height, int bpp, int type, * */ int DEFAULT_CC -session_start(int width, int height, int bpp, char* username, char* password, - long data, tui8 type, char* domain, char* program, - char* directory, char* client_ip); +session_start(long data, tui8 type, struct SCP_SESSION *s); int DEFAULT_CC session_reconnect(int display, char* username); @@ -128,7 +127,7 @@ session_kill(int pid); * */ void DEFAULT_CC -session_sigkill_all(); +session_sigkill_all(void); /** * diff --git a/sesman/sig.c b/sesman/sig.c index 579b5876..10fb3ff1 100644 --- a/sesman/sig.c +++ b/sesman/sig.c @@ -24,9 +24,9 @@ * */ -#include "sesman.h" +#include <signal.h> -#include "signal.h" +#include "sesman.h" extern int g_sck; extern int g_pid; @@ -167,7 +167,7 @@ sig_handler_thread(void *arg) do { - LOG_DBG(&(g_cfg->log), "calling sigwait()", 0); + LOG_DBG("calling sigwait()"); sigwait(&waitmask, &recv_signal); switch (recv_signal) @@ -175,22 +175,22 @@ sig_handler_thread(void *arg) case SIGHUP: //reload cfg //we must stop & restart logging, or copy logging cfg!!!! - LOG_DBG("sesman received SIGHUP", 0); + LOG_DBG("sesman received SIGHUP"); //return 0; break; case SIGCHLD: /* a session died */ - LOG_DBG("sesman received SIGCHLD", 0); + LOG_DBG("sesman received SIGCHLD"); sig_sesman_session_end(SIGCHLD); break; case SIGINT: /* we die */ - LOG_DBG("sesman received SIGINT", 0); + LOG_DBG("sesman received SIGINT"); sig_sesman_shutdown(recv_signal); break; case SIGTERM: /* we die */ - LOG_DBG("sesman received SIGTERM", 0); + LOG_DBG("sesman received SIGTERM"); sig_sesman_shutdown(recv_signal); break; } diff --git a/sesman/tools/Makefile.am b/sesman/tools/Makefile.am index 44bf068b..9d6d6f9e 100644 --- a/sesman/tools/Makefile.am +++ b/sesman/tools/Makefile.am @@ -7,6 +7,10 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/sesman/libscp \ -I$(top_srcdir)/sesman +if XRDP_DEBUG +AM_CPPFLAGS += -DXRDP_DEBUG +endif + AM_CFLAGS = $(X_CFLAGS) bin_PROGRAMS = \ diff --git a/sesman/tools/sesadmin.c b/sesman/tools/sesadmin.c index 648598da..7d66ad2e 100644 --- a/sesman/tools/sesadmin.c +++ b/sesman/tools/sesadmin.c @@ -37,7 +37,7 @@ struct log_config logging; void cmndList(struct SCP_CONNECTION *c); void cmndKill(struct SCP_CONNECTION *c, struct SCP_SESSION *s); -void cmndHelp(); +void cmndHelp(void); int inputSession(struct SCP_SESSION *s); unsigned int menuSelect(unsigned int choices); @@ -173,7 +173,7 @@ int main(int argc, char **argv) return 0; } -void cmndHelp() +void cmndHelp(void) { fprintf(stderr, "sesadmin - a console sesman administration tool\n"); fprintf(stderr, "syntax: sesadmin [] COMMAND [OPTIONS]\n\n"); @@ -183,8 +183,8 @@ void cmndHelp() fprintf(stderr, "-i=<port> : sesman port (default 3350)\n"); fprintf(stderr, "-c=<command> : command to execute on the server [MANDATORY]\n"); fprintf(stderr, " it can be one of those:\n"); - fprintf(stderr, " LIST\n"); - fprintf(stderr, " KILL:<sid>\n"); + fprintf(stderr, " list\n"); + fprintf(stderr, " kill:<sid>\n"); } void cmndList(struct SCP_CONNECTION *c) diff --git a/sesman/xauth.c b/sesman/xauth.c new file mode 100644 index 00000000..003fb866 --- /dev/null +++ b/sesman/xauth.c @@ -0,0 +1,62 @@ +/** + * xrdp: A Remote Desktop Protocol server. + * + * Copyright (C) Emmanuel Blindauer 2016 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + * @file xauth.c + * @brief XAUTHORITY handling code + * + */ + +#include <stdio.h> +#include "log.h" +#include "os_calls.h" + + +/******************************************************************************/ +int DEFAULT_CC +add_xauth_cookie(int display, const char *file) +{ + FILE *dp; + char cookie_str[33]; + char cookie_bin[16]; + char xauth_str[256]; + int ret; + + g_random(cookie_bin, 16); + g_bytes_to_hexstr(cookie_bin, 16, cookie_str, 33); + + g_sprintf(xauth_str, "xauth -q -f %s add :%d . %s", + file, display, cookie_str); + + dp = popen(xauth_str, "r"); + if (dp == NULL) + { + log_message(LOG_LEVEL_ERROR, "Unable to launch xauth"); + return 1; + } + + ret = pclose(dp); + if (ret < 0) + { + log_message(LOG_LEVEL_ERROR, "An error occurred while running xauth"); + return 1; + } + + return 0; +} diff --git a/sesman/xauth.h b/sesman/xauth.h new file mode 100644 index 00000000..3254d635 --- /dev/null +++ b/sesman/xauth.h @@ -0,0 +1,41 @@ +/** + * xrdp: A Remote Desktop Protocol server. + * + * Copyright (C) Emmanuel Blindauer 2016 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + * @file xauth.c + * @brief XAUTHORITY handling code + * + */ + +#ifndef XAUTH_H +#define XAUTH_H + +/** + * + * @brief create the XAUTHORITY file for the user according to the display and the cookie + * xauth uses XAUTHORITY if defined, ~/.Xauthority otherwise + * @param display The session display + * @param file If not NULL, write the authorization in the file instead of default location + * @return 0 if adding the cookie is ok + */ + +int DEFAULT_CC +add_xauth_cookie(int display, const char *file); + +#endif diff --git a/vnc/Makefile.am b/vnc/Makefile.am index 453022f4..c4fcf3fc 100644 --- a/vnc/Makefile.am +++ b/vnc/Makefile.am @@ -5,6 +5,10 @@ AM_CPPFLAGS = \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common +if XRDP_DEBUG +AM_CPPFLAGS += -DXRDP_DEBUG +endif + module_LTLIBRARIES = \ libvnc.la @@ -14,3 +18,5 @@ libvnc_la_SOURCES = \ libvnc_la_LIBADD = \ $(top_builddir)/common/libcommon.la + +libvnc_la_LDFLAGS = -avoid-version -module @@ -49,15 +49,37 @@ lib_send_copy(struct vnc *v, struct stream *s) /******************************************************************************/ /* taken from vncauth.c */ -void DEFAULT_CC -rfbEncryptBytes(char *bytes, char *passwd) +/* performing the des3 crypt on the password so it can not be seen + on the wire + 'bytes' in, contains 16 bytes server random + out, random and 'passwd' conbined */ +static void APP_CC +rfbEncryptBytes(char *bytes, const char *passwd) { char key[24]; + void *des; + int len; + + /* key is simply password padded with nulls */ + g_memset(key, 0, sizeof(key)); + len = MIN(g_strlen(passwd), 8); + g_mirror_memcpy(key, passwd, len); + des = ssl_des3_encrypt_info_create(key, 0); + ssl_des3_encrypt(des, 8, bytes, bytes); + ssl_des3_info_delete(des); + des = ssl_des3_encrypt_info_create(key, 0); + ssl_des3_encrypt(des, 8, bytes + 8, bytes + 8); + ssl_des3_info_delete(des); +} + +/******************************************************************************/ +/* sha1 hash 'passwd', create a string from the hash and call rfbEncryptBytes */ +static void APP_CC +rfbHashEncryptBytes(char *bytes, const char *passwd) +{ char passwd_hash[20]; char passwd_hash_text[40]; - void *des; void *sha1; - int len; int passwd_bytes; /* create password hash from password */ @@ -72,18 +94,7 @@ rfbEncryptBytes(char *bytes, char *passwd) (tui8)passwd_hash[0], (tui8)passwd_hash[1], (tui8)passwd_hash[2], (tui8)passwd_hash[3]); passwd_hash_text[39] = 0; - passwd = passwd_hash_text; - - /* key is simply password padded with nulls */ - g_memset(key, 0, sizeof(key)); - len = MIN(g_strlen(passwd), 8); - g_mirror_memcpy(key, passwd, len); - des = ssl_des3_encrypt_info_create(key, 0); - ssl_des3_encrypt(des, 8, bytes, bytes); - ssl_des3_info_delete(des); - des = ssl_des3_encrypt_info_create(key, 0); - ssl_des3_encrypt(des, 8, bytes + 8, bytes + 8); - ssl_des3_info_delete(des); + rfbEncryptBytes(bytes, passwd_hash_text); } /******************************************************************************/ @@ -1083,7 +1094,16 @@ lib_mod_connect(struct vnc *v) if (error == 0) { init_stream(s, 8192); - rfbEncryptBytes(s->data, v->password); + if (v->got_guid) + { + char guid_str[64]; + g_bytes_to_hexstr(v->guid, 16, guid_str, 64); + rfbHashEncryptBytes(s->data, guid_str); + } + else + { + rfbEncryptBytes(s->data, v->password); + } s->p += 16; s_mark_end(s); error = trans_force_write_s(v->trans, s); @@ -1268,7 +1288,7 @@ lib_mod_connect(struct vnc *v) out_uint8(pixel_format, 0); /* blue shift */ out_uint8s(pixel_format, 3); /* pad */ } - else if (v->mod_bpp == 24) + else if (v->mod_bpp == 24 || v->mod_bpp == 32) { out_uint8(pixel_format, 32); /* bits per pixel */ out_uint8(pixel_format, 24); /* depth */ @@ -1368,7 +1388,6 @@ lib_mod_connect(struct vnc *v) trans_delete(v->trans); v->trans = 0; v->server_msg(v, "some problem", 0); - LIB_DEBUG(mod, "out lib_mod_connect error"); return 1; } else @@ -1396,7 +1415,7 @@ lib_mod_end(struct vnc *v) /******************************************************************************/ int DEFAULT_CC -lib_mod_set_param(struct vnc *v, const char *name, char *value) +lib_mod_set_param(struct vnc *v, const char *name, const char *value) { if (g_strcasecmp(name, "username") == 0) { @@ -1422,6 +1441,11 @@ lib_mod_set_param(struct vnc *v, const char *name, char *value) { v->delay_ms = g_atoi(value); } + else if (g_strcasecmp(name, "guid") == 0) + { + v->got_guid = 1; + g_memcpy(v->guid, value, 16); + } return 0; } @@ -37,7 +37,7 @@ struct vnc long param3, long param4); int (*mod_signal)(struct vnc* v); int (*mod_end)(struct vnc* v); - int (*mod_set_param)(struct vnc* v, const char *name, char* value); + int (*mod_set_param)(struct vnc *v, const char *name, const char *value); int (*mod_session_change)(struct vnc* v, int, int); int (*mod_get_wait_objs)(struct vnc* v, tbus* read_objs, int* rcount, tbus* write_objs, int* wcount, int* timeout); @@ -114,4 +114,6 @@ struct vnc struct stream *clip_data_s; int delay_ms; struct trans *trans; + int got_guid; + tui8 guid[16]; }; diff --git a/xorg/X11R7.6/rdp/.gitignore b/xorg/X11R7.6/rdp/.gitignore new file mode 100644 index 00000000..c72c2cb4 --- /dev/null +++ b/xorg/X11R7.6/rdp/.gitignore @@ -0,0 +1 @@ +X11rdp diff --git a/xorg/X11R7.6/rdp/rdp.h b/xorg/X11R7.6/rdp/rdp.h index bc34778b..9c373068 100644 --- a/xorg/X11R7.6/rdp/rdp.h +++ b/xorg/X11R7.6/rdp/rdp.h @@ -90,7 +90,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # endif #endif -#define X11RDPVER "0.9.0" +#define X11RDPVER "0.9.1" #define PixelDPI 100 #define PixelToMM(_size) (((_size) * 254 + (PixelDPI) * 5) / ((PixelDPI) * 10)) diff --git a/xorg/X11R7.6/rdp/rdprandr.c b/xorg/X11R7.6/rdp/rdprandr.c index 2a040a9b..664a2244 100644 --- a/xorg/X11R7.6/rdp/rdprandr.c +++ b/xorg/X11R7.6/rdp/rdprandr.c @@ -321,11 +321,15 @@ rdpRRAddOutput(const char *aname, int x, int y, int width, int height) RROutputPtr output; xRRModeInfo modeInfo; char name[64]; + const int vfreq = 50; sprintf (name, "%dx%d", width, height); memset (&modeInfo, 0, sizeof(modeInfo)); modeInfo.width = width; modeInfo.height = height; + modeInfo.hTotal = width; + modeInfo.vTotal = height; + modeInfo.dotClock = vfreq * width * height; modeInfo.nameLength = strlen(name); mode = RRModeGet(&modeInfo, name); if (mode == 0) diff --git a/xorg/tests/xdemo/xdemo.c b/xorg/tests/xdemo/xdemo.c index cef93274..5e936747 100644 --- a/xorg/tests/xdemo/xdemo.c +++ b/xorg/tests/xdemo/xdemo.c @@ -823,7 +823,7 @@ int drawBMP(char *filename, int scroll_type) return 0; } -int process_bmp_event() +int process_bmp_event(void) { XEvent ev; long event_mask; diff --git a/xrdp/Makefile.am b/xrdp/Makefile.am index e24f22e2..3765f203 100644 --- a/xrdp/Makefile.am +++ b/xrdp/Makefile.am @@ -1,3 +1,8 @@ +EXTRA_DIST = \ + czech.txt \ + rdp-scan-codes.txt \ + xrdpwin.c + AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ @@ -12,20 +17,24 @@ XRDP_EXTRA_LIBS = if XRDP_DEBUG AM_CPPFLAGS += -DXRDP_DEBUG -else -AM_CPPFLAGS += -DXRDP_NODEBUG endif if XRDP_RFXCODEC AM_CPPFLAGS += -DXRDP_RFXCODEC AM_CPPFLAGS += -I$(top_srcdir)/librfxcodec/include -XRDP_EXTRA_LIBS += $(top_srcdir)/librfxcodec/src/.libs/librfxencode.a +XRDP_EXTRA_LIBS += $(top_builddir)/librfxcodec/src/.libs/librfxencode.a endif if XRDP_PIXMAN AM_CPPFLAGS += -DXRDP_PIXMAN -AM_CPPFLAGS += $(XRDP_PIXMAN_CFLAGS) -XRDP_EXTRA_LIBS += $(XRDP_PIXMAN_LIBS) +AM_CPPFLAGS += $(PIXMAN_CFLAGS) +XRDP_EXTRA_LIBS += $(PIXMAN_LIBS) +endif + +if XRDP_PAINTER +AM_CPPFLAGS += -DXRDP_PAINTER +AM_CPPFLAGS += -I$(top_srcdir)/libpainter/include +XRDP_EXTRA_LIBS += $(top_builddir)/libpainter/src/.libs/libpainter.a endif sbin_PROGRAMS = \ diff --git a/xrdp/xrdp.ini b/xrdp/xrdp.ini index 1ebfd52e..242641ff 100644 --- a/xrdp/xrdp.ini +++ b/xrdp/xrdp.ini @@ -31,8 +31,10 @@ key_file= #tls_ciphers=HIGH ; Section name to use for automatic login if the client sends username -; and password -autorun=X11rdp +; and password. If empty, the domain name sent by the client is used. +; If empty and no domain name is given, the first suitable section in +; this file will be used. +autorun= allow_channels=true allow_multimon=true @@ -162,7 +164,6 @@ username=ask password=ask ip=127.0.0.1 port=-1 -xserverbpp=24 code=20 [Xvnc] @@ -172,6 +173,7 @@ username=ask password=ask ip=127.0.0.1 port=-1 +#xserverbpp=24 #delay_ms=2000 [console] diff --git a/xrdp/xrdp_bitmap.c b/xrdp/xrdp_bitmap.c index 9ffc6284..deb56a2c 100644 --- a/xrdp/xrdp_bitmap.c +++ b/xrdp/xrdp_bitmap.c @@ -123,6 +123,14 @@ xrdp_bitmap_create(int width, int height, int bpp, self->data = (char *)g_malloc(width * height * Bpp, 0); } +#if defined(XRDP_PAINTER) + if (self->type == WND_TYPE_SCREEN) /* noorders */ + { + LLOGLN(0, ("xrdp_bitmap_create: noorders")); + self->data = (char *) g_malloc(width * height * Bpp, 0); + } +#endif + if (self->type != WND_TYPE_BITMAP) { self->child_list = list_create(); @@ -149,9 +157,9 @@ xrdp_bitmap_create_with_data(int width, int height, struct xrdp_wm *wm) { struct xrdp_bitmap *self = (struct xrdp_bitmap *)NULL; + int Bpp; #if defined(NEED_ALIGN) tintptr data_as_int; - int Bpp; #endif self = (struct xrdp_bitmap *)g_malloc(sizeof(struct xrdp_bitmap), 1); @@ -160,6 +168,22 @@ xrdp_bitmap_create_with_data(int width, int height, self->height = height; self->bpp = bpp; self->wm = wm; + + Bpp = 4; + switch (bpp) + { + case 8: + Bpp = 1; + break; + case 15: + Bpp = 2; + break; + case 16: + Bpp = 2; + break; + } + self->line_size = width * Bpp; + #if defined(NEED_ALIGN) data_as_int = (tintptr) data; if (((bpp >= 24) && (data_as_int & 3)) || @@ -167,19 +191,6 @@ xrdp_bitmap_create_with_data(int width, int height, { /* got to copy data here, it's not aligned other calls in this file assume alignment */ - Bpp = 4; - switch (bpp) - { - case 8: - Bpp = 1; - break; - case 15: - Bpp = 2; - break; - case 16: - Bpp = 2; - break; - } self->data = (char *)g_malloc(width * height * Bpp, 0); g_memcpy(self->data, data, width * height * Bpp); return self; diff --git a/xrdp/xrdp_encoder.c b/xrdp/xrdp_encoder.c index ff6db7b7..0af0b85e 100644 --- a/xrdp/xrdp_encoder.c +++ b/xrdp/xrdp_encoder.c @@ -42,8 +42,10 @@ /*****************************************************************************/ static int process_enc_jpg(struct xrdp_encoder *self, XRDP_ENC_DATA *enc); +#ifdef XRDP_RFXCODEC static int process_enc_rfx(struct xrdp_encoder *self, XRDP_ENC_DATA *enc); +#endif static int process_enc_h264(struct xrdp_encoder *self, XRDP_ENC_DATA *enc); @@ -52,15 +54,17 @@ struct xrdp_encoder *APP_CC xrdp_encoder_create(struct xrdp_mm *mm) { struct xrdp_encoder *self; + struct xrdp_client_info *client_info; char buf[1024]; int pid; - if (mm->wm->client_info->mcs_connection_type != 6) /* LAN */ + client_info = mm->wm->client_info; + + if (client_info->mcs_connection_type != 6) /* LAN */ { return 0; } - - if (mm->wm->client_info->bpp < 24) + if (client_info->bpp < 24) { return 0; } @@ -68,39 +72,38 @@ xrdp_encoder_create(struct xrdp_mm *mm) self = (struct xrdp_encoder *)g_malloc(sizeof(struct xrdp_encoder), 1); self->mm = mm; - if (mm->wm->client_info->jpeg_codec_id != 0) + if (client_info->jpeg_codec_id != 0) { LLOGLN(0, ("xrdp_encoder_create: starting jpeg codec session")); - self->codec_id = mm->wm->client_info->jpeg_codec_id; + self->codec_id = client_info->jpeg_codec_id; self->in_codec_mode = 1; - self->codec_quality = mm->wm->client_info->jpeg_prop[0]; - mm->wm->client_info->capture_code = 0; - mm->wm->client_info->capture_format = + self->codec_quality = client_info->jpeg_prop[0]; + client_info->capture_code = 0; + client_info->capture_format = /* XRDP_a8b8g8r8 */ (32 << 24) | (3 << 16) | (8 << 12) | (8 << 8) | (8 << 4) | 8; self->process_enc = process_enc_jpg; } - else if (mm->wm->client_info->rfx_codec_id != 0) +#ifdef XRDP_RFXCODEC + else if (client_info->rfx_codec_id != 0) { LLOGLN(0, ("xrdp_encoder_create: starting rfx codec session")); - self->codec_id = mm->wm->client_info->rfx_codec_id; + self->codec_id = client_info->rfx_codec_id; self->in_codec_mode = 1; - mm->wm->client_info->capture_code = 2; + client_info->capture_code = 2; self->process_enc = process_enc_rfx; -#ifdef XRDP_RFXCODEC - self->codec_handle = - rfxcodec_encode_create(mm->wm->screen->width, - mm->wm->screen->height, - RFX_FORMAT_YUV, 0); -#endif + self->codec_handle = rfxcodec_encode_create(mm->wm->screen->width, + mm->wm->screen->height, + RFX_FORMAT_YUV, 0); } - else if (mm->wm->client_info->h264_codec_id != 0) +#endif + else if (client_info->h264_codec_id != 0) { LLOGLN(0, ("xrdp_encoder_create: starting h264 codec session")); - self->codec_id = mm->wm->client_info->h264_codec_id; + self->codec_id = client_info->h264_codec_id; self->in_codec_mode = 1; - mm->wm->client_info->capture_code = 3; - mm->wm->client_info->capture_format = + client_info->capture_code = 3; + client_info->capture_format = /* XRDP_nv12 */ (12 << 24) | (64 << 16) | (0 << 12) | (0 << 8) | (0 << 4) | 0; self->process_enc = process_enc_h264; @@ -289,7 +292,6 @@ process_enc_jpg(struct xrdp_encoder *self, XRDP_ENC_DATA *enc) } #ifdef XRDP_RFXCODEC - /*****************************************************************************/ /* called from encoder thread */ static int @@ -392,17 +394,6 @@ process_enc_rfx(struct xrdp_encoder *self, XRDP_ENC_DATA *enc) return 0; } - -#else - -/*****************************************************************************/ -/* called from encoder thread */ -static int -process_enc_rfx(struct xrdp_encoder *self, XRDP_ENC_DATA *enc) -{ - return 0; -} - #endif /*****************************************************************************/ diff --git a/xrdp/xrdp_keyboard.ini b/xrdp/xrdp_keyboard.ini index e185c76d..3ce7644a 100644 --- a/xrdp/xrdp_keyboard.ini +++ b/xrdp/xrdp_keyboard.ini @@ -62,9 +62,7 @@ rdp_layout_de=0x00000407 rdp_layout_fr=0x0000040C rdp_layout_it=0x00000410 rdp_layout_jp=0x00000411 -rdp_layout_jp2=0xe0010411 -rdp_layout_jp3=0xe0200411 -rdp_layout_jp4=0xe0210411 +rdp_layout_kr=0x00000412 rdp_layout_ru=0x00000419 rdp_layout_se=0x0000041D rdp_layout_ch=0x00000807 @@ -79,9 +77,7 @@ rdp_layout_de=de rdp_layout_fr=fr rdp_layout_it=it rdp_layout_jp=jp -rdp_layout_jp2=jp -rdp_layout_jp3=jp -rdp_layout_jp4=jp +rdp_layout_kr=kr rdp_layout_ru=ru rdp_layout_se=se rdp_layout_ch=ch @@ -109,9 +105,7 @@ rdp_layout_us=us rdp_layout_de=de rdp_layout_fr=fr rdp_layout_jp=jp -rdp_layout_jp2=jp -rdp_layout_jp3=jp -rdp_layout_jp4=jp +rdp_layout_kr=kr rdp_layout_it=it rdp_layout_ru=ru rdp_layout_se=se diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index f1a01efa..6cabe582 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -29,7 +29,7 @@ #ifndef USE_NOPAM #if defined(HAVE__PAM_TYPES_H) #define LINUXPAM 1 -#include "security/_pam_types.h" +#include <security/_pam_types.h> #elif defined(HAVE_PAM_CONSTANTS_H) #define OPENPAM 1 #include <security/pam_constants.h> @@ -229,14 +229,19 @@ xrdp_mm_send_login(struct xrdp_mm *self) out_uint16_be(s, self->wm->screen->width); out_uint16_be(s, self->wm->screen->height); - if (xserverbpp > 0) + /* select and send X server bpp */ + if (xserverbpp == 0) { - out_uint16_be(s, xserverbpp); - } - else - { - out_uint16_be(s, self->wm->screen->bpp); + if (self->code == 20) + { + xserverbpp = 24; /* xorgxrdp is always at 24 bpp */ + } + else + { + xserverbpp = self->wm->screen->bpp; /* use client's bpp */ + } } + out_uint16_be(s, xserverbpp); /* send domain */ if(self->wm->client_info->domain[0]!='_') @@ -483,11 +488,11 @@ xrdp_mm_setup_mod1(struct xrdp_mm *self) /*****************************************************************************/ static int APP_CC -xrdp_mm_setup_mod2(struct xrdp_mm *self) +xrdp_mm_setup_mod2(struct xrdp_mm *self, tui8 *guid) { char text[256]; - char *name; - char *value; + const char *name; + const char *value; int i; int rv; int key_flags; @@ -557,17 +562,21 @@ xrdp_mm_setup_mod2(struct xrdp_mm *self) /* always set these */ self->mod->mod_set_param(self->mod, "client_info", - (char *)(self->wm->session->client_info)); + (const char *) (self->wm->session->client_info)); name = self->wm->session->client_info->hostname; self->mod->mod_set_param(self->mod, "hostname", name); g_snprintf(text, 255, "%d", self->wm->session->client_info->keylayout); self->mod->mod_set_param(self->mod, "keylayout", text); + if (guid != 0) + { + self->mod->mod_set_param(self->mod, "guid", (char *) guid); + } for (i = 0; i < self->login_names->count; i++) { - name = (char *)list_get_item(self->login_names, i); - value = (char *)list_get_item(self->login_values, i); + name = (const char *) list_get_item(self->login_names, i); + value = (const char *) list_get_item(self->login_values, i); self->mod->mod_set_param(self->mod, name, value); } @@ -731,8 +740,11 @@ xrdp_mm_trans_process_channel_data(struct xrdp_mm *self, struct trans *trans) if (rv == 0) { - rv = libxrdp_send_to_channel(self->wm->session, chan_id, s->p, size, total_size, - chan_flags); + if (is_channel_allowed(self->wm, chan_id)) + { + rv = libxrdp_send_to_channel(self->wm->session, chan_id, s->p, size, total_size, + chan_flags); + } } return rv; @@ -1195,11 +1207,18 @@ xrdp_mm_process_login_response(struct xrdp_mm *self, struct stream *s) int rv; char ip[256]; char port[256]; + tui8 guid[16]; + tui8* pguid; rv = 0; in_uint16_be(s, ok); in_uint16_be(s, display); - + pguid = 0; + if (s_check_rem(s, 16)) + { + in_uint8a(s, guid, 16); + pguid = guid; + } if (ok) { self->display = display; @@ -1208,7 +1227,7 @@ xrdp_mm_process_login_response(struct xrdp_mm *self, struct stream *s) if (xrdp_mm_setup_mod1(self) == 0) { - if (xrdp_mm_setup_mod2(self) == 0) + if (xrdp_mm_setup_mod2(self, pguid) == 0) { xrdp_mm_get_value(self, "ip", ip, 255); xrdp_wm_set_login_mode(self->wm, 10); @@ -1969,7 +1988,7 @@ xrdp_mm_connect(struct xrdp_mm *self) { if (xrdp_mm_setup_mod1(self) == 0) { - if (xrdp_mm_setup_mod2(self) == 0) + if (xrdp_mm_setup_mod2(self, 0) == 0) { xrdp_wm_set_login_mode(self->wm, 10); rv = 0; /*success*/ @@ -2137,7 +2156,6 @@ xrdp_mm_check_wait_objs(struct xrdp_mm *self) int cx; int cy; int use_frame_acks; - int ex; if (self == 0) { @@ -2242,21 +2260,6 @@ xrdp_mm_check_wait_objs(struct xrdp_mm *self) enc_done->enc->flags, enc_done->enc->frame_id); } - else - { -#if 1 - ex = self->wm->client_info->max_unacknowledged_frame_count; - if (self->encoder->frame_id_client + ex > self->encoder->frame_id_server) - { - if (self->encoder->frame_id_server > self->encoder->frame_id_server_sent) - { - LLOGLN(10, ("xrdp_mm_check_wait_objs: 1 -- %d", self->encoder->frame_id_server)); - self->encoder->frame_id_server_sent = self->encoder->frame_id_server; - self->mod->mod_frame_ack(self->mod, 0, self->encoder->frame_id_server); - } - } -#endif - } g_free(enc_done->enc->drects); g_free(enc_done->enc->crects); g_free(enc_done->enc); @@ -2280,14 +2283,16 @@ xrdp_mm_frame_ack(struct xrdp_mm *self, int frame_id) { int ex; - LLOGLN(0, ("xrdp_mm_frame_ack:")); + LLOGLN(10, ("xrdp_mm_frame_ack: incoming %d, client %d, server %d", frame_id, + self->encoder->frame_id_client, self->encoder->frame_id_server)); self->encoder->frame_id_client = frame_id; if (self->wm->client_info->use_frame_acks == 0) { return 1; } ex = self->wm->client_info->max_unacknowledged_frame_count; - if (self->encoder->frame_id_client + ex > self->encoder->frame_id_server) + /* make sure we won't have too many in-flight frames */ + if (self->encoder->frame_id_client + ex >= self->encoder->frame_id_server) { if (self->encoder->frame_id_server > self->encoder->frame_id_server_sent) { diff --git a/xrdp/xrdp_painter.c b/xrdp/xrdp_painter.c index f5605717..361a6a74 100644 --- a/xrdp/xrdp_painter.c +++ b/xrdp/xrdp_painter.c @@ -20,17 +20,152 @@ #include "xrdp.h" +#if defined(XRDP_PAINTER) +#include <painter.h> /* libpainter */ +#endif + +#define LLOG_LEVEL 1 +#define LLOGLN(_level, _args) \ + do \ + { \ + if (_level < LLOG_LEVEL) \ + { \ + g_write("xrdp:xrdp_painter [%10.10u]: ", g_time3()); \ + g_writeln _args ; \ + } \ + } \ + while (0) + +#if defined(XRDP_PAINTER) + +/*****************************************************************************/ +static int APP_CC +xrdp_painter_add_dirty_rect(struct xrdp_painter *self, int x, int y, + int cx, int cy, struct xrdp_rect *clip_rect) +{ + int x2; + int y2; + struct xrdp_rect rect; + + if (clip_rect != 0) + { + x2 = x + cx; + y2 = y + cy; + x = MAX(x, clip_rect->left); + y = MAX(y, clip_rect->top); + x2 = MIN(x2, clip_rect->right); + y2 = MIN(y2, clip_rect->bottom); + cx = x2 - x; + cy = y2 - y; + } + if (cx < 1 || cy < 1) + { + return 0; + } + rect.left = x; + rect.top = y; + rect.right = x + cx; + rect.bottom = y + cy; + xrdp_region_add_rect(self->dirty_region, &rect); + LLOGLN(10, ("xrdp_painter_add_dirty_rect: x %d y %d cx %d cy %d", + x, y, cx, cy)); + return 0; +} + +/*****************************************************************************/ +static int +xrdp_painter_send_dirty(struct xrdp_painter *self) +{ + int cx; + int cy; + int bpp; + int Bpp; + int index; + int jndex; + int error; + char *ldata; + char *src; + char *dst; + struct xrdp_rect rect; + + LLOGLN(10, ("xrdp_painter_send_dirty:")); + + bpp = self->wm->screen->bpp; + Bpp = (bpp + 7) / 8; + if (Bpp == 3) + { + Bpp = 4; + } + + jndex = 0; + error = xrdp_region_get_rect(self->dirty_region, jndex, &rect); + while (error == 0) + { + cx = rect.right - rect.left; + cy = rect.bottom - rect.top; + ldata = (char *)g_malloc(cx * cy * Bpp, 0); + if (ldata == 0) + { + return 1; + } + src = self->wm->screen->data; + src += self->wm->screen->line_size * rect.top; + src += rect.left * Bpp; + dst = ldata; + for (index = 0; index < cy; index++) + { + g_memcpy(dst, src, cx * Bpp); + src += self->wm->screen->line_size; + dst += cx * Bpp; + } + LLOGLN(10, ("xrdp_painter_send_dirty: x %d y %d cx %d cy %d", + rect.left, rect.top, cx, cy)); + libxrdp_send_bitmap(self->session, cx, cy, bpp, + ldata, rect.left, rect.top, cx, cy); + g_free(ldata); + + jndex++; + error = xrdp_region_get_rect(self->dirty_region, jndex, &rect); + } + + xrdp_region_delete(self->dirty_region); + self->dirty_region = xrdp_region_create(self->wm); + + return 0; +} + +#endif + /*****************************************************************************/ struct xrdp_painter *APP_CC xrdp_painter_create(struct xrdp_wm *wm, struct xrdp_session *session) { struct xrdp_painter *self; + LLOGLN(10, ("xrdp_painter_create:")); self = (struct xrdp_painter *)g_malloc(sizeof(struct xrdp_painter), 1); self->wm = wm; self->session = session; - self->rop = 0xcc; /* copy will use 0xcc*/ + self->rop = 0xcc; /* copy will use 0xcc */ self->clip_children = 1; + + + if (self->session->client_info->no_orders_supported) + { +#if defined(XRDP_PAINTER) + if (painter_create(&(self->painter)) != PT_ERROR_NONE) + { + self->painter = 0; + LLOGLN(0, ("xrdp_painter_create: painter_create failed")); + } + else + { + LLOGLN(10, ("xrdp_painter_create: painter_create success")); + } + self->dirty_region = xrdp_region_create(wm); +#endif + } + return self; } @@ -38,11 +173,17 @@ xrdp_painter_create(struct xrdp_wm *wm, struct xrdp_session *session) void APP_CC xrdp_painter_delete(struct xrdp_painter *self) { + LLOGLN(10, ("xrdp_painter_delete:")); if (self == 0) { return; } +#if defined(XRDP_PAINTER) + painter_delete(self->painter); + xrdp_region_delete(self->dirty_region); +#endif + g_free(self); } @@ -54,6 +195,13 @@ wm_painter_set_target(struct xrdp_painter *self) int index; struct list *del_list; + LLOGLN(10, ("wm_painter_set_target:")); + + if (self->painter != 0) + { + return 0; + } + if (self->wm->target_surface->type == WND_TYPE_SCREEN) { if (self->wm->current_surface_index != 0xffff) @@ -97,11 +245,19 @@ wm_painter_set_target(struct xrdp_painter *self) int APP_CC xrdp_painter_begin_update(struct xrdp_painter *self) { + LLOGLN(10, ("xrdp_painter_begin_update:")); if (self == 0) { return 0; } + self->begin_end_level++; + + if (self->painter != 0) + { + return 0; + } + libxrdp_orders_init(self->session); wm_painter_set_target(self); return 0; @@ -111,11 +267,25 @@ xrdp_painter_begin_update(struct xrdp_painter *self) int APP_CC xrdp_painter_end_update(struct xrdp_painter *self) { + LLOGLN(10, ("xrdp_painter_end_update:")); if (self == 0) { return 0; } + self->begin_end_level--; + + if (self->painter != 0) + { +#if defined(XRDP_PAINTER) + if (self->begin_end_level == 0) + { + xrdp_painter_send_dirty(self); + return 0; + } +#endif + } + libxrdp_orders_send(self->session); return 0; } @@ -270,6 +440,7 @@ xrdp_painter_text_width(struct xrdp_painter *self, const char *text) struct xrdp_font_char *font_item; twchar *wstr; + LLOGLN(10, ("xrdp_painter_text_width:")); xrdp_painter_font_needed(self); if (self->font == 0) @@ -307,6 +478,7 @@ xrdp_painter_text_height(struct xrdp_painter *self, const char *text) struct xrdp_font_char *font_item; twchar *wstr; + LLOGLN(10, ("xrdp_painter_text_height:")); xrdp_painter_font_needed(self); if (self->font == 0) @@ -342,6 +514,13 @@ xrdp_painter_setup_brush(struct xrdp_painter *self, { int cache_id; + LLOGLN(10, ("xrdp_painter_setup_brush:")); + + if (self->painter != 0) + { + return 0; + } + g_memcpy(out_brush, in_brush, sizeof(struct xrdp_brush)); if (in_brush->style == 3) @@ -358,6 +537,38 @@ xrdp_painter_setup_brush(struct xrdp_painter *self, return 0; } +#if defined(XRDP_PAINTER) + +/*****************************************************************************/ +static int APP_CC +get_pt_format(struct xrdp_painter *self) +{ + switch (self->wm->screen->bpp) + { + case 8: + return PT_FORMAT_r3g3b2; + case 15: + return PT_FORMAT_a1r5g5b5; + case 16: + return PT_FORMAT_r5g6b5; + } + return PT_FORMAT_a8r8g8b8; +} + +/*****************************************************************************/ +static int +get_rgb_from_rdp_color(struct xrdp_painter *self, int rdp_color) +{ + if (self->wm->screen->bpp < 24) + { + return rdp_color; + } + /* well, this is really BGR2RGB */ + return XR_RGB2BGR(rdp_color); +} + +#endif + /*****************************************************************************/ /* fill in an area of the screen with one color */ int APP_CC @@ -375,11 +586,120 @@ xrdp_painter_fill_rect(struct xrdp_painter *self, int dy; int rop; + LLOGLN(10, ("xrdp_painter_fill_rect:")); + if (self == 0) { return 0; } + dx = 0; + dy = 0; + + if (self->painter != 0) + { +#if defined(XRDP_PAINTER) + struct painter_bitmap dst_pb; + struct xrdp_bitmap *ldst; + struct painter_bitmap pat; + + LLOGLN(10, ("xrdp_painter_fill_rect: dst->type %d", dst->type)); + if (dst->type != WND_TYPE_OFFSCREEN) + { + LLOGLN(10, ("xrdp_painter_fill_rect: using painter")); + + ldst = self->wm->screen; + + g_memset(&dst_pb, 0, sizeof(dst_pb)); + dst_pb.format = get_pt_format(self); + dst_pb.width = ldst->width; + dst_pb.stride_bytes = ldst->line_size; + dst_pb.height = ldst->height; + dst_pb.data = ldst->data; + + LLOGLN(10, ("xrdp_painter_fill_rect: ldst->width %d ldst->height %d " + "dst->data %p self->fg_color %d", + ldst->width, ldst->height, ldst->data, self->fg_color)); + + xrdp_bitmap_get_screen_clip(dst, self, &clip_rect, &dx, &dy); + region = xrdp_region_create(self->wm); + xrdp_wm_get_vis_region(self->wm, dst, x, y, cx, cy, region, + self->clip_children); + x += dx; + y += dy; + + rop = self->rop; + switch (self->rop) + { + case 0x5a: + rop = PT_ROP_DSx; + break; + case 0xf0: + rop = PT_ROP_S; + break; + case 0xfb: + rop = PT_ROP_D; + break; + case 0xc0: + rop = PT_ROP_DSa; + break; + } + painter_set_rop(self->painter, rop); + + if (self->mix_mode == 0) + { + painter_set_pattern_mode(self->painter, PT_PATTERN_MODE_OPAQUE); + painter_set_fgcolor(self->painter, get_rgb_from_rdp_color(self, self->fg_color)); + k = 0; + while (xrdp_region_get_rect(region, k, &rect) == 0) + { + if (rect_intersect(&rect, &clip_rect, &draw_rect)) + { + painter_set_clip(self->painter, + draw_rect.left, draw_rect.top, + draw_rect.right - draw_rect.left, + draw_rect.bottom - draw_rect.top); + painter_fill_rect(self->painter, &dst_pb, x, y, cx, cy); + xrdp_painter_add_dirty_rect(self, x, y, cx, cy, &draw_rect); + } + k++; + } + } + else + { + painter_set_pattern_mode(self->painter, PT_PATTERN_MODE_OPAQUE); + painter_set_fgcolor(self->painter, get_rgb_from_rdp_color(self, self->fg_color)); + painter_set_bgcolor(self->painter, get_rgb_from_rdp_color(self, self->bg_color)); + painter_set_pattern_origin(self->painter, self->brush.x_origin, self->brush.y_origin); + g_memset(&pat, 0, sizeof(pat)); + pat.format = PT_FORMAT_c1; + pat.width = 8; + pat.stride_bytes = 1; + pat.height = 8; + pat.data = self->brush.pattern; + k = 0; + while (xrdp_region_get_rect(region, k, &rect) == 0) + { + if (rect_intersect(&rect, &clip_rect, &draw_rect)) + { + painter_set_clip(self->painter, + draw_rect.left, draw_rect.top, + draw_rect.right - draw_rect.left, + draw_rect.bottom - draw_rect.top); + painter_fill_pattern(self->painter, &dst_pb, &pat, + x, y, x, y, cx, cy); + xrdp_painter_add_dirty_rect(self, x, y, cx, cy, &draw_rect); + } + k++; + } + } + painter_clear_clip(self->painter); + xrdp_region_delete(region); + } + return 0; +#endif + } + /* todo data */ if (dst->type == WND_TYPE_BITMAP) /* 0 */ @@ -508,11 +828,14 @@ xrdp_painter_draw_text(struct xrdp_painter *self, struct xrdp_font_char *font_item; twchar *wstr; + LLOGLN(10, ("xrdp_painter_draw_text:")); + if (self == 0) { return 0; } + len = g_mbstowcs(0, text, 0); if (len < 1) @@ -534,6 +857,88 @@ xrdp_painter_draw_text(struct xrdp_painter *self, return 0; } + if (self->painter != 0) + { +#if defined(XRDP_PAINTER) + struct painter_bitmap pat; + struct painter_bitmap dst_pb; + struct xrdp_bitmap *ldst; + + if (dst->type != WND_TYPE_OFFSCREEN) + { + ldst = self->wm->screen; + /* convert to wide char */ + wstr = (twchar *)g_malloc((len + 2) * sizeof(twchar), 0); + g_mbstowcs(wstr, text, len + 1); + font = self->font; + total_width = 0; + total_height = 0; + for (index = 0; index < len; index++) + { + font_item = font->font_items + wstr[index]; + k = font_item->incby; + total_width += k; + total_height = MAX(total_height, font_item->height); + } + xrdp_bitmap_get_screen_clip(dst, self, &clip_rect, &dx, &dy); + region = xrdp_region_create(self->wm); + xrdp_wm_get_vis_region(self->wm, dst, x, y, + total_width, total_height, + region, self->clip_children); + x += dx; + y += dy; + g_memset(&dst_pb, 0, sizeof(dst_pb)); + dst_pb.format = get_pt_format(self); + dst_pb.width = ldst->width; + dst_pb.stride_bytes = ldst->line_size; + dst_pb.height = ldst->height; + dst_pb.data = ldst->data; + painter_set_rop(self->painter, PT_ROP_S); + painter_set_pattern_origin(self->painter, 0, 0); + painter_set_pattern_mode(self->painter, PT_PATTERN_MODE_NORMAL); + painter_set_fgcolor(self->painter, + get_rgb_from_rdp_color(self, self->fg_color)); + k = 0; + while (xrdp_region_get_rect(region, k, &rect) == 0) + { + if (rect_intersect(&rect, &clip_rect, &draw_rect)) + { + painter_set_clip(self->painter, + draw_rect.left, draw_rect.top, + draw_rect.right - draw_rect.left, + draw_rect.bottom - draw_rect.top); + for (index = 0; index < len; index++) + { + font_item = font->font_items + wstr[index]; + g_memset(&pat, 0, sizeof(pat)); + pat.format = PT_FORMAT_c1; + pat.width = font_item->width; + pat.stride_bytes = (font_item->width + 7) / 8; + pat.height = font_item->height; + pat.data = font_item->data; + x1 = x + font_item->offset; + y1 = y + (font_item->height + font_item->baseline); + painter_fill_pattern(self->painter, &dst_pb, &pat, + 0, 0, x1, y1, + font_item->width, + font_item->height); + xrdp_painter_add_dirty_rect(self, x, y, + font_item->width, + font_item->height, + &draw_rect); + x += font_item->incby; + } + } + k++; + } + painter_clear_clip(self->painter); + xrdp_region_delete(region); + g_free(wstr); + } + return 0; +#endif + } + /* convert to wide char */ wstr = (twchar *)g_malloc((len + 2) * sizeof(twchar), 0); g_mbstowcs(wstr, text, len + 1); @@ -616,11 +1021,18 @@ xrdp_painter_draw_text2(struct xrdp_painter *self, int dx; int dy; + LLOGLN(0, ("xrdp_painter_draw_text2:")); + if (self == 0) { return 0; } + if (self->painter != 0) + { + return 0; + } + /* todo data */ if (dst->type == WND_TYPE_BITMAP) @@ -711,11 +1123,76 @@ xrdp_painter_copy(struct xrdp_painter *self, int index; struct list *del_list; + LLOGLN(10, ("xrdp_painter_copy:")); + if (self == 0 || src == 0 || dst == 0) { return 0; } + if (self->painter != 0) + { +#if defined(XRDP_PAINTER) + struct painter_bitmap src_pb; + struct painter_bitmap dst_pb; + struct xrdp_bitmap *ldst; + + LLOGLN(10, ("xrdp_painter_copy: src->type %d dst->type %d", src->type, dst->type)); + LLOGLN(10, ("xrdp_painter_copy: self->rop 0x%2.2x", self->rop)); + + if (dst->type != WND_TYPE_OFFSCREEN) + { + LLOGLN(10, ("xrdp_painter_copy: using painter")); + ldst = self->wm->screen; + + g_memset(&dst_pb, 0, sizeof(dst_pb)); + dst_pb.format = get_pt_format(self); + dst_pb.width = ldst->width; + dst_pb.stride_bytes = ldst->line_size; + dst_pb.height = ldst->height; + dst_pb.data = ldst->data; + + g_memset(&src_pb, 0, sizeof(src_pb)); + src_pb.format = get_pt_format(self); + src_pb.width = src->width; + src_pb.stride_bytes = src->line_size; + src_pb.height = src->height; + src_pb.data = src->data; + + xrdp_bitmap_get_screen_clip(dst, self, &clip_rect, &dx, &dy); + region = xrdp_region_create(self->wm); + xrdp_wm_get_vis_region(self->wm, dst, x, y, cx, cy, region, + self->clip_children); + x += dx; + y += dy; + k = 0; + + painter_set_rop(self->painter, self->rop); + while (xrdp_region_get_rect(region, k, &rect1) == 0) + { + if (rect_intersect(&rect1, &clip_rect, &draw_rect)) + { + painter_set_clip(self->painter, + draw_rect.left, draw_rect.top, + draw_rect.right - draw_rect.left, + draw_rect.bottom - draw_rect.top); + LLOGLN(10, (" x %d y %d cx %d cy %d srcx %d srcy %d", + x, y, cx, cy, srcx, srcy)); + painter_copy(self->painter, &dst_pb, x, y, cx, cy, + &src_pb, srcx, srcy); + xrdp_painter_add_dirty_rect(self, x, y, cx, cy, + &draw_rect); + } + k++; + } + painter_clear_clip(self->painter); + xrdp_region_delete(region); + } + + return 0; +#endif + } + /* todo data */ if (dst->type == WND_TYPE_BITMAP) @@ -848,7 +1325,7 @@ xrdp_painter_copy(struct xrdp_painter *self, while (i < (srcx + cx)) { w = MIN(64, ((srcx + cx) - i)); - h = MIN(63, ((srcy + cy) - j)); + h = MIN(64, ((srcy + cy) - j)); b = xrdp_bitmap_create(w, h, src->bpp, 0, self->wm); #if 1 xrdp_bitmap_copy_box_with_crc(src, b, i, j, w, h); @@ -883,7 +1360,7 @@ xrdp_painter_copy(struct xrdp_painter *self, i += 64; } - j += 63; + j += 64; } xrdp_region_delete(region); @@ -918,11 +1395,18 @@ xrdp_painter_composite(struct xrdp_painter* self, int cache_srcidx; int cache_mskidx; + LLOGLN(0, ("xrdp_painter_composite:")); + if (self == 0 || src == 0 || dst == 0) { return 0; } + if (self->painter != 0) + { + return 0; + } + /* todo data */ if (dst->type == WND_TYPE_BITMAP) @@ -985,10 +1469,75 @@ xrdp_painter_line(struct xrdp_painter *self, int dy; int rop; + LLOGLN(10, ("xrdp_painter_line:")); if (self == 0) { return 0; } + if (self->painter != 0) + { +#if defined(XRDP_PAINTER) + int x; + int y; + int cx; + int cy; + struct painter_bitmap dst_pb; + struct xrdp_bitmap *ldst; + + LLOGLN(10, ("xrdp_painter_line: dst->type %d", dst->type)); + LLOGLN(10, ("xrdp_painter_line: self->rop 0x%2.2x", self->rop)); + + if (dst->type != WND_TYPE_OFFSCREEN) + { + LLOGLN(10, ("xrdp_painter_line: using painter")); + ldst = self->wm->screen; + + g_memset(&dst_pb, 0, sizeof(dst_pb)); + dst_pb.format = get_pt_format(self); + dst_pb.width = ldst->width; + dst_pb.stride_bytes = ldst->line_size; + dst_pb.height = ldst->height; + dst_pb.data = ldst->data; + + xrdp_bitmap_get_screen_clip(dst, self, &clip_rect, &dx, &dy); + region = xrdp_region_create(self->wm); + x = MIN(x1, x2); + y = MIN(y1, y2); + cx = g_abs(x1 - x2) + 1; + cy = g_abs(y1 - y2) + 1; + xrdp_wm_get_vis_region(self->wm, dst, x, y, cx, cy, + region, self->clip_children); + x1 += dx; + y1 += dy; + x2 += dx; + y2 += dy; + k = 0; + rop = self->rop; + + painter_set_rop(self->painter, rop); + painter_set_fgcolor(self->painter, self->pen.color); + while (xrdp_region_get_rect(region, k, &rect) == 0) + { + if (rect_intersect(&rect, &clip_rect, &draw_rect)) + { + painter_set_clip(self->painter, + draw_rect.left, draw_rect.top, + draw_rect.right - draw_rect.left, + draw_rect.bottom - draw_rect.top); + painter_line(self->painter, &dst_pb, x1, y1, x2, x2, + self->pen.width, 0); + xrdp_painter_add_dirty_rect(self, x, y, cx, cy, + &draw_rect); + } + k++; + } + painter_clear_clip(self->painter); + xrdp_region_delete(region); + } + + return 0; +#endif + } /* todo data */ diff --git a/xrdp/xrdp_types.h b/xrdp/xrdp_types.h index 46a23ca1..ca59cd1b 100644 --- a/xrdp/xrdp_types.h +++ b/xrdp/xrdp_types.h @@ -42,7 +42,7 @@ struct xrdp_mod long param3, long param4); int (*mod_signal)(struct xrdp_mod* v); int (*mod_end)(struct xrdp_mod* v); - int (*mod_set_param)(struct xrdp_mod* v, const char *name, char* value); + int (*mod_set_param)(struct xrdp_mod *v, const char *name, const char *value); int (*mod_session_change)(struct xrdp_mod* v, int, int); int (*mod_get_wait_objs)(struct xrdp_mod* v, tbus* read_objs, int* rcount, tbus* write_objs, int* wcount, int* timeout); @@ -429,6 +429,9 @@ struct xrdp_painter struct xrdp_session* session; struct xrdp_wm* wm; /* owner */ struct xrdp_font* font; + void *painter; + struct xrdp_region *dirty_region; + int begin_end_level; }; /* window or bitmap */ diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c index 4917c3aa..9db41c0b 100644 --- a/xrdp/xrdp_wm.c +++ b/xrdp/xrdp_wm.c @@ -602,6 +602,7 @@ xrdp_wm_init(struct xrdp_wm *self) /* TODO: change this and have an 'autologin' line in globals section */ file_read_sections(fd, names); + section_name[0] = '\0'; for (index = 0; index < names->count; index++) { q = (char *)list_get_item(names, index); @@ -835,44 +836,6 @@ xrdp_wm_xor_pat(struct xrdp_wm *self, int x, int y, int cx, int cy) } /*****************************************************************************/ -/* this don't are about nothing, just copy the bits */ -/* no clipping rects, no windows in the way, nothing */ -static int APP_CC -xrdp_wm_bitblt(struct xrdp_wm *self, - struct xrdp_bitmap *dst, int dx, int dy, - struct xrdp_bitmap *src, int sx, int sy, - int sw, int sh, int rop) -{ - // int i; - // int line_size; - // int Bpp; - // char* s; - // char* d; - - // if (sw <= 0 || sh <= 0) - // return 0; - if (self->screen == dst && self->screen == src) - { - /* send a screen blt */ - // Bpp = (dst->bpp + 7) / 8; - // line_size = sw * Bpp; - // s = src->data + (sy * src->width + sx) * Bpp; - // d = dst->data + (dy * dst->width + dx) * Bpp; - // for (i = 0; i < sh; i++) - // { - // //g_memcpy(d, s, line_size); - // s += src->width * Bpp; - // d += dst->width * Bpp; - // } - libxrdp_orders_init(self->session); - libxrdp_orders_screen_blt(self->session, dx, dy, sw, sh, sx, sy, rop, 0); - libxrdp_orders_send(self->session); - } - - return 0; -} - -/*****************************************************************************/ /* return true if rect is totally exposed going in reverse z order */ /* from wnd up */ static int APP_CC @@ -935,6 +898,7 @@ xrdp_wm_move_window(struct xrdp_wm *self, struct xrdp_bitmap *wnd, MAKERECT(rect1, wnd->left, wnd->top, wnd->width, wnd->height); + self->painter->clip_children = 0; if (xrdp_wm_is_rect_vis(self, wnd, &rect1)) { rect2 = rect1; @@ -942,10 +906,13 @@ xrdp_wm_move_window(struct xrdp_wm *self, struct xrdp_bitmap *wnd, if (xrdp_wm_is_rect_vis(self, wnd, &rect2)) { - /* if both src and dst are unobscured, we can do a bitblt move */ - xrdp_wm_bitblt(self, self->screen, wnd->left + dx, wnd->top + dy, - self->screen, wnd->left, wnd->top, - wnd->width, wnd->height, 0xcc); + xrdp_painter_begin_update(self->painter); + xrdp_painter_copy(self->painter, self->screen, self->screen, + wnd->left + dx, wnd->top + dy, + wnd->width, wnd->height, + wnd->left, wnd->top); + xrdp_painter_end_update(self->painter); + wnd->left += dx; wnd->top += dy; r = xrdp_region_create(self); @@ -960,9 +927,11 @@ xrdp_wm_move_window(struct xrdp_wm *self, struct xrdp_bitmap *wnd, } xrdp_region_delete(r); + self->painter->clip_children = 1; return 0; } } + self->painter->clip_children = 1; wnd->left += dx; wnd->top += dy; @@ -971,6 +940,7 @@ xrdp_wm_move_window(struct xrdp_wm *self, struct xrdp_bitmap *wnd, return 0; } + /*****************************************************************************/ static int APP_CC xrdp_wm_undraw_dragging_box(struct xrdp_wm *self, int do_begin_end) @@ -1241,6 +1211,10 @@ xrdp_wm_mouse_click(struct xrdp_wm *self, int x, int y, int but, int down) { if (self->mm->mod->mod_event != 0) { + if (down) + { + self->mm->mod->mod_event(self->mm->mod, WM_MOUSEMOVE, x, y, 0, 0); + } if (but == 1 && down) { self->mm->mod->mod_event(self->mm->mod, WM_LBUTTONDOWN, x, y, 0, 0); @@ -1527,6 +1501,83 @@ xrdp_wm_key_sync(struct xrdp_wm *self, int device_flags, int key_flags) /*****************************************************************************/ int APP_CC +xrdp_wm_key_unicode(struct xrdp_wm *self, int device_flags, int unicode) +{ + int index; + + for (index = XR_MIN_KEY_CODE; index < XR_MAX_KEY_CODE; index++) + { + if (unicode == self->keymap.keys_noshift[index].chr) + { + xrdp_wm_key(self, device_flags, index - XR_MIN_KEY_CODE); + return 0; + } + } + + for (index = XR_MIN_KEY_CODE; index < XR_MAX_KEY_CODE; index++) + { + if (unicode == self->keymap.keys_shift[index].chr) + { + if (device_flags & KBD_FLAG_UP) + { + xrdp_wm_key(self, device_flags, index - XR_MIN_KEY_CODE); + xrdp_wm_key(self, KBD_FLAG_UP, XR_RDP_SCAN_LSHIFT); + } + else + { + xrdp_wm_key(self, KBD_FLAG_DOWN, XR_RDP_SCAN_LSHIFT); + xrdp_wm_key(self, device_flags, index - XR_MIN_KEY_CODE); + } + return 0; + } + } + + for (index = XR_MIN_KEY_CODE; index < XR_MAX_KEY_CODE; index++) + { + if (unicode == self->keymap.keys_altgr[index].chr) + { + if (device_flags & KBD_FLAG_UP) + { + xrdp_wm_key(self, device_flags, index - XR_MIN_KEY_CODE); + xrdp_wm_key(self, KBD_FLAG_UP | KBD_FLAG_EXT, + XR_RDP_SCAN_ALT); + } + else + { + xrdp_wm_key(self, KBD_FLAG_DOWN | KBD_FLAG_EXT, + XR_RDP_SCAN_ALT); + xrdp_wm_key(self, device_flags, index - XR_MIN_KEY_CODE); + } + return 0; + } + } + + for (index = XR_MIN_KEY_CODE; index < XR_MAX_KEY_CODE; index++) + { + if (unicode == self->keymap.keys_shiftaltgr[index].chr) + { + if (device_flags & KBD_FLAG_UP) + { + xrdp_wm_key(self, device_flags, index - XR_MIN_KEY_CODE); + xrdp_wm_key(self, KBD_FLAG_UP | KBD_FLAG_EXT, XR_RDP_SCAN_ALT); + xrdp_wm_key(self, KBD_FLAG_UP, XR_RDP_SCAN_LSHIFT); + } + else + { + xrdp_wm_key(self, KBD_FLAG_DOWN, XR_RDP_SCAN_LSHIFT); + xrdp_wm_key(self, KBD_FLAG_DOWN | KBD_FLAG_EXT, + XR_RDP_SCAN_ALT); + xrdp_wm_key(self, device_flags, index - XR_MIN_KEY_CODE); + } + return 0; + } + } + + return 0; +} + +/*****************************************************************************/ +int APP_CC xrdp_wm_pu(struct xrdp_wm *self, struct xrdp_bitmap *control) { int x; @@ -1721,6 +1772,9 @@ callback(long id, int msg, long param1, long param2, long param3, long param4) case 4: /* RDP_INPUT_SCANCODE */ rv = xrdp_wm_key(wm, param3, param1); break; + case 5: /* RDP_INPUT_UNICODE */ + rv = xrdp_wm_key_unicode(wm, param3, param1); + break; case 0x8001: /* RDP_INPUT_MOUSE */ rv = xrdp_wm_process_input_mouse(wm, param3, param1, param2); break; diff --git a/xrdpapi/Makefile.am b/xrdpapi/Makefile.am index 920f3d1a..fefa03fc 100644 --- a/xrdpapi/Makefile.am +++ b/xrdpapi/Makefile.am @@ -1,3 +1,8 @@ +EXTRA_DIST = \ + simple.c \ + vrplayer.c \ + vrplayer.mk + module_LTLIBRARIES = \ libxrdpapi.la diff --git a/xrdpapi/simple.c b/xrdpapi/simple.c index 7a674b69..5781b003 100644 --- a/xrdpapi/simple.c +++ b/xrdpapi/simple.c @@ -37,8 +37,8 @@ #include <errno.h> /* forward declarations */ -int run_echo_test(); -int run_tsmf_test(); +int run_echo_test(void); +int run_tsmf_test(void); int main(int argc, char **argv) @@ -76,7 +76,7 @@ main(int argc, char **argv) * @return 0 on success, -1 on failure */ int -run_echo_test() +run_echo_test(void) { char out_buf[8192]; char in_buf[1700]; @@ -162,7 +162,7 @@ run_echo_test() } int -run_tsmf_test() +run_tsmf_test(void) { void *channel; diff --git a/xrdpvr/Makefile.am b/xrdpvr/Makefile.am index f9b8d421..8c907402 100644 --- a/xrdpvr/Makefile.am +++ b/xrdpvr/Makefile.am @@ -3,4 +3,5 @@ module_LTLIBRARIES = \ libxrdpvr_la_SOURCES = \ xrdpvr.c \ - xrdpvr.h + xrdpvr.h \ + xrdpvr_internal.h diff --git a/xup/Makefile.am b/xup/Makefile.am index cdaca15c..0d6434c8 100644 --- a/xup/Makefile.am +++ b/xup/Makefile.am @@ -5,6 +5,10 @@ AM_CPPFLAGS = \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common +if XRDP_DEBUG +AM_CPPFLAGS += -DXRDP_DEBUG +endif + module_LTLIBRARIES = \ libxup.la @@ -14,3 +18,5 @@ libxup_la_SOURCES = \ libxup_la_LIBADD = \ $(top_builddir)/common/libcommon.la + +libxup_la_LDFLAGS = -avoid-version -module @@ -1479,7 +1479,7 @@ lib_mod_end(struct mod *mod) /******************************************************************************/ /* return error */ int DEFAULT_CC -lib_mod_set_param(struct mod *mod, const char *name, char *value) +lib_mod_set_param(struct mod *mod, const char *name, const char *value) { if (g_strcasecmp(name, "username") == 0) { @@ -39,7 +39,7 @@ struct mod tbus param3, tbus param4); int (*mod_signal)(struct mod* v); int (*mod_end)(struct mod* v); - int (*mod_set_param)(struct mod* v, const char *name, char* value); + int (*mod_set_param)(struct mod *v, const char *name, const char *value); int (*mod_session_change)(struct mod* v, int, int); int (*mod_get_wait_objs)(struct mod* v, tbus* read_objs, int* rcount, tbus* write_objs, int* wcount, int* timeout); |
