Commit Graph

590 Commits

Author SHA1 Message Date
Pavel Roskin
1403652c72 Remove unused variable in devredir_cvt_from_unicode_len() 2016-05-06 18:58:16 -07:00
Pavel Roskin
f2d326cbed Remove unused variables from dev_redir_proc_query_dir_response() 2016-05-06 18:58:16 -07:00
Pavel Roskin
0dd0426e6f Check XGetWindowProperty() return code in clipboard_event_property_notify() 2016-05-06 18:31:03 -07:00
Pavel Roskin
72019d3611 Use better symbols to protect include files 2016-05-05 00:06:26 -07:00
Pavel Roskin
ca9cbcafc8 Typo fixes 2016-05-04 23:33:30 -07:00
jsorg71
fdb146740f Merge pull request #360 from proski/format-warnings
Warning fixes
2016-05-03 00:52:58 -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
Pavel Roskin
70f3d4c5e2 Fix warnings for unused variables read from byte streams 2016-04-23 00:18:38 -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
Pavel Roskin
0629b25d5f Fix warnings about unused variables and functions 2016-04-21 22:27:27 -07:00
Pavel Roskin
e65bd6b7d7 Fix more format warnings 2016-04-21 21:21:17 -07:00
jsorg71
00a11f77ce Merge pull request #359 from metalefty/sesman/configurable-xserver-path
sesman: do not hardcode Xorg/X11rdp/Xvnc executables
2016-04-18 13:29:15 -07:00
Koichiro IWAO
cfdce461c3 Do not attempt to trap SIGKILL part 2
it doesn't work on any OS.
2016-04-11 16:43:12 +09: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
Koichiro IWAO
fb08623b66 sesman: brief xorg_params, no logic change 2016-04-07 16:27:23 +09:00
NerdKnight
99ebe1340f Fix compile error "format not a string literal and no format arguments [-Werror=format-security]" 2016-03-28 14:55:20 -03:00
Jay Sorg
a6cba63a89 fix a warning 2016-03-16 14:40:24 -07:00
Jay Sorg
689ffe79d9 fix warnings, move some calls to os_calls 2016-03-16 14:32:14 -07:00
Jay Sorg
38241f2a0b Fix all format warnings and some unused variable warnings 2016-03-14 17:04:08 -07:00
Jay Sorg
7393579205 Don't attempt to intercept SIGKILL, it doesn't work on any OS 2016-03-14 16:33:49 -07:00
Itamar Reis Peixoto
cfbb00c6cb Merge pull request #333 from proski/key-install
Key install (generate rsakeys.ini during make install)
2016-02-24 06:38:02 -05:00
jsorg71
f53b3bb737 Merge pull request #326 from metalefty/pulseaudio-6.0
pulse: fix build pulseaudio 6.0 or higher
2016-02-23 23:19:59 -08:00
Pavel Roskin
22e6f3e2f7 Use SCRIPTS for executable scripts, don't use "chmod 755" 2016-02-22 23:13:16 -08:00
Pavel Roskin
7642675ddf Use "dist_" prefix to minimize use of EXTRA_DIST
"dist" is ignored in presense of "noinst", so keep noinst_man_MANS.
2016-02-22 22:11:57 -08: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
Koichiro IWAO
93f7bcb71b pulse: fix build pulseaudio 6.0 or higher
Discovered in #321.  The number of argument for pa_rtpoll_run have
been changed since 6.0.

>=6.0 : int pa_rtpoll_run(pa_rtpoll *f);
<6.0  : int pa_rtpoll_run(pa_rtpoll *f, bool wait);

Check pulseaudio version by PA_CHECK_VERSION macro introduced since
pulseaudio 0.9.16.  In case PA_CHECK_VERSION is not defined,
pa_rtpoll_run takes 2 arguments.
2016-02-18 00:45:33 +09:00
Pavel Roskin
50cbf01044 xrdp-sesadmin: show help and exit if mandatory arguments are not given
Don't mark password as mandatory, it's asked if not provided on the
command line.
2016-02-14 10:27:17 -08: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
Pavel Roskin
81779ddb01 Use lowercase program names for syslog
Other programs typically use the same case as their execulables.
2016-02-13 18:14:42 -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
Pavel Roskin
ffc4efb9ce Don't ignore files known to git
That can cause unexpected behavior, especially with third party tools.
The ignored files will be lost if the source tree is re-imported to
another git repository, unless special care is taken.

Whitelist all non-generated makefiles.

To whitelist instfiles/pam.d/xrdp-sesman, add path to all generated
executables listed in the top-level .gitignore, sort .gitignore
alphabetically.

Add mkinstalldir, it's used by Automake on some systems.
2016-02-12 23:52:46 -08:00
Pavel Roskin
22e808a186 Add missing spaces in the strings that are split for line wrapping 2016-02-12 23:52:45 -08:00
Pavel Roskin
09709d3ced xcon: include unistd.h, it's needed for select() on MacOS 2016-02-12 23:52:45 -08:00
Pavel Roskin
85840863da startwm.sh: make sure sourced scripts are readable
Strictly speaking, both existence and readability should be checked.
However, chances of ~/.profile being a directory or a FIFO are very small
compared to its chances of being non-readable due to some
misconfiguration.

Put "if" and "then" on the same line for consistency with other checks.
Improve comment and pseudocode formatting.
2016-02-12 23:52:45 -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
Itamar Reis Peixoto
ee436aeec9 Merge pull request #309 from proski/devel
Fixes for autotools, compile warnings and MacOS compatibility
2016-02-08 22:37:44 -02:00
Pavel Roskin
5575197eaa sesman: don't set LANG, let initialization scripts take care of it
Setting LANG to en_US.UTF-8 suppresses language settings from
/etc/locale.conf

See https://bugzilla.redhat.com/show_bug.cgi?id=1290820
2016-02-07 22:50:14 -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
f1ba2b2c9d xcon: include sys/types.h for select() and related macros 2016-01-31 23:35:40 -08:00
Pavel Roskin
5b0dcfc8fe rail: fix declaration of rail_desktop_resize()
Arguments without a type default to int. The caller passes a pointer to
XEvent, so use that type.
2016-01-31 23:35:40 -08:00
Pavel Roskin
986fa94733 clipboard: undefine previously defined log level 2016-01-30 18:01:12 -08:00
Pavel Roskin
02c981e796 More spelling fixes found by codespell and aspell 2016-01-30 17:39:25 -08:00
Pavel Roskin
00e70a5c54 Use standard autotools means to detect X11
Use AC_PATH_XTRA to search for X11 in configure.ac. In Makefiles, add
X_CFLAGS to AM_CFLAGS for the source compilation. Add X_LIBS to LDFLAGS.
Add X_PRE_LIBS and X_EXTRA_LIBS to LDADD.

With this patch, X Windows system is correctly detected on Mac OS X.
2016-01-30 17:18:52 -08:00
Pavel Roskin
334eeb970a clipboard_file: include sys/time.h for struct timeval, needed on Mac OS X 2016-01-30 12:32:52 -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
Pavel Roskin
309fca35ac Don't use a symlink where #include would suffice
Absolute symlinks break when the source is moved to another location. In
the best case, the symlink will be replaced with a copy, but that creates
code duplication. A user who got the packaged source may decide to change
one config.c without realizing that another config.c will get the same
changes.

Don't ignore config.c, it's a regular source file now, albeit very
short.

Testing done: compiled inside and outside build directory.
2016-01-26 23:22:05 -08:00