Commit Graph

79 Commits (b17c45d86fc2f22fcff8cb9adf31080738edd37a)

Author SHA1 Message Date
Dominik George 3244cb59d5 Fix memory corruption introduced by CVE-2017-16927 fix. 7 years ago
speidy d958d1f018 sesman: scpv0, accept variable length data fields 7 years ago
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.
8 years ago
Pavel Roskin 6ed4c969f4 Eliminate APP_CC and DEFAULT_CC 8 years ago
Pavel Roskin 30a7a947b1 Don't include config_ac.h from any header files 8 years ago
Pavel Roskin b2d3dcf169 Include config_ac.h from all source files 8 years ago
Pavel Roskin f1a521204a Remove redundant function declarations 8 years ago
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".
8 years ago
volth 26a26ef906 fix build with --enable-xrdpdebug=yes 8 years ago
volth 37b4a14b54 fix build with --enable-xrdpdebug=yes 8 years ago
Jay Sorg 57905d71ad vnc: change password file to use guid hash 8 years ago
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.
8 years ago
Pavel Roskin 424cef464b Log malloc errors with LOG_LEVEL_ERROR 8 years ago
Pavel Roskin 5829323ad8 Use g_new or g_new0 when C++ compiler would complain about implicit cast 9 years ago
Pavel Roskin aeeb3d2c2e Fix warnings detected by -Wwrite-strings 9 years ago
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.
9 years ago
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.
9 years ago
Pavel Roskin ca9cbcafc8 Typo fixes 9 years ago
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.
9 years ago
Jay Sorg a6cba63a89 fix a warning 9 years ago
Pavel Roskin 59a5fb0ddb Move headers from EXTRA_DIST to sources, sort alphabetically
There should be no functional difference.
9 years ago
Pavel Roskin 92a6833e9b Fix typos 9 years ago
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.
9 years ago
Jay Sorg ac901fd283 sesman: add missing break 9 years ago
Itamar Reis Peixoto 09a69fbec2 remove duplicated call to scp_session_set_bpp 9 years ago
Pavel Roskin a61349c1d3 Allow sessions with 32 bpp 9 years ago
Pavel Roskin 5d23d007e9 Check return value of scp_session_set_bpp() 9 years ago
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.
9 years ago
Pavel Roskin 02c981e796 More spelling fixes found by codespell and aspell 9 years ago
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.
9 years ago
Laxmikant Rashinkar e4654b57ca coverity: Resource leak (2nd round) 11 years ago
Laxmikant Rashinkar 0915d33d70 coverity: dead code 11 years ago
Laxmikant Rashinkar 3bb31876e7 coverity: fixed resolution leak issues 11 years ago
Jay Sorg 49fcc23673 sesman: added SessionVariables to sesman.ini and some indent cleanup 11 years ago
Laxmikant Rashinkar 883650700f added support for using Xorg driver model 11 years ago
Jay Sorg b4ce83a685 ipv6 fix for sesman 12 years ago
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
13 years ago
Jay Sorg 58f5dcc030 autotools: change top_srcdir to top_builddir for LIBADD 13 years ago
Jay Sorg 0944509cf0 sesman: missing else and remove some EOL whitespace 13 years ago
norrarvid 318e09fd47 fix merge conflics 13 years ago
Jay Sorg 856783ba95 no logic changes, remove warnings and coding style changes 13 years ago
norrarvid 42edcbb6c1 Improved logging 13 years ago
norrarvid eef475e025 timeout added for the reply to come from sesman 13 years ago
norrarvid 10fdc5c17f separate pam authentication for gateways 13 years ago
norrarvid 4d4ebbf363 Initial syslog support in XRDP 13 years ago
Jay Sorg 0392b0167a autotool fixes 14 years ago
Itamar Reis Peixoto 6b08b8b71e include missing files in make dist 14 years ago
Nicola Ruggero d797b2cf49 Implemented client IP logging 14 years ago
Nicola Ruggero 4cf06dbbcb Major code cleanup:
- Initialized and zeroed out local variables
- Check for some null pointers
- Fixed some typos
- Other minor changes (beautify, etc.)
14 years ago
jsorg71 d83ebaa97a use do ... while (0) style for parse.h 15 years ago