Merge pull request #309 from proski/devel

Fixes for autotools, compile warnings and MacOS compatibility
ulab-next-nosound
Itamar Reis Peixoto 9 years ago
commit ee436aeec9

1
.gitignore vendored

@ -5,7 +5,6 @@ autom4te.cache/
ChangeLog ChangeLog
config_ac.h config_ac.h
config_ac-h.in config_ac-h.in
config.c
config.guess config.guess
config.log config.log
config.status config.status

@ -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 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 if XRDP_NEUTRINORDP

@ -28,10 +28,4 @@ then
exit 1 exit 1
fi fi
touch configure.ac
touch NEWS
touch AUTHORS
touch README
touch ChangeLog
ln -s ../config.c $PWD/sesman/tools/config.c
autoreconf -fvi autoreconf -fvi

@ -19,7 +19,7 @@ EXTRA_DIST = \
xrdp_rail.h \ xrdp_rail.h \
crc16.h crc16.h
AM_CFLAGS = \ AM_CPPFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \

@ -22,7 +22,7 @@
/* you can define L_ENDIAN or B_ENDIAN and NEED_ALIGN or NO_NEED_ALIGN /* you can define L_ENDIAN or B_ENDIAN and NEED_ALIGN or NO_NEED_ALIGN
in the makefile to override */ in the makefile to override */
/* check endianess */ /* check endianness */
#if !(defined(L_ENDIAN) || defined(B_ENDIAN)) #if !(defined(L_ENDIAN) || defined(B_ENDIAN))
#if !defined(__BYTE_ORDER) && defined(__linux__) #if !defined(__BYTE_ORDER) && defined(__linux__)
#include <endian.h> #include <endian.h>

