diff --git a/xrdp-0.9.10-scripts-libexec.patch b/xrdp-0.9.10-scripts-libexec.patch new file mode 100644 index 0000000..dbf60e3 --- /dev/null +++ b/xrdp-0.9.10-scripts-libexec.patch @@ -0,0 +1,37 @@ +diff -ruN xrdp-0.9.10-v/sesman/config.c xrdp-0.9.10/sesman/config.c +--- xrdp-0.9.10-v/sesman/config.c 2019-04-18 15:38:26.000000000 +1000 ++++ xrdp-0.9.10/sesman/config.c 2019-05-03 07:59:36.784643398 +1000 +@@ -179,13 +179,13 @@ + g_free(cf->default_wm); + cf->default_wm = g_strdup("startwm.sh"); + } +- /* if default_wm doesn't begin with '/', it's a relative path to XRDP_CFG_PATH */ ++ /* if default_wm doesn't begin with '/', it's a relative path to /usr/libexec/xrdp */ + if (cf->default_wm[0] != '/') + { + /* sizeof operator returns string length including null terminator */ +- length = sizeof(XRDP_CFG_PATH) + g_strlen(cf->default_wm) + 1; /* '/' */ ++ length = sizeof(/usr/libexec/xrdp) + g_strlen(cf->default_wm) + 1; /* '/' */ + buf = (char *)g_malloc(length, 0); +- g_sprintf(buf, "%s/%s", XRDP_CFG_PATH, cf->default_wm); ++ g_sprintf(buf, "%s/%s", /usr/libexec/xrdp, cf->default_wm); + g_free(cf->default_wm); + cf->default_wm = g_strdup(buf); + g_free(buf); +@@ -200,13 +200,13 @@ + g_free(cf->reconnect_sh); + cf->reconnect_sh = g_strdup("reconnectwm.sh"); + } +- /* if reconnect_sh doesn't begin with '/', it's a relative path to XRDP_CFG_PATH */ ++ /* if reconnect_sh doesn't begin with '/', it's a relative path to /usr/libexec/xrdp */ + if (cf->reconnect_sh[0] != '/') + { + /* sizeof operator returns string length including null terminator */ +- length = sizeof(XRDP_CFG_PATH) + g_strlen(cf->reconnect_sh) + 1; /* '/' */ ++ length = sizeof(/usr/libexec/xrdp) + g_strlen(cf->reconnect_sh) + 1; /* '/' */ + buf = (char *)g_malloc(length, 0); +- g_sprintf(buf, "%s/%s", XRDP_CFG_PATH, cf->reconnect_sh); ++ g_sprintf(buf, "%s/%s", /usr/libexec/xrdp, cf->reconnect_sh); + g_free(cf->reconnect_sh); + cf->reconnect_sh = g_strdup(buf); + g_free(buf); diff --git a/xrdp-0.9.7-scripts-libexec.patch b/xrdp-0.9.7-scripts-libexec.patch deleted file mode 100644 index c15549b..0000000 --- a/xrdp-0.9.7-scripts-libexec.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -ruN xrdp-0.9.7-v/sesman/config.c xrdp-0.9.7/sesman/config.c ---- xrdp-0.9.7-v/sesman/config.c 2018-06-29 18:06:27.000000000 +1000 -+++ xrdp-0.9.7/sesman/config.c 2018-07-04 16:21:43.009286795 +1000 -@@ -181,13 +181,13 @@ - g_free(cf->default_wm); - cf->default_wm = g_strdup("startwm.sh"); - } -- /* if default_wm doesn't begin with '/', it's a relative path to XRDP_CFG_PATH */ -+ /* if default_wm doesn't begin with '/', it's a relative path to /usr/libexec/xrdp */ - if (cf->default_wm[0] != '/') - { - /* sizeof operator returns string length including null terminator */ -- length = sizeof(XRDP_CFG_PATH) + g_strlen(g_cfg->default_wm) + 1; /* '/' */ -+ length = sizeof("/usr/libexec/xrdp") + g_strlen(g_cfg->default_wm) + 1; /* '/' */ - buf = (char *)g_malloc(length, 0); -- g_sprintf(buf, "%s/%s", XRDP_CFG_PATH, g_cfg->default_wm); -+ g_sprintf(buf, "%s/%s", "/usr/libexec/xrdp", g_cfg->default_wm); - g_free(g_cfg->default_wm); - g_cfg->default_wm = g_strdup(buf); - g_free(buf); -@@ -202,13 +202,13 @@ - g_free(cf->reconnect_sh); - cf->reconnect_sh = g_strdup("reconnectwm.sh"); - } -- /* if reconnect_sh doesn't begin with '/', it's a relative path to XRDP_CFG_PATH */ -+ /* if reconnect_sh doesn't begin with '/', it's a relative path to /usr/libexec/xrdp */ - if (cf->reconnect_sh[0] != '/') - { - /* sizeof operator returns string length including null terminator */ -- length = sizeof(XRDP_CFG_PATH) + g_strlen(g_cfg->reconnect_sh) + 1; /* '/' */ -+ length = sizeof("/usr/libexec/xrdp") + g_strlen(g_cfg->reconnect_sh) + 1; /* '/' */ - buf = (char *)g_malloc(length, 0); -- g_sprintf(buf, "%s/%s", XRDP_CFG_PATH, g_cfg->reconnect_sh); -+ g_sprintf(buf, "%s/%s", "/usr/libexec/xrdp", g_cfg->reconnect_sh); - g_free(g_cfg->reconnect_sh); - g_cfg->reconnect_sh = g_strdup(buf); - g_free(buf); diff --git a/xrdp.spec b/xrdp.spec index 80337c5..f8c5e58 100644 --- a/xrdp.spec +++ b/xrdp.spec @@ -21,7 +21,7 @@ Patch0: xrdp-0.9.9-sesman.patch Patch1: xrdp-0.9.9-xrdp-ini.patch Patch2: xrdp-0.9.4-service.patch Patch3: xrdp-0.9.2-setpriv.patch -Patch4: xrdp-0.9.7-scripts-libexec.patch +Patch4: xrdp-0.9.10-scripts-libexec.patch Patch5: xrdp-0.9.6-script-interpreter.patch BuildRequires: gcc