Package: xrdp
Severity: normal
Tags: patch
Hi,
on Debian systems there is no /usr/X11R6/bin so this should not be
added to PATH. Moreover the sequence of directories is reverse on
a default Debian system. The attached quilt patch fixes this.
Kind regards
Andreas.
-- System Information:
Debian Release: 8.2
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Author: Andreas Tille <[email protected]>
Last-Update: Fri, 11 Sep 2015 15:16:35 +0200
Description: Do not add /usr/X11R6/bin to PATH that does not exist
on Debian systems.
Rather use the path that is delivered in /etc/profile in a default
installation.
:
Remark: The best solution would probably to actually *execute*
/etc/profile to profit from any local user settings on the machine
but this is disputable and goes beyond a fix of the bug to remove
/usr/X11R6/bin from PATH
--- a/sesman/env.c
+++ b/sesman/env.c
@@ -90,7 +90,7 @@ env_set_user(char* username, char* passw
{
g_clearenv();
g_setenv("SHELL", pw_shell, 1);
- g_setenv("PATH", "/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin", 1);
+ g_setenv("PATH", "/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games", 1);
g_setenv("USER", username, 1);
g_sprintf(text, "%d", uid);
g_setenv("UID", text, 1);