@ -4,6 +4,7 @@ AC_PREREQ(2.59)
AC_INIT([xrdp], [0.9.0], [xrdp-devel@googlegroups.com]) AC_INIT([xrdp], [0.9.0], [xrdp-devel@googlegroups.com])
AC_CONFIG_HEADERS(config_ac.h:config_ac-h.in) AC_CONFIG_HEADERS(config_ac.h:config_ac-h.in)
AM_INIT_AUTOMAKE([1.6 foreign]) AM_INIT_AUTOMAKE([1.6 foreign])
AC_CONFIG_MACRO_DIRS([m4])
AC_PROG_CC AC_PROG_CC
AC_C_CONST AC_C_CONST
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
@ -98,8 +99,6 @@ AC_ARG_ENABLE(opus, AS_HELP_STRING([--enable-opus],
[], [enable_opus=no]) [], [enable_opus=no])
AM_CONDITIONAL(XRDP_OPUS, [test x$enable_opus = xyes]) AM_CONDITIONAL(XRDP_OPUS, [test x$enable_opus = xyes])
AM_CONDITIONAL(GOT_PREFIX, test "x${prefix}" != "xNONE"])
# checking for openssl # checking for openssl
AC_CHECK_HEADER([openssl/rc4.h], [], AC_CHECK_HEADER([openssl/rc4.h], [],
[AC_MSG_ERROR([please install libssl-dev or openssl-devel])], [AC_MSG_ERROR([please install libssl-dev or openssl-devel])],
@ -200,16 +199,26 @@ else
fi fi
fi fi
# checking for Xlib, Xfixes AC_PATH_XTRA
AC_CHECK_HEADER([X11/Xlib.h], [], if test "x$no_x" == "xyes"; then
[AC_MSG_ERROR([please install libx11-dev or libX11-devel])]) 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_CHECK_HEADER([X11/extensions/Xfixes.h], [],
[AC_MSG_ERROR([please install libx11-dev and libxfixes-dev or libXfixes-devel])], [AC_MSG_ERROR([please install libx11-dev and libxfixes-dev or libXfixes-devel])],
[#include <X11/Xlib.h>]) [#include <X11/Xlib.h>])
# checking for Xrandr
AC_CHECK_HEADER([X11/extensions/Xrandr.h], [], AC_CHECK_HEADER([X11/extensions/Xrandr.h], [],
[AC_MSG_ERROR([please install libxrandr-dev or libXrandr-devel])], [AC_MSG_ERROR([please install libxrandr-dev or libXrandr-devel])],
[#include <X11/Xlib.h>]) [#include <X11/Xlib.h>])
CFLAGS="$save_CFLAGS"
libdir="${libdir}/xrdp"; libdir="${libdir}/xrdp";
if test "x${prefix}" = "xNONE" ; then if test "x${prefix}" = "xNONE" ; then
sysconfdir="/etc"; sysconfdir="/etc";

@ -31,5 +31,5 @@ is lost, the session remains.
For X11, start the XServer after the user is For X11, start the XServer after the user is
authenticated. First check for the next available X11 display, 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. variable.

@ -1,9 +1,12 @@
AM_CFLAGS = $(X_CFLAGS)
bin_PROGRAMS = \ bin_PROGRAMS = \
xrdp-genkeymap xrdp-genkeymap
xrdp_genkeymap_SOURCES = genkeymap.c evdev-map.c xrdp_genkeymap_SOURCES = genkeymap.c evdev-map.c
xrdp_genkeymap_LDFLAGS = \
$(X_LIBS)
xrdp_genkeymap_LDADD = \ xrdp_genkeymap_LDADD = \
-L/usr/X11R6/lib \ $(X_PRE_LIBS) -lX11 $(X_EXTRA_LIBS)
-lX11

@ -11,11 +11,11 @@ You can build sesman without pam, there is a Makefile parameter
for that. for that.
I also have a replacement ssl_calls.c to avoid the openssl dependency 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. 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/ http://server1.xrdp.org/xrdp/openssl/
unpackage the tarball unpack the tarball
tar -zxvf xrdp-0.1.tar.gz tar -zxvf xrdp-0.1.tar.gz
@ -28,7 +28,7 @@ run make
as root, run make install as root, run make install
This will install most of the files in /usr/local/xrdp. 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.
files and location files and location

@ -139,7 +139,7 @@ case "$1" in
;; ;;
force-stop) force-stop)
$0 stop $0 stop
# because it doesn't allways die the right way # because it doesn't always die the right way
force_stop force_stop
;; ;;
restart|force-reload) restart|force-reload)

@ -1,11 +1,9 @@
AM_CFLAGS = \ AM_CPPFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" -DXRDP_PID_PATH=\"${localstatedir}/run\" \
INCLUDES = \
-I$(top_srcdir)/common -I$(top_srcdir)/common
bin_PROGRAMS = \ bin_PROGRAMS = \

@ -28,19 +28,12 @@ EXTRA_LIBS += -ljpeg
endif endif
endif endif
if GOT_PREFIX AM_CPPFLAGS = \
EXTRA_INCLUDES += -I$(prefix)/include
EXTRA_FLAGS += -L$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib
endif
AM_CFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \
$(EXTRA_DEFINES) $(EXTRA_DEFINES) \
INCLUDES = \
-I$(top_srcdir)/common \ -I$(top_srcdir)/common \
$(EXTRA_INCLUDES) $(EXTRA_INCLUDES)

1
m4/.gitignore vendored

@ -0,0 +1 @@
*.m4

@ -1,12 +1,10 @@
EXTRA_DIST = mc.h EXTRA_DIST = mc.h
AM_CFLAGS = \ AM_CPPFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" -DXRDP_PID_PATH=\"${localstatedir}/run\" \
INCLUDES = \
-I$(top_srcdir)/common -I$(top_srcdir)/common
lib_LTLIBRARIES = \ lib_LTLIBRARIES = \

@ -67,7 +67,7 @@ struct mod
int (*server_set_pen)(struct mod* v, int style, int (*server_set_pen)(struct mod* v, int style,
int width); int width);
int (*server_draw_line)(struct mod* v, int x1, int y1, int x2, int y2); 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 offset, int baseline,
int width, int height, char* data); int width, int height, char* data);
int (*server_draw_text)(struct mod* v, int font, int (*server_draw_text)(struct mod* v, int font,

@ -7,14 +7,12 @@ else
EXTRA_DEFINES += -DXRDP_NODEBUG EXTRA_DEFINES += -DXRDP_NODEBUG
endif endif
AM_CFLAGS = \ AM_CPPFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \
$(EXTRA_DEFINES) $(EXTRA_DEFINES) \
INCLUDES = \
-I$(top_srcdir)/common \ -I$(top_srcdir)/common \
$(FREERDP_CFLAGS) $(FREERDP_CFLAGS)

@ -101,7 +101,7 @@ struct mod
int (*server_set_pen)(struct mod* v, int style, int (*server_set_pen)(struct mod* v, int style,
int width); int width);
int (*server_draw_line)(struct mod* v, int x1, int y1, int x2, int y2); 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 offset, int baseline,
int width, int height, char* data); int width, int height, char* data);
int (*server_draw_text)(struct mod* v, int font, int (*server_draw_text)(struct mod* v, int font,

@ -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 Not to defend any of these but its my default standard and make it easy
for me to read. for me to read.
Some files break these rules, they will be updated eventually. Some files break these rules, they will be updated eventually.

@ -7,14 +7,12 @@ else
EXTRA_DEFINES += -DXRDP_NODEBUG EXTRA_DEFINES += -DXRDP_NODEBUG
endif endif
AM_CFLAGS = \ AM_CPPFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \
$(EXTRA_DEFINES) $(EXTRA_DEFINES) \
INCLUDES = \
-I$(top_srcdir)/common -I$(top_srcdir)/common
lib_LTLIBRARIES = \ lib_LTLIBRARIES = \

@ -292,7 +292,7 @@ struct mod
int (*server_set_pen)(struct mod* v, int style, int (*server_set_pen)(struct mod* v, int style,
int width); int width);
int (*server_draw_line)(struct mod* v, int x1, int y1, int x2, int y2); 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 offset, int baseline,
int width, int height, char* data); int width, int height, char* data);
int (*server_draw_text)(struct mod* v, int font, int (*server_draw_text)(struct mod* v, int font,

@ -9,8 +9,8 @@ Credits
Mark from up 19.9 was the first to work with rdp server code. Mark from up 19.9 was the first to work with rdp server code.
Tested with linux on i386, x64, sparc, and ppc. Tested with linux on i386, x64, sparc, and ppc.
I've got it compiling and working in windows with borland free tools. 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. None of the sesman or Xserver stuff works in windows of course.
xrdp directory is the main server code xrdp directory is the main server code
vnc directory is a simple vnc client module for xrdp 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 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 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 Xserver is the files needed to build an rdp specific X11 server
COPYING is the licence file COPYING is the license file
design.txt is an attempt to expain the project design design.txt is an attempt to explain the project design
prog_std.txt is an attempt to explain the programming standard used 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 to build and install

@ -2,13 +2,11 @@
EXTRA_DIST = sesman.ini startwm.sh sesman.h access.h auth.h config.h env.h \ 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 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_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" -DXRDP_PID_PATH=\"${localstatedir}/run\" \
INCLUDES = \
-I$(top_srcdir)/common \ -I$(top_srcdir)/common \
-I$(top_srcdir)/sesman/libscp -I$(top_srcdir)/sesman/libscp

@ -31,17 +31,17 @@ EXTRA_DEFINES += -DXRDP_OPUS
EXTRA_LIBS += -lopus EXTRA_LIBS += -lopus
endif endif
AM_CFLAGS = \ AM_CPPFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \
$(EXTRA_DEFINES) $(EXTRA_DEFINES) \
INCLUDES = \
-I$(top_srcdir)/common \ -I$(top_srcdir)/common \
$(EXTRA_INCLUDES) $(EXTRA_INCLUDES)
AM_CFLAGS = $(X_CFLAGS)
sbin_PROGRAMS = \ sbin_PROGRAMS = \
xrdp-chansrv xrdp-chansrv
@ -62,10 +62,10 @@ xrdp_chansrv_SOURCES = \
chansrv_common.c chansrv_common.c
xrdp_chansrv_LDFLAGS = \ xrdp_chansrv_LDFLAGS = \
$(X_LIBS) \
$(EXTRA_FLAGS) $(EXTRA_FLAGS)
xrdp_chansrv_LDADD = \ xrdp_chansrv_LDADD = \
-L/usr/X11R6/lib \
$(top_builddir)/common/libcommon.la \ $(top_builddir)/common/libcommon.la \
-lX11 -lXfixes -lXrandr \ $(X_PRE_LIBS) -lXfixes -lXrandr -lX11 $(X_EXTRA_LIBS) \
$(EXTRA_LIBS) $(EXTRA_LIBS)

@ -176,6 +176,8 @@ x-special/gnome-copied-files
#define LOG_ERROR 0 #define LOG_ERROR 0
#define LOG_INFO 1 #define LOG_INFO 1
#define LOG_DEBUG 2 #define LOG_DEBUG 2
#undef LOG_LEVEL
#define LOG_LEVEL LOG_ERROR #define LOG_LEVEL LOG_ERROR
#define log_error(_params...) \ #define log_error(_params...) \

@ -22,6 +22,7 @@
* CLIPRDR_FILEDESCRIPTOR * CLIPRDR_FILEDESCRIPTOR
* http://msdn.microsoft.com/en-us/library/ff362447%28prot.20%29.aspx */ * http://msdn.microsoft.com/en-us/library/ff362447%28prot.20%29.aspx */
#include <sys/time.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <X11/extensions/Xfixes.h> #include <X11/extensions/Xfixes.h>

@ -1775,7 +1775,7 @@ rail_configure_window(XConfigureEvent *config)
/*****************************************************************************/ /*****************************************************************************/
static int static int
rail_desktop_resize(lxevent) rail_desktop_resize(XEvent *lxevent)
{ {
LOG(0, ("rail_desktop_resize:")); LOG(0, ("rail_desktop_resize:"));
return 0; return 0;

@ -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 \ 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 libscp_types.h libscp_v1c.h libscp_v1s_mng.h
AM_CFLAGS = \ AM_CPPFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" -DXRDP_PID_PATH=\"${localstatedir}/run\" \
INCLUDES = \
-I$(top_srcdir)/common -I$(top_srcdir)/common
lib_LTLIBRARIES = \ lib_LTLIBRARIES = \

@ -53,7 +53,7 @@ scp_lock_fork_release(void);
* @brief starts a section that is critical for forking * @brief starts a section that is critical for forking
* *
* starts a section that is critical for forking, that is no one can fork() * 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 * while I'm in a critical section. But if someone wanted to fork we have
* to wait until he finishes with lock_fork_release() * to wait until he finishes with lock_fork_release()
* *
* @return * @return

@ -435,8 +435,11 @@ scp_v1s_list_sessions(struct SCP_CONNECTION *c, int sescnt, struct SCP_DISCONNEC
} }
/* then we wait for client ack */ /* 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); init_stream(c->in_s, c->in_s->size);
if (0 != scp_tcp_force_recv(c->in_sck, c->in_s->data, 8)) if (0 != scp_tcp_force_recv(c->in_sck, c->in_s->data, 8))

@ -1,11 +1,9 @@
AM_CFLAGS = \ AM_CPPFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" -DXRDP_PID_PATH=\"${localstatedir}/run\" \
INCLUDES = \
-I$(top_srcdir)/common -I$(top_srcdir)/common
sbin_PROGRAMS = \ sbin_PROGRAMS = \

@ -1,16 +1,16 @@
EXTRA_DIST = tcp.h EXTRA_DIST = tcp.h
AM_CFLAGS = \ AM_CPPFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" -DXRDP_PID_PATH=\"${localstatedir}/run\" \
INCLUDES = \
-I$(top_srcdir)/common \ -I$(top_srcdir)/common \
-I$(top_srcdir)/sesman/libscp \ -I$(top_srcdir)/sesman/libscp \
-I$(top_srcdir)/sesman -I$(top_srcdir)/sesman
AM_CFLAGS = $(X_CFLAGS)
bin_PROGRAMS = \ bin_PROGRAMS = \
xrdp-sesrun \ xrdp-sesrun \
xrdp-sesadmin \ xrdp-sesadmin \
@ -48,6 +48,8 @@ xrdp_sesadmin_LDADD = \
$(top_builddir)/common/libcommon.la \ $(top_builddir)/common/libcommon.la \
$(top_builddir)/sesman/libscp/libscp.la $(top_builddir)/sesman/libscp/libscp.la
xrdp_xcon_LDFLAGS = \
$(X_LIBS)
xrdp_xcon_LDADD = \ xrdp_xcon_LDADD = \
-L/usr/X11R6/lib \ $(X_PRE_LIBS) -lX11 $(X_EXTRA_LIBS)
-lX11

@ -0,0 +1 @@
#include "../config.c"

@ -19,6 +19,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <sys/types.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
Display *g_display = 0; Display *g_display = 0;

@ -1,12 +1,10 @@
EXTRA_DIST = vnc.h EXTRA_DIST = vnc.h
AM_CFLAGS = \ AM_CPPFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" -DXRDP_PID_PATH=\"${localstatedir}/run\" \
INCLUDES = \
-I$(top_srcdir)/common -I$(top_srcdir)/common
lib_LTLIBRARIES = \ lib_LTLIBRARIES = \

@ -1099,7 +1099,8 @@ lib_mod_connect(struct vnc *v)
if (error != 0) 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) if (error == 0 && check_sec_result)

@ -67,7 +67,7 @@ struct vnc
int (*server_set_pen)(struct vnc* v, int style, int (*server_set_pen)(struct vnc* v, int style,
int width); int width);
int (*server_draw_line)(struct vnc* v, int x1, int y1, int x2, int y2); 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 offset, int baseline,
int width, int height, char* data); int width, int height, char* data);
int (*server_draw_text)(struct vnc* v, int font, int (*server_draw_text)(struct vnc* v, int font,

@ -582,10 +582,10 @@ rdpup_check_alpha_dirty(PixmapPtr pDirtyPixmap, rdpPixmapRec* pDirtyPriv);
int int
rdpup_check_dirty_screen(rdpPixmapRec* pDirtyPriv); rdpup_check_dirty_screen(rdpPixmapRec* pDirtyPriv);
int 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); char* bmpdata, int bmpdata_bytes);
int 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); char* bmpdata, int bmpdata_bytes);
int int
rdpup_draw_text(int font, int flags, int mixmode, rdpup_draw_text(int font, int flags, int mixmode,

@ -2823,7 +2823,7 @@ rdpup_check_alpha_dirty(PixmapPtr pDirtyPixmap, rdpPixmapRec* pDirtyPriv)
/******************************************************************************/ /******************************************************************************/
int 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) char* bmpdata, int bmpdata_bytes)
{ {
if (g_connected) 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 */ out_uint16_le(g_out_s, 18 + bmpdata_bytes); /* size */
g_count++; g_count++;
out_uint16_le(g_out_s, font); 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, x);
out_uint16_le(g_out_s, y); out_uint16_le(g_out_s, y);
out_uint16_le(g_out_s, cx); 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 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) char* bmpdata, int bmpdata_bytes)
{ {
if (g_connected) 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 */ out_uint16_le(g_out_s, 18 + bmpdata_bytes); /* size */
g_count++; g_count++;
out_uint16_le(g_out_s, font); 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, x);
out_uint16_le(g_out_s, y); out_uint16_le(g_out_s, y);
out_uint16_le(g_out_s, cx); out_uint16_le(g_out_s, cx);

@ -11,26 +11,19 @@ else
EXTRA_DEFINES = -DXRDP_NODEBUG EXTRA_DEFINES = -DXRDP_NODEBUG
endif endif
if GOT_PREFIX
EXTRA_INCLUDES += -I$(prefix)/include
EXTRA_FLAGS += -L$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib
endif
if XRDP_RFXCODEC if XRDP_RFXCODEC
EXTRA_DEFINES += -DXRDP_RFXCODEC EXTRA_DEFINES += -DXRDP_RFXCODEC
EXTRA_INCLUDES += -I$(top_srcdir)/librfxcodec/include EXTRA_INCLUDES += -I$(top_srcdir)/librfxcodec/include
EXTRA_LIBS += $(top_srcdir)/librfxcodec/src/librfxencode.a EXTRA_LIBS += $(top_srcdir)/librfxcodec/src/librfxencode.a
endif endif
AM_CFLAGS = \ AM_CPPFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \
-DXRDP_LIB_PATH=\"${libdir}\" \ -DXRDP_LIB_PATH=\"${libdir}\" \
$(EXTRA_DEFINES) $(EXTRA_DEFINES) \
INCLUDES = \
-I$(top_builddir) \ -I$(top_builddir) \
-I$(top_srcdir)/common \ -I$(top_srcdir)/common \
-I$(top_srcdir)/libxrdp \ -I$(top_srcdir)/libxrdp \

@ -3,7 +3,7 @@ complete rdp key code listing
en-us 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 When holding a key down, the down flags repeat but the up flags only
come once at the end. come once at the end.
Rdesktop does not do this as of yet. It always sends down and up Rdesktop does not do this as of yet. It always sends down and up

@ -381,6 +381,8 @@ int APP_CC
xrdp_mm_check_chan(struct xrdp_mm *self); xrdp_mm_check_chan(struct xrdp_mm *self);
int APP_CC int APP_CC
xrdp_mm_check_wait_objs(struct xrdp_mm* self); 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 int DEFAULT_CC
server_begin_update(struct xrdp_mod* mod); server_begin_update(struct xrdp_mod* mod);
int DEFAULT_CC int DEFAULT_CC
@ -444,7 +446,7 @@ server_set_pen(struct xrdp_mod* mod, int style, int width);
int DEFAULT_CC int DEFAULT_CC
server_draw_line(struct xrdp_mod* mod, int x1, int y1, int x2, int y2); server_draw_line(struct xrdp_mod* mod, int x1, int y1, int x2, int y2);
int DEFAULT_CC 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 offset, int baseline,
int width, int height, char* data); int width, int height, char* data);
int DEFAULT_CC int DEFAULT_CC
@ -509,6 +511,6 @@ server_monitored_desktop(struct xrdp_mod* mod,
struct rail_monitored_desktop_order* mdo, struct rail_monitored_desktop_order* mdo,
int flags); int flags);
int DEFAULT_CC 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 offset, int baseline,
int width, int height, char* data); int width, int height, char* data);

