diff --git a/.gitignore b/.gitignore index 7b45b684..0437bf57 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ autom4te.cache/ ChangeLog config_ac.h config_ac-h.in -config.c config.guess config.log config.status diff --git a/Makefile.am b/Makefile.am index e8905c98..8e6e18b8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,6 @@ +ACLOCAL_AMFLAGS = -I m4 +AM_DISTCHECK_CONFIGURE_FLAGS = --without-systemdsystemunitdir + EXTRA_DIST = bootstrap COPYING design.txt faq-compile.txt faq-general.txt file-loc.txt install.txt prog_std.txt readme.txt if XRDP_NEUTRINORDP diff --git a/bootstrap b/bootstrap index 1fae2a0e..be61972e 100755 --- a/bootstrap +++ b/bootstrap @@ -28,10 +28,4 @@ then exit 1 fi -touch configure.ac -touch NEWS -touch AUTHORS -touch README -touch ChangeLog -ln -s ../config.c $PWD/sesman/tools/config.c autoreconf -fvi diff --git a/common/Makefile.am b/common/Makefile.am index 8224c52d..c8501586 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -19,7 +19,7 @@ EXTRA_DIST = \ xrdp_rail.h \ crc16.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ diff --git a/common/arch.h b/common/arch.h index 14ab9d7d..d3ae460e 100644 --- a/common/arch.h +++ b/common/arch.h @@ -22,7 +22,7 @@ /* you can define L_ENDIAN or B_ENDIAN and NEED_ALIGN or NO_NEED_ALIGN in the makefile to override */ -/* check endianess */ +/* check endianness */ #if !(defined(L_ENDIAN) || defined(B_ENDIAN)) #if !defined(__BYTE_ORDER) && defined(__linux__) #include diff --git a/configure.ac b/configure.ac index 24ef13c4..cd873a68 100644 --- a/configure.ac +++ b/configure.ac @@ -4,6 +4,7 @@ AC_PREREQ(2.59) AC_INIT([xrdp], [0.9.0], [xrdp-devel@googlegroups.com]) AC_CONFIG_HEADERS(config_ac.h:config_ac-h.in) AM_INIT_AUTOMAKE([1.6 foreign]) +AC_CONFIG_MACRO_DIRS([m4]) AC_PROG_CC AC_C_CONST AC_PROG_LIBTOOL @@ -98,8 +99,6 @@ AC_ARG_ENABLE(opus, AS_HELP_STRING([--enable-opus], [], [enable_opus=no]) AM_CONDITIONAL(XRDP_OPUS, [test x$enable_opus = xyes]) -AM_CONDITIONAL(GOT_PREFIX, test "x${prefix}" != "xNONE"]) - # checking for openssl AC_CHECK_HEADER([openssl/rc4.h], [], [AC_MSG_ERROR([please install libssl-dev or openssl-devel])], @@ -200,16 +199,26 @@ else fi fi -# checking for Xlib, Xfixes -AC_CHECK_HEADER([X11/Xlib.h], [], - [AC_MSG_ERROR([please install libx11-dev or libX11-devel])]) +AC_PATH_XTRA +if test "x$no_x" == "xyes"; then + AC_MSG_ERROR([please install libx11-dev or libX11-devel]) +fi + +save_CFLAGS="$CFLAGS" +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])], [#include ]) + +# checking for Xrandr AC_CHECK_HEADER([X11/extensions/Xrandr.h], [], [AC_MSG_ERROR([please install libxrandr-dev or libXrandr-devel])], [#include ]) +CFLAGS="$save_CFLAGS" + libdir="${libdir}/xrdp"; if test "x${prefix}" = "xNONE" ; then sysconfdir="/etc"; diff --git a/design.txt b/design.txt index 431bcbd1..3b120c89 100644 --- a/design.txt +++ b/design.txt @@ -31,5 +31,5 @@ is lost, the session remains. For X11, start the XServer after the user is authenticated. First check for the next available X11 display, -create a user session, start the XServer and set the DISPLAY enviromenet +create a user session, start the XServer and set the DISPLAY environment variable. diff --git a/genkeymap/Makefile.am b/genkeymap/Makefile.am index aed72512..25767395 100644 --- a/genkeymap/Makefile.am +++ b/genkeymap/Makefile.am @@ -1,9 +1,12 @@ +AM_CFLAGS = $(X_CFLAGS) bin_PROGRAMS = \ xrdp-genkeymap xrdp_genkeymap_SOURCES = genkeymap.c evdev-map.c +xrdp_genkeymap_LDFLAGS = \ + $(X_LIBS) + xrdp_genkeymap_LDADD = \ - -L/usr/X11R6/lib \ - -lX11 + $(X_PRE_LIBS) -lX11 $(X_EXTRA_LIBS) diff --git a/install.txt b/install.txt index 5683d1e5..dd36f4e3 100644 --- a/install.txt +++ b/install.txt @@ -11,11 +11,11 @@ You can build sesman without pam, there is a Makefile parameter for that. I also have a replacement ssl_calls.c to avoid the openssl dependency email me(Jay) for it or see http://server1.xrdp.org/xrdp/openssl. -Due to the licence, I can't include it in this project. +Due to the license, I can't include it in this project. http://server1.xrdp.org/xrdp/openssl/ -unpackage the tarball +unpack the tarball tar -zxvf xrdp-0.1.tar.gz @@ -28,7 +28,7 @@ run make as root, run make install This will install most of the files in /usr/local/xrdp. -Some files install in /etc/xrdp. These are configuation +Some files install in /etc/xrdp. These are configuration files. files and location diff --git a/instfiles/init.d/xrdp b/instfiles/init.d/xrdp index e6c6e123..8e5f42d1 100644 --- a/instfiles/init.d/xrdp +++ b/instfiles/init.d/xrdp @@ -139,7 +139,7 @@ case "$1" in ;; force-stop) $0 stop - # because it doesn't allways die the right way + # because it doesn't always die the right way force_stop ;; restart|force-reload) diff --git a/keygen/Makefile.am b/keygen/Makefile.am index c28c063d..353f74df 100644 --- a/keygen/Makefile.am +++ b/keygen/Makefile.am @@ -1,11 +1,9 @@ -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common bin_PROGRAMS = \ diff --git a/libxrdp/Makefile.am b/libxrdp/Makefile.am index ec92f8be..5b89b0c3 100644 --- a/libxrdp/Makefile.am +++ b/libxrdp/Makefile.am @@ -28,19 +28,12 @@ EXTRA_LIBS += -ljpeg endif endif -if GOT_PREFIX -EXTRA_INCLUDES += -I$(prefix)/include -EXTRA_FLAGS += -L$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib -endif - -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ - $(EXTRA_DEFINES) - -INCLUDES = \ + $(EXTRA_DEFINES) \ -I$(top_srcdir)/common \ $(EXTRA_INCLUDES) diff --git a/m4/.gitignore b/m4/.gitignore new file mode 100644 index 00000000..0f4126cd --- /dev/null +++ b/m4/.gitignore @@ -0,0 +1 @@ +*.m4 diff --git a/mc/Makefile.am b/mc/Makefile.am index eb000085..f56dac5f 100644 --- a/mc/Makefile.am +++ b/mc/Makefile.am @@ -1,12 +1,10 @@ EXTRA_DIST = mc.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common lib_LTLIBRARIES = \ diff --git a/mc/mc.h b/mc/mc.h index ac31334c..4af932f0 100644 --- a/mc/mc.h +++ b/mc/mc.h @@ -67,7 +67,7 @@ struct mod int (*server_set_pen)(struct mod* v, int style, int width); int (*server_draw_line)(struct mod* v, int x1, int y1, int x2, int y2); - int (*server_add_char)(struct mod* v, int font, int charactor, + int (*server_add_char)(struct mod* v, int font, int character, int offset, int baseline, int width, int height, char* data); int (*server_draw_text)(struct mod* v, int font, diff --git a/neutrinordp/Makefile.am b/neutrinordp/Makefile.am index 93e1196a..58fe9bc2 100644 --- a/neutrinordp/Makefile.am +++ b/neutrinordp/Makefile.am @@ -7,14 +7,12 @@ else EXTRA_DEFINES += -DXRDP_NODEBUG endif -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ - $(EXTRA_DEFINES) - -INCLUDES = \ + $(EXTRA_DEFINES) \ -I$(top_srcdir)/common \ $(FREERDP_CFLAGS) diff --git a/neutrinordp/xrdp-neutrinordp.h b/neutrinordp/xrdp-neutrinordp.h index 68eae750..8606efe2 100644 --- a/neutrinordp/xrdp-neutrinordp.h +++ b/neutrinordp/xrdp-neutrinordp.h @@ -101,7 +101,7 @@ struct mod int (*server_set_pen)(struct mod* v, int style, int width); int (*server_draw_line)(struct mod* v, int x1, int y1, int x2, int y2); - int (*server_add_char)(struct mod* v, int font, int charactor, + int (*server_add_char)(struct mod* v, int font, int character, int offset, int baseline, int width, int height, char* data); int (*server_draw_text)(struct mod* v, int font, diff --git a/prog_std.txt b/prog_std.txt index c358a470..671172f2 100644 --- a/prog_std.txt +++ b/prog_std.txt @@ -1,5 +1,5 @@ -This is an atempt to explain my odd programming standard used for this project. +This is an attempt to explain my odd programming standard used for this project. Not to defend any of these but its my default standard and make it easy for me to read. Some files break these rules, they will be updated eventually. diff --git a/rdp/Makefile.am b/rdp/Makefile.am index 9b519d7c..6d23b287 100644 --- a/rdp/Makefile.am +++ b/rdp/Makefile.am @@ -7,14 +7,12 @@ else EXTRA_DEFINES += -DXRDP_NODEBUG endif -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ - $(EXTRA_DEFINES) - -INCLUDES = \ + $(EXTRA_DEFINES) \ -I$(top_srcdir)/common lib_LTLIBRARIES = \ diff --git a/rdp/rdp.h b/rdp/rdp.h index 9a755a38..36a20f57 100644 --- a/rdp/rdp.h +++ b/rdp/rdp.h @@ -292,7 +292,7 @@ struct mod int (*server_set_pen)(struct mod* v, int style, int width); int (*server_draw_line)(struct mod* v, int x1, int y1, int x2, int y2); - int (*server_add_char)(struct mod* v, int font, int charactor, + int (*server_add_char)(struct mod* v, int font, int character, int offset, int baseline, int width, int height, char* data); int (*server_draw_text)(struct mod* v, int font, diff --git a/readme.txt b/readme.txt index 4e4d712e..b051ef02 100644 --- a/readme.txt +++ b/readme.txt @@ -9,8 +9,8 @@ Credits 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. -Non of the sesman or Xserver stuff works in windows of course. +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 @@ -19,11 +19,11 @@ 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 licence file -design.txt is an attempt to expain the project design +COPYING is the license file +design.txt is an attempt to explain the project design prog_std.txt is an attempt to explain the programming standard used -since version 0.5.0 we switch to autotool to build xrdp +since version 0.5.0 we switch to autotools to build xrdp to build and install diff --git a/sesman/Makefile.am b/sesman/Makefile.am index 55056031..979f72d9 100644 --- a/sesman/Makefile.am +++ b/sesman/Makefile.am @@ -2,13 +2,11 @@ EXTRA_DIST = sesman.ini startwm.sh sesman.h access.h auth.h config.h env.h \ scp.h scp_v0.h scp_v1.h scp_v1_mng.h session.h sig.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common \ -I$(top_srcdir)/sesman/libscp diff --git a/sesman/chansrv/Makefile.am b/sesman/chansrv/Makefile.am index 755de786..45397b73 100644 --- a/sesman/chansrv/Makefile.am +++ b/sesman/chansrv/Makefile.am @@ -31,17 +31,17 @@ EXTRA_DEFINES += -DXRDP_OPUS EXTRA_LIBS += -lopus endif -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ - $(EXTRA_DEFINES) - -INCLUDES = \ + $(EXTRA_DEFINES) \ -I$(top_srcdir)/common \ $(EXTRA_INCLUDES) +AM_CFLAGS = $(X_CFLAGS) + sbin_PROGRAMS = \ xrdp-chansrv @@ -62,10 +62,10 @@ xrdp_chansrv_SOURCES = \ chansrv_common.c xrdp_chansrv_LDFLAGS = \ + $(X_LIBS) \ $(EXTRA_FLAGS) xrdp_chansrv_LDADD = \ - -L/usr/X11R6/lib \ $(top_builddir)/common/libcommon.la \ - -lX11 -lXfixes -lXrandr \ + $(X_PRE_LIBS) -lXfixes -lXrandr -lX11 $(X_EXTRA_LIBS) \ $(EXTRA_LIBS) diff --git a/sesman/chansrv/clipboard.c b/sesman/chansrv/clipboard.c index 5c2a2b22..11c37a16 100644 --- a/sesman/chansrv/clipboard.c +++ b/sesman/chansrv/clipboard.c @@ -176,6 +176,8 @@ x-special/gnome-copied-files #define LOG_ERROR 0 #define LOG_INFO 1 #define LOG_DEBUG 2 + +#undef LOG_LEVEL #define LOG_LEVEL LOG_ERROR #define log_error(_params...) \ diff --git a/sesman/chansrv/clipboard_file.c b/sesman/chansrv/clipboard_file.c index e994585a..4f3f1ade 100644 --- a/sesman/chansrv/clipboard_file.c +++ b/sesman/chansrv/clipboard_file.c @@ -22,6 +22,7 @@ * CLIPRDR_FILEDESCRIPTOR * http://msdn.microsoft.com/en-us/library/ff362447%28prot.20%29.aspx */ +#include #include #include #include diff --git a/sesman/chansrv/rail.c b/sesman/chansrv/rail.c index f3777970..f12d8e3f 100644 --- a/sesman/chansrv/rail.c +++ b/sesman/chansrv/rail.c @@ -1775,7 +1775,7 @@ rail_configure_window(XConfigureEvent *config) /*****************************************************************************/ static int -rail_desktop_resize(lxevent) +rail_desktop_resize(XEvent *lxevent) { LOG(0, ("rail_desktop_resize:")); return 0; diff --git a/sesman/libscp/Makefile.am b/sesman/libscp/Makefile.am index eaf518a8..3172f2cb 100644 --- a/sesman/libscp/Makefile.am +++ b/sesman/libscp/Makefile.am @@ -1,13 +1,11 @@ EXTRA_DIST = libscp_connection.h libscp_commands.h libscp.h libscp_session.h libscp_types_mng.h libscp_v1c_mng.h libscp_vX.h libscp_commands_mng.h libscp_init.h libscp_tcp.h libscp_v0.h libscp_v1s.h libscp_lock.h \ libscp_types.h libscp_v1c.h libscp_v1s_mng.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common lib_LTLIBRARIES = \ diff --git a/sesman/libscp/libscp_lock.c b/sesman/libscp/libscp_lock.c index 4db05422..d35e3c9c 100644 --- a/sesman/libscp/libscp_lock.c +++ b/sesman/libscp/libscp_lock.c @@ -57,7 +57,7 @@ scp_lock_fork_request(void) if (lock_fork_blockers_count == 0) { - /* if noone is blocking fork(), then we're allowed to fork */ + /* if no one is blocking fork(), then we're allowed to fork */ sem_post(&lock_fork_req); } diff --git a/sesman/libscp/libscp_lock.h b/sesman/libscp/libscp_lock.h index b4e93c52..ae2c361b 100644 --- a/sesman/libscp/libscp_lock.h +++ b/sesman/libscp/libscp_lock.h @@ -52,8 +52,8 @@ scp_lock_fork_release(void); * * @brief starts a section that is critical for forking * - * starts a section that is critical for forking, that is noone can fork() - * while i'm in a critical section. But if someone wanted to fork we have + * starts a section that is critical for forking, that is no one can fork() + * while I'm in a critical section. But if someone wanted to fork we have * to wait until he finishes with lock_fork_release() * * @return diff --git a/sesman/libscp/libscp_v1s.c b/sesman/libscp/libscp_v1s.c index 69997ab2..fb137433 100644 --- a/sesman/libscp/libscp_v1s.c +++ b/sesman/libscp/libscp_v1s.c @@ -435,8 +435,11 @@ scp_v1s_list_sessions(struct SCP_CONNECTION *c, int sescnt, struct SCP_DISCONNEC } /* then we wait for client ack */ -#warning maybe this message could say if the session should be resized on -#warning server side or client side + + /* + * Maybe this message could say if the session should be resized on + * server side or client side. + */ init_stream(c->in_s, c->in_s->size); if (0 != scp_tcp_force_recv(c->in_sck, c->in_s->data, 8)) diff --git a/sesman/sessvc/Makefile.am b/sesman/sessvc/Makefile.am index 8ba24abd..c2714b94 100644 --- a/sesman/sessvc/Makefile.am +++ b/sesman/sessvc/Makefile.am @@ -1,11 +1,9 @@ -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common sbin_PROGRAMS = \ diff --git a/sesman/tools/Makefile.am b/sesman/tools/Makefile.am index 140c6820..066039b0 100644 --- a/sesman/tools/Makefile.am +++ b/sesman/tools/Makefile.am @@ -1,16 +1,16 @@ EXTRA_DIST = tcp.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common \ -I$(top_srcdir)/sesman/libscp \ -I$(top_srcdir)/sesman +AM_CFLAGS = $(X_CFLAGS) + bin_PROGRAMS = \ xrdp-sesrun \ xrdp-sesadmin \ @@ -48,6 +48,8 @@ xrdp_sesadmin_LDADD = \ $(top_builddir)/common/libcommon.la \ $(top_builddir)/sesman/libscp/libscp.la +xrdp_xcon_LDFLAGS = \ + $(X_LIBS) + xrdp_xcon_LDADD = \ - -L/usr/X11R6/lib \ - -lX11 + $(X_PRE_LIBS) -lX11 $(X_EXTRA_LIBS) diff --git a/sesman/tools/config.c b/sesman/tools/config.c new file mode 100644 index 00000000..0f1399cc --- /dev/null +++ b/sesman/tools/config.c @@ -0,0 +1 @@ +#include "../config.c" diff --git a/sesman/tools/xcon.c b/sesman/tools/xcon.c index 80832276..4150d6af 100644 --- a/sesman/tools/xcon.c +++ b/sesman/tools/xcon.c @@ -19,6 +19,7 @@ #include #include #include +#include #include Display *g_display = 0; diff --git a/tcutils/README.txt b/tcutils/README.txt index de75f1b2..31ebb1f8 100644 --- a/tcutils/README.txt +++ b/tcutils/README.txt @@ -1,4 +1,4 @@ -A QT based utility program for thinclients using xrdp and NeutrinoRDP +A QT based utility program for thin clients using xrdp and NeutrinoRDP This program sends commands to NeutrinoRDP to do something useful on the client end (such as unmounting a USB drive, diff --git a/vnc/Makefile.am b/vnc/Makefile.am index 24835011..a9a3aa14 100644 --- a/vnc/Makefile.am +++ b/vnc/Makefile.am @@ -1,12 +1,10 @@ EXTRA_DIST = vnc.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common lib_LTLIBRARIES = \ diff --git a/vnc/vnc.c b/vnc/vnc.c index 66b0f228..2e16ed21 100644 --- a/vnc/vnc.c +++ b/vnc/vnc.c @@ -1099,7 +1099,8 @@ lib_mod_connect(struct vnc *v) if (error != 0) { - log_message(LOG_LEVEL_DEBUG, "VNC Error after security negotiation"); + log_message(LOG_LEVEL_DEBUG, "VNC error %d after security negotiation", + error); } if (error == 0 && check_sec_result) diff --git a/vnc/vnc.h b/vnc/vnc.h index d7249f3d..af5e86e6 100644 --- a/vnc/vnc.h +++ b/vnc/vnc.h @@ -67,7 +67,7 @@ struct vnc int (*server_set_pen)(struct vnc* v, int style, int width); int (*server_draw_line)(struct vnc* v, int x1, int y1, int x2, int y2); - int (*server_add_char)(struct vnc* v, int font, int charactor, + int (*server_add_char)(struct vnc* v, int font, int character, int offset, int baseline, int width, int height, char* data); int (*server_draw_text)(struct vnc* v, int font, diff --git a/xorg/X11R7.6/rdp/rdp.h b/xorg/X11R7.6/rdp/rdp.h index 1d06509d..901e292b 100644 --- a/xorg/X11R7.6/rdp/rdp.h +++ b/xorg/X11R7.6/rdp/rdp.h @@ -582,10 +582,10 @@ rdpup_check_alpha_dirty(PixmapPtr pDirtyPixmap, rdpPixmapRec* pDirtyPriv); int rdpup_check_dirty_screen(rdpPixmapRec* pDirtyPriv); int -rdpup_add_char(int font, int charactor, short x, short y, int cx, int cy, +rdpup_add_char(int font, int character, short x, short y, int cx, int cy, char* bmpdata, int bmpdata_bytes); int -rdpup_add_char_alpha(int font, int charactor, short x, short y, int cx, int cy, +rdpup_add_char_alpha(int font, int character, short x, short y, int cx, int cy, char* bmpdata, int bmpdata_bytes); int rdpup_draw_text(int font, int flags, int mixmode, diff --git a/xorg/X11R7.6/rdp/rdpup.c b/xorg/X11R7.6/rdp/rdpup.c index 9c507622..230c1538 100644 --- a/xorg/X11R7.6/rdp/rdpup.c +++ b/xorg/X11R7.6/rdp/rdpup.c @@ -2823,7 +2823,7 @@ rdpup_check_alpha_dirty(PixmapPtr pDirtyPixmap, rdpPixmapRec* pDirtyPriv) /******************************************************************************/ int -rdpup_add_char(int font, int charactor, short x, short y, int cx, int cy, +rdpup_add_char(int font, int character, short x, short y, int cx, int cy, char* bmpdata, int bmpdata_bytes) { if (g_connected) @@ -2834,7 +2834,7 @@ rdpup_add_char(int font, int charactor, short x, short y, int cx, int cy, out_uint16_le(g_out_s, 18 + bmpdata_bytes); /* size */ g_count++; out_uint16_le(g_out_s, font); - out_uint16_le(g_out_s, charactor); + out_uint16_le(g_out_s, character); out_uint16_le(g_out_s, x); out_uint16_le(g_out_s, y); out_uint16_le(g_out_s, cx); @@ -2847,7 +2847,7 @@ rdpup_add_char(int font, int charactor, short x, short y, int cx, int cy, /******************************************************************************/ int -rdpup_add_char_alpha(int font, int charactor, short x, short y, int cx, int cy, +rdpup_add_char_alpha(int font, int character, short x, short y, int cx, int cy, char* bmpdata, int bmpdata_bytes) { if (g_connected) @@ -2858,7 +2858,7 @@ rdpup_add_char_alpha(int font, int charactor, short x, short y, int cx, int cy, out_uint16_le(g_out_s, 18 + bmpdata_bytes); /* size */ g_count++; out_uint16_le(g_out_s, font); - out_uint16_le(g_out_s, charactor); + out_uint16_le(g_out_s, character); out_uint16_le(g_out_s, x); out_uint16_le(g_out_s, y); out_uint16_le(g_out_s, cx); diff --git a/xorg/tests/randr/trandr.c b/xorg/tests/randr/trandr.c index 4f7be527..6c51a000 100644 --- a/xorg/tests/randr/trandr.c +++ b/xorg/tests/randr/trandr.c @@ -143,4 +143,4 @@ main(int argc, char **argv) } return 0; -} \ No newline at end of file +} diff --git a/xrdp/Makefile.am b/xrdp/Makefile.am index 8a8b36eb..308f01a4 100644 --- a/xrdp/Makefile.am +++ b/xrdp/Makefile.am @@ -11,26 +11,19 @@ else EXTRA_DEFINES = -DXRDP_NODEBUG endif -if GOT_PREFIX -EXTRA_INCLUDES += -I$(prefix)/include -EXTRA_FLAGS += -L$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib -endif - if XRDP_RFXCODEC EXTRA_DEFINES += -DXRDP_RFXCODEC EXTRA_INCLUDES += -I$(top_srcdir)/librfxcodec/include EXTRA_LIBS += $(top_srcdir)/librfxcodec/src/librfxencode.a endif -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -DXRDP_LIB_PATH=\"${libdir}\" \ - $(EXTRA_DEFINES) - -INCLUDES = \ + $(EXTRA_DEFINES) \ -I$(top_builddir) \ -I$(top_srcdir)/common \ -I$(top_srcdir)/libxrdp \ diff --git a/xrdp/rdp-scan-codes.txt b/xrdp/rdp-scan-codes.txt index 938ce4c5..5fe06e53 100644 --- a/xrdp/rdp-scan-codes.txt +++ b/xrdp/rdp-scan-codes.txt @@ -3,7 +3,7 @@ complete rdp key code listing en-us -4000s in the down flags columm is from repeating keys(holding a key down) +4000s in the down flags column is from repeating keys(holding a key down) When holding a key down, the down flags repeat but the up flags only come once at the end. Rdesktop does not do this as of yet. It always sends down and up diff --git a/xrdp/xrdp.h b/xrdp/xrdp.h index b23cdaf0..1199d01a 100644 --- a/xrdp/xrdp.h +++ b/xrdp/xrdp.h @@ -381,6 +381,8 @@ int APP_CC xrdp_mm_check_chan(struct xrdp_mm *self); int APP_CC xrdp_mm_check_wait_objs(struct xrdp_mm* self); +int APP_CC +xrdp_mm_frame_ack(struct xrdp_mm *self, int frame_id); int DEFAULT_CC server_begin_update(struct xrdp_mod* mod); int DEFAULT_CC @@ -444,7 +446,7 @@ server_set_pen(struct xrdp_mod* mod, int style, int width); int DEFAULT_CC server_draw_line(struct xrdp_mod* mod, int x1, int y1, int x2, int y2); int DEFAULT_CC -server_add_char(struct xrdp_mod* mod, int font, int charactor, +server_add_char(struct xrdp_mod* mod, int font, int character, int offset, int baseline, int width, int height, char* data); int DEFAULT_CC @@ -509,6 +511,6 @@ server_monitored_desktop(struct xrdp_mod* mod, struct rail_monitored_desktop_order* mdo, int flags); int DEFAULT_CC -server_add_char_alpha(struct xrdp_mod* mod, int font, int charactor, +server_add_char_alpha(struct xrdp_mod* mod, int font, int character, int offset, int baseline, int width, int height, char* data); diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index 48a0d628..26e5c028 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -2014,7 +2014,7 @@ xrdp_mm_connect(struct xrdp_mm *self) xrdp_mm_connect_chansrv(self, "", chansrvport); } - log_message(LOG_LEVEL_DEBUG,"returnvalue from xrdp_mm_connect %d", rv); + log_message(LOG_LEVEL_DEBUG,"return value from xrdp_mm_connect %d", rv); return rv; } @@ -2833,7 +2833,7 @@ server_draw_line(struct xrdp_mod *mod, int x1, int y1, int x2, int y2) /*****************************************************************************/ int DEFAULT_CC -server_add_char(struct xrdp_mod *mod, int font, int charactor, +server_add_char(struct xrdp_mod *mod, int font, int character, int offset, int baseline, int width, int height, char *data) { @@ -2847,7 +2847,7 @@ server_add_char(struct xrdp_mod *mod, int font, int charactor, fi.data = data; fi.bpp = 1; return libxrdp_orders_send_font(((struct xrdp_wm *)mod->wm)->session, - &fi, font, charactor); + &fi, font, character); } /*****************************************************************************/ @@ -3470,7 +3470,7 @@ server_monitored_desktop(struct xrdp_mod *mod, /*****************************************************************************/ int DEFAULT_CC -server_add_char_alpha(struct xrdp_mod* mod, int font, int charactor, +server_add_char_alpha(struct xrdp_mod* mod, int font, int character, int offset, int baseline, int width, int height, char* data) { @@ -3484,5 +3484,5 @@ server_add_char_alpha(struct xrdp_mod* mod, int font, int charactor, fi.data = data; fi.bpp = 8; return libxrdp_orders_send_font(((struct xrdp_wm*)mod->wm)->session, - &fi, font, charactor); + &fi, font, character); } diff --git a/xrdp/xrdp_types.h b/xrdp/xrdp_types.h index 5551e58d..a2a4d5fd 100644 --- a/xrdp/xrdp_types.h +++ b/xrdp/xrdp_types.h @@ -75,7 +75,7 @@ struct xrdp_mod int (*server_set_pen)(struct xrdp_mod* v, int style, int width); int (*server_draw_line)(struct xrdp_mod* v, int x1, int y1, int x2, int y2); - int (*server_add_char)(struct xrdp_mod* v, int font, int charactor, + int (*server_add_char)(struct xrdp_mod* v, int font, int character, int offset, int baseline, int width, int height, char* data); int (*server_draw_text)(struct xrdp_mod* v, int font, @@ -125,7 +125,7 @@ struct xrdp_mod int flags); int (*server_set_pointer_ex)(struct xrdp_mod* v, int x, int y, char* data, char* mask, int bpp); - int (*server_add_char_alpha)(struct xrdp_mod* mod, int font, int charactor, + int (*server_add_char_alpha)(struct xrdp_mod* mod, int font, int character, int offset, int baseline, int width, int height, char* data); diff --git a/xrdpapi/Makefile.am b/xrdpapi/Makefile.am index 88ef100e..8107ffeb 100644 --- a/xrdpapi/Makefile.am +++ b/xrdpapi/Makefile.am @@ -5,10 +5,8 @@ EXTRA_INCLUDES = EXTRA_LIBS = EXTRA_FLAGS = -AM_CFLAGS = \ - $(EXTRA_DEFINES) - -INCLUDES = \ +AM_CPPFLAGS = \ + $(EXTRA_DEFINES) \ $(EXTRA_INCLUDES) lib_LTLIBRARIES = \ diff --git a/xrdpapi/xrdpapi.c b/xrdpapi/xrdpapi.c index cd343e75..974a094c 100644 --- a/xrdpapi/xrdpapi.c +++ b/xrdpapi/xrdpapi.c @@ -162,6 +162,14 @@ WTSVirtualChannelOpenEx(unsigned int SessionId, const char *pVirtualName, return wts; } +/* + * Prevent receiving SIGPIPE on disconnect using either MSG_NOSIGNAL (Linux) + * or SO_NOSIGPIPE (Mac OS X) + */ +#if !defined(MSG_NOSIGNAL) +#define MSG_NOSIGNAL 0 +#endif + /*****************************************************************************/ static int mysend(int sck, const void* adata, int bytes) @@ -170,6 +178,11 @@ mysend(int sck, const void* adata, int bytes) int error; const char* data; +#if defined(SO_NOSIGPIPE) + const int on = 1; + setsockopt(sck, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on)); +#endif + data = (const char*)adata; sent = 0; while (sent < bytes) diff --git a/xrdpvr/Makefile.am b/xrdpvr/Makefile.am index 158baa90..f232ce41 100644 --- a/xrdpvr/Makefile.am +++ b/xrdpvr/Makefile.am @@ -5,10 +5,8 @@ EXTRA_INCLUDES = EXTRA_LIBS = EXTRA_FLAGS = -AM_CFLAGS = \ - $(EXTRA_DEFINES) - -INCLUDES = \ +AM_CPPFLAGS = \ + $(EXTRA_DEFINES) \ $(EXTRA_INCLUDES) lib_LTLIBRARIES = \ diff --git a/xup/Makefile.am b/xup/Makefile.am index 544c957a..d7017b42 100644 --- a/xup/Makefile.am +++ b/xup/Makefile.am @@ -1,12 +1,10 @@ EXTRA_DIST = xup.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common lib_LTLIBRARIES = \ diff --git a/xup/xup.c b/xup/xup.c index 1d92fa60..21fdedd5 100644 --- a/xup/xup.c +++ b/xup/xup.c @@ -797,7 +797,7 @@ process_server_add_char(struct mod *mod, struct stream *s) { int rv; int font; - int charactor; + int character; int x; int y; int cx; @@ -806,14 +806,14 @@ process_server_add_char(struct mod *mod, struct stream *s) char *bmpdata; in_uint16_le(s, font); - in_uint16_le(s, charactor); + in_uint16_le(s, character); in_sint16_le(s, x); in_sint16_le(s, y); in_uint16_le(s, cx); in_uint16_le(s, cy); in_uint16_le(s, len_bmpdata); in_uint8p(s, bmpdata, len_bmpdata); - rv = mod->server_add_char(mod, font, charactor, x, y, cx, cy, bmpdata); + rv = mod->server_add_char(mod, font, character, x, y, cx, cy, bmpdata); return rv; } @@ -825,7 +825,7 @@ process_server_add_char_alpha(struct mod *mod, struct stream *s) { int rv; int font; - int charactor; + int character; int x; int y; int cx; @@ -834,14 +834,14 @@ process_server_add_char_alpha(struct mod *mod, struct stream *s) char *bmpdata; in_uint16_le(s, font); - in_uint16_le(s, charactor); + in_uint16_le(s, character); in_sint16_le(s, x); in_sint16_le(s, y); in_uint16_le(s, cx); in_uint16_le(s, cy); in_uint16_le(s, len_bmpdata); in_uint8p(s, bmpdata, len_bmpdata); - rv = mod->server_add_char_alpha(mod, font, charactor, x, y, cx, cy, + rv = mod->server_add_char_alpha(mod, font, character, x, y, cx, cy, bmpdata); return rv; } diff --git a/xup/xup.h b/xup/xup.h index 520cc038..70cdcf27 100644 --- a/xup/xup.h +++ b/xup/xup.h @@ -71,7 +71,7 @@ struct mod int (*server_set_pen)(struct mod* v, int style, int width); int (*server_draw_line)(struct mod* v, int x1, int y1, int x2, int y2); - int (*server_add_char)(struct mod* v, int font, int charactor, + int (*server_add_char)(struct mod* v, int font, int character, int offset, int baseline, int width, int height, char* data); int (*server_draw_text)(struct mod* v, int font, @@ -121,7 +121,7 @@ struct mod int flags); int (*server_set_cursor_ex)(struct mod* v, int x, int y, char* data, char* mask, int bpp); - int (*server_add_char_alpha)(struct mod* v, int font, int charactor, + int (*server_add_char_alpha)(struct mod* v, int font, int character, int offset, int baseline, int width, int height, char* data); int (*server_create_os_surface_bpp)(struct mod* v, int rdpindex,