Include <fuse_lowlevel.h>, not <fuse/fuse_lowlevel.h>, the include path
should be set up for that.
Don't define _FILE_OFFSET_BITS in one file, FUSE_CFLAGS would enable it
for the whole xrdp-chansrv build if needed.
Include string.h for strcmp(). Don't define _XOPEN_SOURCE, it conflicts
with libc headers and hides putpwent(). Make input strings constant. Fix
functions to match their declarations.
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.
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.
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.
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.
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.
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.