@ -2833,7 +2833,7 @@ server_draw_line(struct xrdp_mod *mod, int x1, int y1, int x2, int y2)
/*****************************************************************************/ /*****************************************************************************/
int DEFAULT_CC 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 offset, int baseline,
int width, int height, char *data) 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.data = data;
fi.bpp = 1; fi.bpp = 1;
return libxrdp_orders_send_font(((struct xrdp_wm *)mod->wm)->session, 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 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 offset, int baseline,
int width, int height, char* data) 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.data = data;
fi.bpp = 8; fi.bpp = 8;
return libxrdp_orders_send_font(((struct xrdp_wm*)mod->wm)->session, return libxrdp_orders_send_font(((struct xrdp_wm*)mod->wm)->session,
&fi, font, charactor); &fi, font, character);
} }

@ -75,7 +75,7 @@ struct xrdp_mod
int (*server_set_pen)(struct xrdp_mod* v, int style, int (*server_set_pen)(struct xrdp_mod* v, int style,
int width); int width);
int (*server_draw_line)(struct xrdp_mod* v, int x1, int y1, int x2, int y2); 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 offset, int baseline,
int width, int height, char* data); int width, int height, char* data);
int (*server_draw_text)(struct xrdp_mod* v, int font, int (*server_draw_text)(struct xrdp_mod* v, int font,
@ -125,7 +125,7 @@ struct xrdp_mod
int flags); int flags);
int (*server_set_pointer_ex)(struct xrdp_mod* v, int x, int y, char* data, int (*server_set_pointer_ex)(struct xrdp_mod* v, int x, int y, char* data,
char* mask, int bpp); 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 offset, int baseline,
int width, int height, char* data); int width, int height, char* data);

