From 5d22453f7aa68be5259fd19eb87495514c9583b7 Mon Sep 17 00:00:00 2001 From: Bojan Smojver Date: Tue, 29 Dec 2020 10:34:06 +1100 Subject: [PATCH] Adjust setpriv patch for 0.9.15. --- ...-setpriv.patch => xrdp-0.9.15-setpriv.patch | 18 +++++++++--------- xrdp.spec | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) rename xrdp-0.9.2-setpriv.patch => xrdp-0.9.15-setpriv.patch (78%) diff --git a/xrdp-0.9.2-setpriv.patch b/xrdp-0.9.15-setpriv.patch similarity index 78% rename from xrdp-0.9.2-setpriv.patch rename to xrdp-0.9.15-setpriv.patch index 64ad9bc..fa7829f 100644 --- a/xrdp-0.9.2-setpriv.patch +++ b/xrdp-0.9.15-setpriv.patch @@ -1,6 +1,6 @@ -diff -ruN xrdp-0.9.2-vanilla/sesman/session.c xrdp-0.9.2/sesman/session.c ---- xrdp-0.9.2-vanilla/sesman/session.c 2017-03-30 17:18:55.000000000 +1100 -+++ xrdp-0.9.2/sesman/session.c 2017-04-08 15:51:58.738246971 +1000 +diff -ruN xrdp-0.9.15-v/sesman/session.c xrdp-0.9.15/sesman/session.c +--- xrdp-0.9.15-v/sesman/session.c 2020-12-29 01:03:43.000000000 +1100 ++++ xrdp-0.9.15/sesman/session.c 2020-12-29 10:31:37.895699198 +1100 @@ -33,10 +33,6 @@ #include "config_ac.h" #endif @@ -12,7 +12,7 @@ diff -ruN xrdp-0.9.2-vanilla/sesman/session.c xrdp-0.9.2/sesman/session.c #include "sesman.h" #include "libscp_types.h" #include "xauth.h" -@@ -641,20 +637,7 @@ +@@ -668,20 +664,7 @@ if (type == SESMAN_SESSION_TYPE_XORG) { @@ -25,16 +25,16 @@ diff -ruN xrdp-0.9.2-vanilla/sesman/session.c xrdp-0.9.2/sesman/session.c - */ - if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) < 0) - { -- log_message(LOG_LEVEL_WARNING, -- "Failed to disable setuid on X server: %s", -- g_get_strerror()); +- LOG(LOG_LEVEL_WARNING, +- "Failed to disable setuid on X server: %s", +- g_get_strerror()); - } -#endif + char *setpriv = g_strdup("setpriv"); xserver_params = list_create(); xserver_params->auto_free = 1; -@@ -663,6 +646,8 @@ +@@ -690,6 +673,8 @@ xserver = g_strdup((const char *)list_get_item(g_cfg->xorg_params, 0)); /* these are the must have parameters */ @@ -43,7 +43,7 @@ diff -ruN xrdp-0.9.2-vanilla/sesman/session.c xrdp-0.9.2/sesman/session.c list_add_item(xserver_params, (tintptr) g_strdup(xserver)); list_add_item(xserver_params, (tintptr) g_strdup(screen)); list_add_item(xserver_params, (tintptr) g_strdup("-auth")); -@@ -686,7 +671,7 @@ +@@ -713,7 +698,7 @@ g_setenv("XRDP_START_HEIGHT", geometry, 1); /* fire up Xorg */ diff --git a/xrdp.spec b/xrdp.spec index 46f3d93..cbe92e6 100644 --- a/xrdp.spec +++ b/xrdp.spec @@ -27,7 +27,7 @@ Source7: xrdp-polkit-1.rules Patch0: xrdp-0.9.9-sesman.patch Patch1: xrdp-0.9.14-xrdp-ini.patch Patch2: xrdp-0.9.4-service.patch -Patch3: xrdp-0.9.2-setpriv.patch +Patch3: xrdp-0.9.15-setpriv.patch Patch4: xrdp-0.9.10-scripts-libexec.patch Patch5: xrdp-0.9.6-script-interpreter.patch Patch6: xrdp-0.9.14-log-snprintf.patch