Commit Graph

97 Commits

Author SHA1 Message Date
Koichiro IWAO
35bc7c1d65 sesman: unbreak FreeBSD build after #523 2016-12-09 10:35:21 +09:00
Pavel Roskin
04414e0fd4 Disable privilege elevation by setuid for the X server 2016-12-06 15:09:52 -08:00
Jay Sorg
f14e3dc8ac sesman: must save guid in session data 2016-12-04 17:20:01 -08:00
Jay Sorg
9a517b34f0 vnc: code cleanup 2016-12-04 15:39:10 -08:00
Jay Sorg
57905d71ad vnc: change password file to use guid hash 2016-12-03 23:12:48 -08:00
Pavel Roskin
dc60a80b86 Memory leak fix: keep X server path in the parameter list
g_cfg->xorg_params, g_cfg->vnc_params and g_cfg->rdp_params don't have
auto_free enabled, so removing an item from one of those lists won't free
its contents.

It's better not to change those lists, as they represent the actual
config file and could be reused. Instead, omit the 0th parameter (the
executable path) from copying to xserver_params.

Found by Valgrind.
2016-10-21 20:15:50 +00:00
Pavel Roskin
6fef1e4eb5 Use const pointers in function arguments when possible 2016-10-17 08:54:07 -07:00
Pavel Roskin
f7c27f05cf g_term_event is a wait object, not TCP socket, delete it correctly 2016-09-08 20:26:19 -07:00
jsorg71
8353baab3d Merge pull request #390 from proski/june21
Cleanups and C++ compatibility
2016-08-05 14:38:41 -07:00
speidy
c9b55e3691 sesman: env_set_user, fix potential bof issues 2016-07-22 04:48:37 -04:00
Pavel Roskin
c5ca0332be Use cast when applying boolean OR to enum 2016-07-08 04:29:51 +00:00
Pavel Roskin
5829323ad8 Use g_new or g_new0 when C++ compiler would complain about implicit cast 2016-07-08 04:29:49 +00:00
Pavel Roskin
77b380c0b5 Fix format warnings in log_message() calls 2016-06-21 16:30:16 -07:00
Pavel Roskin
95e1603f9d Fix recently introduced warnings in session.c
Use of tabs is fixed as well.
2016-04-21 23:03:40 -07:00
Koichiro IWAO
cf2b629462 sesman: do not hardcode Xorg/X11rdp/Xvnc executables
In RHEL and its clones, /usr/bin/Xorg is set suid-root. To execute
Xorg with user privileges, /etc/pam.d/xserver needs be edited [1],
or suid bit of Xorg binary needs to be dropped.

In order to keep Xorg and /etc/pam.d/xserver untouched, preparing
non-suid version of Xorg as /usr/bin/Xorg.non-suid for example is
the simplest solution. However, Xorg.non-suid cannot be executed
since it is hardcoded to execute Xorg in sesman.

This change makes more flexible to execute Xorg with non-standard
name or not in PATH environment variable.

[1] https://www.centos.org/forums/viewtopic.php?t=21185
2016-04-07 18:34:43 +09:00
Jay Sorg
689ffe79d9 fix warnings, move some calls to os_calls 2016-03-16 14:32:14 -07:00
Pavel Roskin
92a6833e9b Fix typos 2016-02-13 20:41:07 -08:00
Pavel Roskin
fe055e989a Fix connection month display in xrdp-sesadmin
tm_mon in `struct tm` uses 0 for January.

`struct session_data` and `struct SCP_DISCONNECTED_SESSION` don't specify
how dates are stored. But considering the code in sestest and sesadmin,
all date components are stored as displayed.
2016-02-13 18:31:47 -08:00
Jay Sorg
4e0d0f3ba0 sesman: remove the thread 2015-12-11 20:41:17 -08:00
Jan Losinski
844f01b937 Simplify session match logic.
The session match logic had two versions - one for the
SESMAN_SESSION_TYPE_XRDP and SESMAN_SESSION_TYPE_XORG sessions and one
for every other type. The only difference was, that different display
sizes where ignored when searching for sessions to reconnect if the
policy does not have the SESMAN_CFG_SESS_POLICY_D flag set and the type
is SESMAN_SESSION_TYPE_XRDP or SESMAN_SESSION_TYPE_XORG.

