diff options
-rw-r--r-- | .gitignore | 37 | ||||
-rw-r--r-- | Makefile.am | 10 | ||||
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | freerdp/Makefile.am | 20 | ||||
-rw-r--r-- | freerdp/xrdp-freerdp.c | 114 | ||||
-rw-r--r-- | freerdp/xrdp-freerdp.h | 100 | ||||
-rw-r--r--[-rwxr-xr-x] | keygen/keygen.c | 0 | ||||
-rw-r--r-- | mc/mc.h | 5 | ||||
-rw-r--r-- | rdp/rdp.h | 5 | ||||
-rw-r--r-- | sesman/sesman.ini | 3 | ||||
-rw-r--r-- | sesman/session.c | 2 | ||||
-rw-r--r-- | vnc/vnc.h | 6 | ||||
-rw-r--r-- | xrdp/xrdp.ini | 6 | ||||
-rw-r--r-- | xrdp/xrdp_types.h | 4 | ||||
-rw-r--r-- | xup/xup.h | 5 |
15 files changed, 309 insertions, 15 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..f5d01778 --- /dev/null +++ b/.gitignore @@ -0,0 +1,37 @@ +*~ +aclocal.m4 +AUTHORS +autom4te.cache/ +ChangeLog +config_ac.h +config_ac-h.in +config.c +config.guess +config.log +config.status +config.sub +configure +depcomp +.deps/ +install-sh +*.la +.libs +libtool +*.lo +ltmain.sh +Makefile +Makefile.in +missing +NEWS +*.o +README +stamp-h1 +xrdp +xrdp-chansrv +xrdp-genkeymap +xrdp-keygen +xrdp-sesadmin +xrdp-sesman +xrdp-sesrun +xrdp-sessvc +xrdp-sestest diff --git a/Makefile.am b/Makefile.am index e18826ef..a65355e4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,13 @@ EXTRA_DIST = bootstrap COPYING design.txt faq-compile.txt faq-general.txt file-loc.txt install.txt prog_std.txt readme.txt +<<<<<<< HEAD + +if XRDP_FREERDP +FREERDPDIR = freerdp +else +FREERDPDIR = +endif +======= +>>>>>>> 52cf642bcaaad68f1e82ebdd66778404d8f97412 SUBDIRS = \ common \ @@ -6,6 +15,7 @@ SUBDIRS = \ rdp \ xup \ mc \ + $(FREERDPDIR) \ libxrdp \ xrdp \ sesman \ diff --git a/configure.ac b/configure.ac index a5e33eb4..88c8b1ee 100644 --- a/configure.ac +++ b/configure.ac @@ -23,6 +23,10 @@ AC_ARG_ENABLE(xrdpdebug, AS_HELP_STRING([--enable-xrdpdebug], [Build debug (default: no)]), [xrdpdebug=true], [xrdpdebug=false]) AM_CONDITIONAL(XRDP_DEBUG, [test x$xrdpdebug = xtrue]) +AC_ARG_ENABLE(freerdp, AS_HELP_STRING([--enable-freerdp], + [Build freerdp module (default: no)]), + [freerdp=true], [freerdp=false]) +AM_CONDITIONAL(XRDP_FREERDP, [test x$freerdp = xtrue]) # checking for openssl AC_CHECK_HEADER([openssl/rc4.h], [], @@ -39,6 +43,8 @@ then fi fi +AS_IF([test "x$enable_freerdp" = "xyes"], [PKG_CHECK_MODULES(FREERDP, freerdp >= 0.8.1) ], [] ) + # checking for Xlib, Xfixes AC_CHECK_HEADER([X11/Xlib.h], [], [AC_MSG_ERROR([please install libx11-dev or libX11-devel])]) @@ -58,6 +64,7 @@ AC_CONFIG_FILES([Makefile libxrdp/Makefile xup/Makefile mc/Makefile + freerdp/Makefile xrdp/Makefile sesman/Makefile sesman/libscp/Makefile diff --git a/freerdp/Makefile.am b/freerdp/Makefile.am new file mode 100644 index 00000000..a63044f4 --- /dev/null +++ b/freerdp/Makefile.am @@ -0,0 +1,20 @@ +EXTRA_DIST = xrdp-freerdp.h + +AM_CFLAGS = \ + -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ + -DXRDP_SBIN_PATH=\"${sbindir}\" \ + -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" + +INCLUDES = \ + -I$(top_srcdir)/common \ + $(FREERDP_CFLAGS) + +lib_LTLIBRARIES = \ + libxrdpfreerdp.la + +libxrdpfreerdp_la_SOURCES = xrdp-freerdp.c + +libxrdpfreerdp_la_LIBADD = \ + $(top_srcdir)/common/libcommon.la \ + $(FREERDP_LIBS) diff --git a/freerdp/xrdp-freerdp.c b/freerdp/xrdp-freerdp.c new file mode 100644 index 00000000..099020b3 --- /dev/null +++ b/freerdp/xrdp-freerdp.c @@ -0,0 +1,114 @@ +/* + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + xrdp: A Remote Desktop Protocol server. + Copyright (C) Jay Sorg 2010 + + freerdp wrapper + +*/ + +#include "xrdp-freerdp.h" + +/*****************************************************************************/ +/* return error */ +int DEFAULT_CC +lib_mod_start(struct mod* mod, int w, int h, int bpp) +{ + LIB_DEBUG(mod, "in lib_mod_start"); + mod->width = w; + mod->height = h; + mod->bpp = bpp; + LIB_DEBUG(mod, "out lib_mod_start"); + return 0; +} + +/******************************************************************************/ +/* return error */ +int DEFAULT_CC +lib_mod_connect(struct mod* mod) +{ + LIB_DEBUG(mod, "in lib_mod_connect"); + LIB_DEBUG(mod, "out lib_mod_connect"); + return 0; +} + +/******************************************************************************/ +/* return error */ +int DEFAULT_CC +lib_mod_event(struct mod* mod, int msg, long param1, long param2, + long param3, long param4) +{ + LIB_DEBUG(mod, "in lib_mod_event"); + LIB_DEBUG(mod, "out lib_mod_event"); + return 0; +} + +/******************************************************************************/ +/* return error */ +int DEFAULT_CC +lib_mod_signal(struct mod* mod) +{ + LIB_DEBUG(mod, "in lib_mod_signal"); + LIB_DEBUG(mod, "out lib_mod_signal"); + return 0; +} + +/******************************************************************************/ +/* return error */ +int DEFAULT_CC +lib_mod_end(struct mod* mod) +{ + return 0; +} + +/******************************************************************************/ +/* return error */ +int DEFAULT_CC +lib_mod_set_param(struct mod* mod, char* name, char* value) +{ + return 0; +} + +/******************************************************************************/ +struct mod* EXPORT_CC +mod_init(void) +{ + struct mod* mod; + + mod = (struct mod*)g_malloc(sizeof(struct mod), 1); + mod->size = sizeof(struct mod); + mod->version = CURRENT_MOD_VER; + mod->handle = (long)mod; + mod->mod_connect = lib_mod_connect; + mod->mod_start = lib_mod_start; + mod->mod_event = lib_mod_event; + mod->mod_signal = lib_mod_signal; + mod->mod_end = lib_mod_end; + mod->mod_set_param = lib_mod_set_param; + return mod; +} + +/******************************************************************************/ +int EXPORT_CC +mod_exit(struct mod* mod) +{ + if (mod == 0) + { + return 0; + } + g_free(mod); + return 0; +} diff --git a/freerdp/xrdp-freerdp.h b/freerdp/xrdp-freerdp.h new file mode 100644 index 00000000..a9c44c0c --- /dev/null +++ b/freerdp/xrdp-freerdp.h @@ -0,0 +1,100 @@ +/* + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + xrdp: A Remote Desktop Protocol server. + Copyright (C) Jay Sorg 2010 + + freerdp wrapper + +*/ + +/* include other h files */ +#include "arch.h" +#include "parse.h" +#include "os_calls.h" +#include "defines.h" + +/* this is the freerdp main header */ +#include <freerdp.h> + +#define CURRENT_MOD_VER 2 + +struct mod +{ + int size; /* size of this struct */ + int version; /* internal version */ + /* client functions */ + int (*mod_start)(struct mod* v, int w, int h, int bpp); + int (*mod_connect)(struct mod* v); + int (*mod_event)(struct mod* v, int msg, long param1, long param2, + long param3, long param4); + int (*mod_signal)(struct mod* v); + int (*mod_end)(struct mod* v); + int (*mod_set_param)(struct mod* v, char* name, char* value); + long mod_dumby[100 - 6]; /* align, 100 minus the number of mod + functions above */ + /* server functions */ + int (*server_begin_update)(struct mod* v); + int (*server_end_update)(struct mod* v); + int (*server_fill_rect)(struct mod* v, int x, int y, int cx, int cy); + int (*server_screen_blt)(struct mod* v, int x, int y, int cx, int cy, + int srcx, int srcy); + int (*server_paint_rect)(struct mod* v, int x, int y, int cx, int cy, + char* data, int width, int height, int srcx, int srcy); + int (*server_set_cursor)(struct mod* v, int x, int y, char* data, char* mask); + int (*server_palette)(struct mod* v, int* palette); + int (*server_msg)(struct mod* v, char* msg, int code); + int (*server_is_term)(struct mod* v); + int (*server_set_clip)(struct mod* v, int x, int y, int cx, int cy); + int (*server_reset_clip)(struct mod* v); + int (*server_set_fgcolor)(struct mod* v, int fgcolor); + int (*server_set_bgcolor)(struct mod* v, int bgcolor); + int (*server_set_opcode)(struct mod* v, int opcode); + int (*server_set_mixmode)(struct mod* v, int mixmode); + int (*server_set_brush)(struct mod* v, int x_orgin, int y_orgin, + int style, char* pattern); + 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 offset, int baseline, + int width, int height, char* data); + int (*server_draw_text)(struct mod* v, int font, + int flags, int mixmode, int clip_left, int clip_top, + int clip_right, int clip_bottom, + int box_left, int box_top, + int box_right, int box_bottom, + int x, int y, char* data, int data_len); + int (*server_reset)(struct mod* v, int width, int height, int bpp); + int (*server_query_channel)(struct mod* v, int index, + char* channel_name, + int* channel_flags); + int (*server_get_channel_id)(struct mod* v, char* name); + int (*server_send_to_channel)(struct mod* v, int channel_id, + char* data, int data_len, + int total_data_len, int flags); + int (*server_bell_trigger)(struct mod* v); + long server_dumby[100 - 25]; /* align, 100 minus the number of server + functions above */ + /* common */ + long handle; /* pointer to self as long */ + long wm; + long painter; + int sck; + /* mod data */ + int width; + int height; + int bpp; +}; diff --git a/keygen/keygen.c b/keygen/keygen.c index e984572b..e984572b 100755..100644 --- a/keygen/keygen.c +++ b/keygen/keygen.c @@ -26,7 +26,7 @@ #include "os_calls.h" #include "defines.h" -#define CURRENT_MOD_VER 1 +#define CURRENT_MOD_VER 2 struct mod { @@ -82,7 +82,8 @@ struct mod int (*server_send_to_channel)(struct mod* v, int channel_id, char* data, int data_len, int total_data_len, int flags); - long server_dumby[100 - 24]; /* align, 100 minus the number of server + int (*server_bell_trigger)(struct mod* v); + long server_dumby[100 - 25]; /* align, 100 minus the number of server functions above */ /* common */ long handle; /* pointer to self as long */ @@ -251,7 +251,7 @@ struct rdp_orders struct rdp_bitmap* cache_bitmap[3][600]; }; -#define CURRENT_MOD_VER 1 +#define CURRENT_MOD_VER 2 struct mod { @@ -311,7 +311,8 @@ struct mod int (*server_send_to_channel)(struct mod* v, int channel_id, char* data, int data_len, int total_data_len, int flags); - long server_dumby[100 - 24]; /* align, 100 minus the number of server + int (*server_bell_trigger)(struct mod* v); + long server_dumby[100 - 25]; /* align, 100 minus the number of server functions above */ /* common */ long handle; /* pointer to self as long */ diff --git a/sesman/sesman.ini b/sesman/sesman.ini index 1238cc92..640c898d 100644 --- a/sesman/sesman.ini +++ b/sesman/sesman.ini @@ -29,9 +29,6 @@ param1=-bs param2=-ac param3=-nolisten param4=tcp -param5=-localhost -param6=-dpi -param7=96 [Xvnc] param1=-bs diff --git a/sesman/session.c b/sesman/session.c index a9cbc909..36262ad6 100644 --- a/sesman/session.c +++ b/sesman/session.c @@ -504,7 +504,7 @@ session_start_fork(int width, int height, int bpp, char* username, /* additional parameters from sesman.ini file */ //config_read_xserver_params(SESMAN_SESSION_TYPE_XRDP, // xserver_params); - list_append_list_strdup(g_cfg->rdp_params, xserver_params, 0); + list_append_list_strdup(g_cfg->rdp_params, xserver_params, 0); /* make sure it ends with a zero */ list_add_item(xserver_params, 0); @@ -27,7 +27,7 @@ #include "d3des.h" #include "defines.h" -#define CURRENT_MOD_VER 1 +#define CURRENT_MOD_VER 2 struct vnc { @@ -50,7 +50,6 @@ struct vnc /* server functions */ int (*server_begin_update)(struct vnc* v); int (*server_end_update)(struct vnc* v); - int (*server_bell_trigger)(struct vnc* v); int (*server_fill_rect)(struct vnc* v, int x, int y, int cx, int cy); int (*server_screen_blt)(struct vnc* v, int x, int y, int cx, int cy, int srcx, int srcy); @@ -88,7 +87,8 @@ struct vnc int (*server_send_to_channel)(struct vnc* v, int channel_id, char* data, int data_len, int total_data_len, int flags); - long server_dumby[100 - 24]; /* align, 100 minus the number of server + int (*server_bell_trigger)(struct vnc* v); + long server_dumby[100 - 25]; /* align, 100 minus the number of server functions above */ /* common */ long handle; /* pointer to self as long */ diff --git a/xrdp/xrdp.ini b/xrdp/xrdp.ini index fdaa545b..e5e6e3d9 100644 --- a/xrdp/xrdp.ini +++ b/xrdp/xrdp.ini @@ -55,6 +55,12 @@ ip=ask port=ask3389 [xrdp6] +name=freerdp-any +lib=libxrdpfreerdp.so +ip=ask +port=ask3389 + +[xrdp7] name=sesman-X11rdp lib=libxup.so username=ask diff --git a/xrdp/xrdp_types.h b/xrdp/xrdp_types.h index 5f4c8ee9..eb4d0ad0 100644 --- a/xrdp/xrdp_types.h +++ b/xrdp/xrdp_types.h @@ -42,7 +42,6 @@ struct xrdp_mod /* server functions */ int (*server_begin_update)(struct xrdp_mod* v); int (*server_end_update)(struct xrdp_mod* v); - int (*server_bell_trigger)(struct xrdp_mod* v); int (*server_fill_rect)(struct xrdp_mod* v, int x, int y, int cx, int cy); int (*server_screen_blt)(struct xrdp_mod* v, int x, int y, int cx, int cy, int srcx, int srcy); @@ -80,7 +79,8 @@ struct xrdp_mod int (*server_send_to_channel)(struct xrdp_mod* v, int channel_id, char* data, int data_len, int total_data_len, int flags); - long server_dumby[100 - 24]; /* align, 100 minus the number of server + int (*server_bell_trigger)(struct xrdp_mod* v); + long server_dumby[100 - 25]; /* align, 100 minus the number of server functions above */ /* common */ long handle; /* pointer to self as int */ @@ -26,7 +26,7 @@ #include "os_calls.h" #include "defines.h" -#define CURRENT_MOD_VER 1 +#define CURRENT_MOD_VER 2 struct mod { @@ -86,7 +86,8 @@ struct mod int (*server_send_to_channel)(struct mod* v, int channel_id, char* data, int data_len, int total_data_len, int flags); - tbus server_dumby[100 - 24]; /* align, 100 minus the number of server + int (*server_bell_trigger)(struct mod* v); + tbus server_dumby[100 - 25]; /* align, 100 minus the number of server functions above */ /* common */ tbus handle; /* pointer to self as long */ |