Commit Graph

641 Commits (b89956d06e41321a4977dc1bea2d48e9d7619385)

Author SHA1 Message Date
metalefty b89956d06e Merge pull request #485 from proski/code-standards
Code standards
8 years ago
metalefty d335c93a75 Merge pull request #480 from proski/strncat
Fix potential buffer overflow in strncat() invocation
8 years ago
Pavel Roskin 35b336272b Fix compilation with C++ 8 years ago
Pavel Roskin 16c3bbdb8d Remove all tabs in sources 8 years ago
Pavel Roskin 92423a466e Fix potential buffer overflow in strncat() invocation
strncat() will copy at most the specified number of characters and append
the null character on top of that. strlen() doesn't count the final null
character.
8 years ago
Pavel Roskin 0d72cced46 Omit numbers from the "param" keys, they are not needed
Users assume that they need to renumber the parameters. That makes
parameter editing more involved than it needs to be.
8 years ago
metalefty 94901c9989 Merge pull request #454 from metalefty/change-chansrv-log-path
chansrv: change chansrv log path to ${XDG_DATA_HOME}/xrdp
8 years ago
Dominik George c90bc13d39
Move -logfile /dev/null option for easier commenting in debug scenarios. 8 years ago
Koichiro IWAO 7d017482f6 chansrv: change chansrv log path to ${XDG_DATA_HOME}/xrdp
like Xorg's logfile is written to ${XDG_DATA_HOME}/xorg/Xorg.n.log.

If XDG_DATA_HOME is not defined, the log path will be
${HOME}/.local/share/xrdp.
8 years ago
Pavel Roskin b28a986071 Fix memory leak in xrdp-sesman on config reload 8 years ago
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.
8 years ago
Pavel Roskin e17a56efb6 Call auth_end() exactly once in scp_v0_process()
As discovered by Valgrind, it wasn't called at all in case of a
successful session creation, which leaked memory.
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 a370306f75 Get rid of EXTRA_LIBS, use variables with more specific names 8 years ago
Pavel Roskin 5c69f3cd57 Eliminate EXTRA_FLAGS, it's a poor name, use AM_LDFLAGS 8 years ago
Pavel Roskin 0422734fc7 Merge EXTRA_DEFINES and EXTRA_INCLUDES into AM_CPPFLAGS
AM_CPPFLAGS is a documented Automake variable for C preprocessor flags
that should not be overridden when compiling the package.

There is no need to have two additional variables that are ultimately
merged into AM_CPPFLAGS.

Their names are also confusing. EXTDA_DIST is a documented Automake
variable. Everything else that starts with "EXTRA" is not.
8 years ago
Pavel Roskin 6fef1e4eb5 Use const pointers in function arguments when possible 8 years ago
Pavel Roskin c3b99de739 Fix wrong comments in sesman config printing code 8 years ago
Pavel Roskin bf08892622 Fix incorrect description of auth_userpass() return value 8 years ago
Pavel Roskin a618d4f757 Don't use final newline in log calls, it's already appended 8 years ago
Pavel Roskin 424cef464b Log malloc errors with LOG_LEVEL_ERROR 8 years ago
Pavel Roskin 945833a94f Don't close socket in scp_process_start(), the caller closes it 9 years ago
Pavel Roskin f7c27f05cf g_term_event is a wait object, not TCP socket, delete it correctly 9 years ago
Pavel Roskin 931fb90832 sesrun: remove unused g_sck and write-only g_pid 9 years ago
Pavel Roskin d605310bdc sesman: don't close listening socket in signal handler
It is closed when the main loop terminates.
9 years ago
Koichiro IWAO 9f277e4445 chansrv: pathname also should be URL decoded
because 1st argument to clipboard_get_file() is given as URL encoded.
Decoding only filename is incomplete.

Without this fix, clipboard file doesn't work in case pathname
contains non-ASCII characters or non-alphanumeric ASCII characters.
9 years ago
jsorg71 8353baab3d Merge pull request #390 from proski/june21
Cleanups and C++ compatibility
9 years ago
jsorg71 81fe939dd3 Merge pull request #388 from metalefty/freebsd/fuse
sesman: Add /sbin to PATH for FreeBSD
9 years ago
speidy f2addd346f Merge branch 'devel' of https://github.com/neutrinolabs/xrdp into devel 9 years ago
speidy c9b55e3691 sesman: env_set_user, fix potential bof issues 9 years ago
Kentaro Hayashi 8f3fb2f7c8 chansrv: avoid chansrv SEGV when xinode is NULL
When xfuse_create_file_in_xrdp_fs is failed, it returns NULL.

Without this fix, xinode->size causes SEGV, so implementation is changed
to return -1 and check the return value in caller.
9 years ago
Jay Sorg 9ccbfb6985 chansrv: added mp3 compression from Speidy 9 years ago
Pavel Roskin 2c13ef5c6d Use enum logLevels consistently for log levels 9 years ago
Pavel Roskin cbe413bd8b Fix return type of devredir_fuse_data_peek and devredir_fuse_data_dequeue 9 years ago
Pavel Roskin c5ca0332be Use cast when applying boolean OR to enum 9 years ago
Pavel Roskin d1efb0d5ba Fix signed to unsigned comparisons reported by g++ 6.1.0 9 years ago
Pavel Roskin 5829323ad8 Use g_new or g_new0 when C++ compiler would complain about implicit cast 9 years ago
Pavel Roskin bde4925f0e Cast appdata_ptr explicitly, needed for C++ compatibility 9 years ago
Pavel Roskin 4b05bb2ebd Mark g_drdynvc_chan_id as extern in g_drdynvc_chan_id, it's in chansrv.c 9 years ago
Pavel Roskin aaa89ad4e6 Use const unsigned for hex arrays
Some constants are too big for the signed type.
9 years ago
Pavel Roskin aeeb3d2c2e Fix warnings detected by -Wwrite-strings 9 years ago
Pavel Roskin 951e632757 Make program_name constant, don't duplicate or free it 9 years ago
Pavel Roskin b00ca6e03d Remove commented out config_read_logging(), the code is long dead 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 f7ef9bb938 Fix scp_init() invocation, it takes no arguments 9 years ago
Pavel Roskin 77b380c0b5 Fix format warnings in log_message() calls 9 years ago
Pavel Roskin be1d034f91 Report pid and listening address/port for xrdp and xrdp-sesman
For xrdp-sesman, don't report that the daemon is listening to a port if
it fails to attach to that port. Don't use LOG_LEVEL_ALWAYS for startup
message, it's not a critical error.
9 years ago
Pavel Roskin a77ae440a7 Rename SESMAN_CFG_X11DISPLAYOFFSET to SESMAN_CFG_SESS_X11DISPLAYOFFSET
Move it to other session options in config.h. X11DisplayOffset is part of
the [Sessions] section.
9 years ago
Pavel Roskin ae5bb5bf9c Fix incorrect use of "it's" and "its", adjust wording 9 years ago