From e6b7d12191200fec68fed07f61c54e44bc69d4f5 Mon Sep 17 00:00:00 2001 From: Koichiro IWAO Date: Thu, 17 Aug 2017 15:31:23 +0900 Subject: [PATCH] xrdp: accept full path for ls_background_image because ls_logo_filename accepts full path. --- xrdp/xrdp_login_wnd.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xrdp/xrdp_login_wnd.c b/xrdp/xrdp_login_wnd.c index a1e2380b..262f1bbb 100644 --- a/xrdp/xrdp_login_wnd.c +++ b/xrdp/xrdp_login_wnd.c @@ -729,7 +729,15 @@ xrdp_login_wnd_create(struct xrdp_wm *self) { char fileName[256] ; but = xrdp_bitmap_create(4, 4, self->screen->bpp, WND_TYPE_IMAGE, self); - g_snprintf(fileName, 255, "%s/%s", XRDP_SHARE_PATH, globals->ls_background_image); + if (globals->ls_background_image[0] == '/') + { + g_snprintf(fileName, 255, "%s", globals->ls_background_image); + } + else + { + g_snprintf(fileName, 255, "%s/%s", + XRDP_SHARE_PATH, globals->ls_background_image); + } log_message(LOG_LEVEL_DEBUG, "We try to load the following background file: %s", fileName); xrdp_bitmap_load(but, fileName, self->palette); but->parent = self->screen;