The reason was that xvnc cannot resize and the others can do. This two
versions where not necessary because we set the
SESMAN_CFG_SESS_POLICY_D flag every time we have a xvnc session a few
lines above. So the two branches for the different types can be reduced
to one.

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
2015-10-25 23:25:19 +01:00
Jay Sorg
7889ee638e sesman: close sync and term sockets after fork 2015-09-27 01:26:22 -07:00
Blindauer Emmanuel
12092e8098 Allow to reconnect with a different size while using the Xorg module 2015-08-19 07:42:00 +02:00
Jay Sorg
870437ac42 sesman: don't use hard code path for Xorg 2015-08-03 19:08:15 -07:00
Koichiro IWAO
67ff276d4d sesman: add copyright noice for code from OpenSSH 2015-06-16 06:10:30 +00:00
Koichiro IWAO
481653e5f3 sesman: merge FreeBSD local patch for session.c
net/xrdp: effective login name is not set by xrdp-sesman
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=157282
2015-06-16 05:44:07 +00:00
Jay Sorg
942cdf300e sesman: avoid creation of .vnc directory if not vnc session 2014-11-11 20:06:04 -08:00
Jay Sorg
253f6ff555 sesman: only check vnc auth file if vnc session 2014-11-11 02:12:56 -08:00
Jay Sorg
748b48d870 sesman: more checks when looking for a free display 2014-08-06 13:33:12 -07:00
Laxmikant Rashinkar
27055d5762 coverity: improper use of negative value 2014-07-26 13:33:23 -07:00
Laxmikant Rashinkar
3bb31876e7 coverity: fixed resolution leak issues 2014-07-19 11:56:00 -07:00
Jay Sorg
49fcc23673 sesman: added SessionVariables to sesman.ini and some indent cleanup 2014-05-09 16:02:19 -07:00
speidy
e17d2375ea Merge branch 'master' of https://github.com/neutrinolabs/xrdp into devel 2014-04-22 04:23:49 +03:00
Jay Sorg
1934c9ea00 sesman: more options for session lookup from Fredy Paquet 2014-04-20 00:42:19 -07:00
jsorg71
4f4a7a8c8c Merge pull request #102 from bartw72/lock-on-add
Set lock when adding new displays to the chain
2014-04-17 22:07:50 -07:00
speidy
5f7a4b46fb sesman: indentation fix 2014-03-22 16:07:06 +02:00
speidy
8566230442 sesman: do reconnect to an exisitng Xorg session 2014-03-22 13:36:33 +02:00
Laxmikant Rashinkar
883650700f added support for using Xorg driver model 2014-03-08 16:41:37 -08:00
Laxmikant Rashinkar
221b049ca5 clean up temp files in /tmp/.xrdp 2014-02-24 19:49:10 -08:00
Bart Warmerdam
6318d8ef0f Set lock when adding new displays to the chain 2013-12-16 13:52:50 +01:00
Jay Sorg
538763e144 sesman: Fedora bug 821569 2013-10-01 10:42:00 -07:00
Jay Sorg
069838f355 hook up the kill disconnect timeout to the sesman config file 2013-08-24 17:57:00 -07:00
Jay Sorg
c6fa03102f copyright year update 2013-06-08 10:51:53 -07:00
Jay Sorg
62a4403dd4 sesman: cleanup, close xrdp to sesman socket listener when starting a session / forking 2013-05-28 11:54:44 -07:00
Jay Sorg
75f4c3ca58 sesman: cleanup, close xrdp to sesman socket when starting a session / forking 2013-05-28 10:44:04 -07:00
Laxmikant Rashinkar
1123323fda o moved from GNU General Public License to Apache License, Version 2.0
o applied new coding standards to all .c files
o moved some files around
2012-09-19 20:51:34 -07:00
Jay Sorg
10e283ed16 sesman: run sessvc and chansrv as user, not root 2012-07-22 22:48:38 -07:00
Jay Sorg
d8b8ca93b0 sesman: exit after fork if reconnectwm.sh does not exist 2012-07-16 13:25:34 -07:00
Jay Sorg
a246fd582d sesman: added option to run reconnectwm.sh on session reconnect 2012-07-16 13:20:26 -07:00
Jay Sorg
856783ba95 no logic changes, remove warnings and coding style changes 2012-06-10 23:47:08 -07:00
norrarvid
4d4ebbf363 Initial syslog support in XRDP 2012-05-27 17:17:39 +02:00