xrdp: use full path for loading xrdp modules

ulab-next
Jay Sorg 12 years ago
parent be44e0be4b
commit 19a9ed47dc

@ -37,4 +37,8 @@
#define XRDP_SHARE_PATH "/usr/local/share/xrdp" #define XRDP_SHARE_PATH "/usr/local/share/xrdp"
#endif #endif
#if !defined(XRDP_LIB_PATH)
#define XRDP_LIB_PATH "/usr/local/lib/xrdp"
#endif
#endif #endif

@ -11,6 +11,7 @@ AM_CFLAGS = \
-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}\" \
$(EXTRA_DEFINES) $(EXTRA_DEFINES)
INCLUDES = \ INCLUDES = \

@ -63,6 +63,7 @@ password=ask
ip=127.0.0.1 ip=127.0.0.1
port=-1 port=-1
xserverbpp=24 xserverbpp=24
code=10
[xrdp2] [xrdp2]
name=sesman-Xvnc name=sesman-Xvnc

@ -17,6 +17,7 @@
* *
* module manager * module manager
*/ */
#include <config_ac.h> #include <config_ac.h>
#define ACCESS #define ACCESS
#include "xrdp.h" #include "xrdp.h"
@ -148,13 +149,10 @@ xrdp_mm_send_login(struct xrdp_mm *self)
{ {
password = value; password = value;
} }
else if (g_strcasecmp(name, "lib") == 0) else if (g_strcasecmp(name, "code") == 0)
{ {
if ((g_strcasecmp(value, "libxup.so") == 0) || /* this code is either 0 for Xvnc or 10 for X11rdp */
(g_strcasecmp(value, "xup.dll") == 0)) self->code = g_atoi(value);
{
self->code = 10;
}
} }
else if (g_strcasecmp(name, "xserverbpp") == 0) else if (g_strcasecmp(name, "xserverbpp") == 0)
{ {
@ -311,8 +309,9 @@ xrdp_mm_setup_mod1(struct xrdp_mm *self)
if (self->mod_handle == 0) if (self->mod_handle == 0)
{ {
g_snprintf(text, 255, "%s/%s", XRDP_LIB_PATH, lib);
/* Let the main thread load the lib,*/ /* Let the main thread load the lib,*/
self->mod_handle = g_xrdp_sync(xrdp_mm_sync_load, (long)lib, 0); self->mod_handle = g_xrdp_sync(xrdp_mm_sync_load, (tintptr)text, 0);
if (self->mod_handle != 0) if (self->mod_handle != 0)
{ {

Loading…
Cancel
Save