@ -5,10 +5,8 @@ EXTRA_INCLUDES =
EXTRA_LIBS = EXTRA_LIBS =
EXTRA_FLAGS = EXTRA_FLAGS =
AM_CFLAGS = \ AM_CPPFLAGS = \
$(EXTRA_DEFINES) $(EXTRA_DEFINES) \
INCLUDES = \
$(EXTRA_INCLUDES) $(EXTRA_INCLUDES)
lib_LTLIBRARIES = \ lib_LTLIBRARIES = \

@ -162,6 +162,14 @@ WTSVirtualChannelOpenEx(unsigned int SessionId, const char *pVirtualName,
return wts; 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 static int
mysend(int sck, const void* adata, int bytes) mysend(int sck, const void* adata, int bytes)
@ -170,6 +178,11 @@ mysend(int sck, const void* adata, int bytes)
int error; int error;
const char* data; 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; data = (const char*)adata;
sent = 0; sent = 0;
while (sent < bytes) while (sent < bytes)

@ -5,10 +5,8 @@ EXTRA_INCLUDES =
EXTRA_LIBS = EXTRA_LIBS =
EXTRA_FLAGS = EXTRA_FLAGS =
AM_CFLAGS = \ AM_CPPFLAGS = \
$(EXTRA_DEFINES) $(EXTRA_DEFINES) \
INCLUDES = \
$(EXTRA_INCLUDES) $(EXTRA_INCLUDES)
lib_LTLIBRARIES = \ lib_LTLIBRARIES = \

@ -1,12 +1,10 @@
EXTRA_DIST = xup.h EXTRA_DIST = xup.h
AM_CFLAGS = \ AM_CPPFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" -DXRDP_PID_PATH=\"${localstatedir}/run\" \
INCLUDES = \
-I$(top_srcdir)/common -I$(top_srcdir)/common
lib_LTLIBRARIES = \ lib_LTLIBRARIES = \

@ -797,7 +797,7 @@ process_server_add_char(struct mod *mod, struct stream *s)
{ {
int rv; int rv;
int font; int font;
int charactor; int character;
int x; int x;
int y; int y;
int cx; int cx;
@ -806,14 +806,14 @@ process_server_add_char(struct mod *mod, struct stream *s)
char *bmpdata; char *bmpdata;
in_uint16_le(s, font); in_uint16_le(s, font);
in_uint16_le(s, charactor); in_uint16_le(s, character);
in_sint16_le(s, x); in_sint16_le(s, x);
in_sint16_le(s, y); in_sint16_le(s, y);
in_uint16_le(s, cx); in_uint16_le(s, cx);
in_uint16_le(s, cy); in_uint16_le(s, cy);
in_uint16_le(s, len_bmpdata); in_uint16_le(s, len_bmpdata);
in_uint8p(s, bmpdata, 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; return rv;
} }
@ -825,7 +825,7 @@ process_server_add_char_alpha(struct mod *mod, struct stream *s)
{ {
int rv; int rv;
int font; int font;
int charactor; int character;
int x; int x;
int y; int y;
int cx; int cx;
@ -834,14 +834,14 @@ process_server_add_char_alpha(struct mod *mod, struct stream *s)
char *bmpdata; char *bmpdata;
in_uint16_le(s, font); in_uint16_le(s, font);
in_uint16_le(s, charactor); in_uint16_le(s, character);
in_sint16_le(s, x); in_sint16_le(s, x);
in_sint16_le(s, y); in_sint16_le(s, y);
in_uint16_le(s, cx); in_uint16_le(s, cx);
in_uint16_le(s, cy); in_uint16_le(s, cy);
in_uint16_le(s, len_bmpdata); in_uint16_le(s, len_bmpdata);
in_uint8p(s, bmpdata, 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); bmpdata);
return rv; return rv;
} }

@ -71,7 +71,7 @@ struct mod
int (*server_set_pen)(struct mod* v, int style, int (*server_set_pen)(struct mod* v, int style,
int width); int width);
int (*server_draw_line)(struct mod* v, int x1, int y1, int x2, int y2); 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 offset, int baseline,
int width, int height, char* data); int width, int height, char* data);
int (*server_draw_text)(struct mod* v, int font, int (*server_draw_text)(struct mod* v, int font,
@ -121,7 +121,7 @@ struct mod
int flags); int flags);
int (*server_set_cursor_ex)(struct mod* v, int x, int y, char* data, int (*server_set_cursor_ex)(struct mod* v, int x, int y, char* data,
char* mask, int bpp); 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 offset, int baseline,
int width, int height, char* data); int width, int height, char* data);
int (*server_create_os_surface_bpp)(struct mod* v, int rdpindex, int (*server_create_os_surface_bpp)(struct mod* v, int rdpindex,

Loading…
Cancel
Save