Commit Graph

85 Commits

Author SHA1 Message Date
Alexandre Quesnel
0c61a15fc5 Migrating logging to LOG() and LOG_DEVEL() in sesman/* 2020-11-30 00:36:20 +00:00
Alexandre Quesnel
a9ec1ebd99 Unifying logging in chanserv
This commit adds:
* replace multiple logging macros with LOG and LOG_DEVEL
* logging configuration for chanserv
* logging configuration for console output
* logging configuration for per file or method log level filtering for
debug builds
* file, line, and method name in log message for debug builds
2020-10-19 05:10:47 +00:00
matt335672
7384f6e574 Fixed CVE-2020-4044 CI errors 2020-06-29 11:38:24 +01:00
matt335672
e593f58a82 Fix for CVE-2020-4044
Reported by: Ashley Newson
2020-06-26 20:06:02 +09:00
4680414@qq.com
e655fe6a1b libscp v1 server set height twice,and not set width. so fix it. 2019-02-15 09:18:37 +08:00
Koichiro IWAO
e16029cbc2
fix leak of SCP_DISCONNECTED_SESSION
Pointed out by: #919
2018-01-23 11:16:26 +09:00
Dominik George
3244cb59d5 Fix memory corruption introduced by CVE-2017-16927 fix. 2017-12-21 14:07:51 +09:00
speidy
d958d1f018 sesman: scpv0, accept variable length data fields 2017-11-28 09:04:25 +09:00
Ben Cohen
c7d08bd9e7 xrdp-sesadmin: fix error when there are no sessions
Test case:  On a system running xrdp with no sessions running run:

  xrdp-sesadmin -u=<user> -p=<password> -c=list

Expected result: "No sessions." (ignoring debug output)
Observed result: "Error getting session list."

In the SCP_SERVER_STATE_MNG_LISTREQ case in scp_v1_mng_process() if
there are no sessions it ends the scp session, which causes an error in
the client.  In commit 0017081d the client was changed to report errors,
giving the result above.

Fix by calling scp_v1s_mng_list_sessions() from scp_v1_mng_process()
even when there are no sessions, and if so sending a packet with a count
of zero so that the client gets what it expects.
2017-07-06 13:40:25 +09:00
Pavel Roskin
6ed4c969f4 Eliminate APP_CC and DEFAULT_CC 2017-03-14 00:21:48 -07:00
Pavel Roskin
30a7a947b1 Don't include config_ac.h from any header files 2017-03-04 00:52:34 -08:00
Pavel Roskin
b2d3dcf169 Include config_ac.h from all source files 2017-03-04 00:52:34 -08:00
Pavel Roskin
f1a521204a Remove redundant function declarations 2017-01-11 23:25:42 -08:00
Pavel Roskin
6664aac00f Use "void" for empty argument list in declarations
In C, an empty argument list in a declaration means that the function
can accept any arguments. Use "void" instead, it means "no arguments".

C++ treats void and empty list as "no arguments".
2017-01-05 17:27:20 -08:00
volth
26a26ef906 fix build with --enable-xrdpdebug=yes 2017-01-04 19:20:44 +00:00
volth
37b4a14b54 fix build with --enable-xrdpdebug=yes 2017-01-04 13:00:01 +00:00
Jay Sorg
57905d71ad vnc: change password file to use guid hash 2016-12-03 23:12:48 -08:00
Pavel Roskin
65ac8e758b Fix memory leak: free session data
Call scp_session_destroy() in the functions that call
scp_session_create() and nowhere else.

As found by Valgrind, the session data is not freed if the session is
created successfully.
2016-10-21 20:15:50 +00:00
Pavel Roskin
424cef464b Log malloc errors with LOG_LEVEL_ERROR 2016-10-17 08:38:22 -07: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
aeeb3d2c2e Fix warnings detected by -Wwrite-strings 2016-07-08 04:29:42 +00:00
Pavel Roskin
1ded8ec437 Remove unused string support in scp_session_set_addr()
Using the same argument for binary and text data is not a good idea. If
string support is ever needed, it should be a separate function.

Remove SCP_ADDRESS_TYPE_IPV4_BIN and SCP_ADDRESS_TYPE_IPV6_BIN, use
SCP_ADDRESS_TYPE_IPV4 and SCP_ADDRESS_TYPE_IPV6, which simplifies the
code.
2016-07-08 04:15:41 +00:00
Pavel Roskin
f908528a00 Downgrade "libscp initialized" to LOG_LEVEL_DEBUG, remove line number
It's a bad style to start the log with a cryptic warning.
2016-07-08 04:15:39 +00:00
Pavel Roskin
ca9cbcafc8 Typo fixes 2016-05-04 23:33:30 -07:00
Pavel Roskin
f93074a430 Add unnamed semaphore support on Mac OS
sem_init() is not functional on Mac OS. Use the Grand Central Dispatch
implementation.

Make libscp_lock.c use semaphores through the thread_calls wrapper.
2016-04-23 00:26:46 -07:00
Jay Sorg
a6cba63a89 fix a warning 2016-03-16 14:40:24 -07:00
Pavel Roskin
59a5fb0ddb Move headers from EXTRA_DIST to sources, sort alphabetically
There should be no functional difference.
2016-02-21 23:06:48 -08:00
Pavel Roskin
92a6833e9b Fix typos 2016-02-13 20:41:07 -08:00
Pavel Roskin
dcab7552db Stop redefining libdir, use moduledir for ${libdir}/xrdp
libdir is for shared and static libraries. Some xrdp libraries are loaded
dynamically from a non-standard directory, so they are used like modules.

Having separate libdir and moduledir would eventually allow to separate
dynamically loaded modules from shared libraries.
2016-02-12 23:52:46 -08:00
Jay Sorg
ac901fd283 sesman: add missing break 2016-02-11 17:52:44 -08:00
Itamar Reis Peixoto
09a69fbec2 remove duplicated call to scp_session_set_bpp 2016-02-11 11:54:43 -02:00
Pavel Roskin
a61349c1d3 Allow sessions with 32 bpp 2016-02-10 09:30:23 -08:00
Pavel Roskin
5d23d007e9 Check return value of scp_session_set_bpp() 2016-02-10 09:30:23 -08:00
Pavel Roskin
5de1d31a75 Change an unconditional #warning to a comment
Notes about software design should not be shown as warnings to everybody
who compiles the code. Warnings should be about unexpected conditions
detected at the compile time.
2016-01-31 23:42:16 -08:00
Pavel Roskin
02c981e796 More spelling fixes found by codespell and aspell 2016-01-30 17:39:25 -08:00
Pavel Roskin
a452d8d36a Merge AM_CFLAGS and INCLUDES info AM_CPPFLAGS
AM_CPPFLAGS is for flags passed to the preprocessor, such as defines and
includes. AM_CFLAGS is for flags affecting the compiler, such as debug
and optimization settings.

INCLUDES is an obsolete name. Users can pass INCLUDES and break
compilation. AM_CPPFLAGS is more explicit that the flags come from
Automake and should not be overridden.
2016-01-29 22:45:00 -08:00
Laxmikant Rashinkar
e4654b57ca coverity: Resource leak (2nd round) 2014-07-27 15:29:12 -07:00
Laxmikant Rashinkar
0915d33d70 coverity: dead code 2014-07-26 15:06:35 -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
Laxmikant Rashinkar
883650700f added support for using Xorg driver model 2014-03-08 16:41:37 -08:00
Jay Sorg
b4ce83a685 ipv6 fix for sesman 2013-04-03 20:49:01 -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
58f5dcc030 autotools: change top_srcdir to top_builddir for LIBADD 2012-07-13 16:18:02 -07:00
Jay Sorg
0944509cf0 sesman: missing else and remove some EOL whitespace 2012-06-23 15:35:27 -07:00
norrarvid
318e09fd47 fix merge conflics 2012-06-18 10:23:09 +02:00
Jay Sorg
856783ba95 no logic changes, remove warnings and coding style changes 2012-06-10 23:47:08 -07:00
norrarvid
42edcbb6c1 Improved logging 2012-06-07 13:46:44 +02:00
norrarvid
eef475e025 timeout added for the reply to come from sesman 2012-06-05 08:08:04 +02:00
norrarvid
10fdc5c17f separate pam authentication for gateways 2012-05-31 16:57:17 +02:00