From c4127aa43f48f161572e7cfa9c56d697a3b25f44 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Thu, 11 Feb 2016 11:18:22 -0800 Subject: [PATCH 01/16] Convert coding style from Open Document to Markdown Markdown is easily readable in text editors. Unlike ODT, markdown can be patched. GitHub shows markdown with pretty formatting. Remove bad examples. Improve explanations for good examples. Use Unicode finger sign to work around the issue of code block after a list. Make coding_style.md distributable. --- Coding_Style.odt | Bin 23360 -> 0 bytes Makefile.am | 3 +- coding_style.md | 195 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 197 insertions(+), 1 deletion(-) delete mode 100644 Coding_Style.odt create mode 100644 coding_style.md diff --git a/Coding_Style.odt b/Coding_Style.odt deleted file mode 100644 index 23aeef120e2e8a1deb4ce96267a892baf8ad57d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23360 zcma&N1#}!s(k0xIC5u@WGg{2d%w(~}%*@Qp%*+-uGcz-@#muzwd-G;z=l}k*+vikw zR>aMS8(CR#GP0^=CBA?l0|4LvfD9@lpXLBPG${Z8_;Y-U02U?|2KFx220GT(<|cYN z_9j-AG>(?~)K)rnCU(?T)&`dPR(cK=2A1~J_6E-Ovj2y%E~^y5?k@nqpW`oM2KGAC z&KBmJJfB~9js~`NpXRs-=%{H4@C+>Vtn^JRjkpLD6@;l+33#|6Ijsy0P4o=d|M5We zNks?mv#X^Y``;=q0tZ`5_P@BWTk2RC*sJRomDOp)r{oB!>82%3NFL(5`w2U-=pa0{@$W~w9{NMQh2;dXTKx0IsuVb%6 za()}H$5#KJryk*6&;%b9UD6> zBRdm4C(ZwWH#ux2ysqlN1A^{J$*! zfAs%nH$4|Ua|1hWI+p)}|4aTi*vP=r;M2O5Ew`kJuC0O0Uz3Q2ftra((!|oiSxbeL zS&Nww??04U*0xrr272~13{12ZbVU3PCg%E7{{;KL&HZiu-?P!q{xbwSdlNmpzXru# zN7vkdO3%u{(*AQw6Z|bSvCuL4xA1e8|An;D{p0K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xJVi6s4?Qx30;};Ed7TamMxrFQKzE_B1x6o7lc(yRHT1;VlhC zq2E3%7^jJw@7iFLWh7iA?+(MYj^)2I>3w%W3pcmRRo~rB!7jG{4eN)h_tLwf{q=CK zAokr+p;FK6qA?}9S-Nm_LA8C6Z?p2ymoef_Jkd@OQbmKUK09-$-W90ipW@Mj0wAI0I1 zr&B-L-%-C?&7PrD5HFFYmB`BR6m@!qe|AYjO1HD%M`ZT1kLB;kpIhURE^22nkNu0M z+9~iK>PD=l*`hS*fzh2-o8~}h6Zf8+)4$nVi+@HyQO=|fZvY%z$|H?zB{LjJtEc5=% zgA{sap>qz;ud?sYOh^fL7V+mWoyoxem8It#mNQxSzp{KihviHrerGwoX^|s1)p|&w zcoux%f6nnAWaH^wc}n{8@{N>= 0); + } + + +Braces +------ + +* Opening brace is always on a separate line +* Align braces with the line preceding the opening brace + +☞ + + struct stream + { + int flags; + char *data; + }; + + void + process_data(struct stream *s) + { + if (stream == NULL) + { + return; + } + } + + +`if` statements +--------------- + +* Always use braces +* Put both braces on separate lines + +☞ + + if (val <= 0xff) + { + out_uint8(s, val); + } + else if (val <= 0xffff) + { + out_uint16_le(s, val); + } + else + { + out_uint32_le(s, val); + } + + +`for` statements +---------------- + +* Always use braces +* Put both braces on separate lines + +☞ + + for (i = 0; i < 10; i++) + { + printf("i = %d\n", i); + } + + +`while` and `do while` statements +--------------------------------- + +* Always use braces +* `while` after the closing brace is on the same line + +☞ + + while (cptr) + { + cptr—; + } + + do + { + cptr--; + } while (cptr); + + +`switch` statements +------------------- + +* Indent `case` once +* Indent statements under `case` one more time +* Put both braces on separate lines + +☞ + + switch (cmd) + { + case READ: + read(fd, buf, 1024); + break; + + default: + printf("bad cmd\n"); + } From 85840863da78476f1d269c2b2b8f54d5e6471da0 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Thu, 4 Feb 2016 17:22:52 -0800 Subject: [PATCH 02/16] 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. --- sesman/startwm.sh | 55 ++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 29 deletions(-) diff --git a/sesman/startwm.sh b/sesman/startwm.sh index ee48263f..b81d3646 100755 --- a/sesman/startwm.sh +++ b/sesman/startwm.sh @@ -29,36 +29,34 @@ wm_start() xterm } -#Execution sequence for interactive login shell -#Following pseudo code explains the sequence of execution of these files. -#execute /etc/profile -#IF ~/.bash_profile exists THEN -# execute ~/.bash_profile -#ELSE -# IF ~/.bash_login exist THEN -# execute ~/.bash_login -# ELSE -# IF ~/.profile exist THEN -# execute ~/.profile -# END IF -# END IF -#END IF +# Execution sequence for interactive login shell - pseudocode +# +# IF /etc/profile is readable THEN +# execute ~/.bash_profile +# END IF +# IF ~/.bash_profile is readable THEN +# execute ~/.bash_profile +# ELSE +# IF ~/.bash_login is readable THEN +# execute ~/.bash_login +# ELSE +# IF ~/.profile is readable THEN +# execute ~/.profile +# END IF +# END IF +# END IF pre_start() { - if [ -f /etc/profile ] - then + if [ -r /etc/profile ]; then . /etc/profile fi - if [ -f ~/.bash_profile ] - then + if [ -r ~/.bash_profile ]; then . ~/.bash_profile else - if [ -f ~/.bash_login ] - then + if [ -r ~/.bash_login ]; then . ~/.bash_login else - if [ -f ~/.profile ] - then + if [ -r ~/.profile ]; then . ~/.profile fi fi @@ -66,15 +64,14 @@ pre_start() return 0 } -#When you logout of the interactive shell, following is the -#sequence of execution: -#IF ~/.bash_logout exists THEN -# execute ~/.bash_logout -#END IF +# When loging out from the interactive shell, the execution sequence is: +# +# IF ~/.bash_logout exists THEN +# execute ~/.bash_logout +# END IF post_start() { - if [ -f ~/.bash_logout ] - then + if [ -r ~/.bash_logout ]; then . ~/.bash_logout fi return 0 From 09709d3ced4e95014ba72f7279611af2b64a2678 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Thu, 11 Feb 2016 09:31:38 -0800 Subject: [PATCH 03/16] xcon: include unistd.h, it's needed for select() on MacOS --- sesman/tools/xcon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sesman/tools/xcon.c b/sesman/tools/xcon.c index 4150d6af..4b3248b6 100644 --- a/sesman/tools/xcon.c +++ b/sesman/tools/xcon.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include From 22e808a18673f8ea82250a27310873d13cf9a680 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Thu, 11 Feb 2016 19:44:22 -0800 Subject: [PATCH 04/16] Add missing spaces in the strings that are split for line wrapping --- libxrdp/xrdp_rdp.c | 4 ++-- sesman/access.c | 2 +- sesman/chansrv/pulse/module-xrdp-sink.c | 2 +- sesman/scp_v1.c | 2 +- xrdp/xrdp_mm.c | 4 ++-- xup/xup.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c index 1718afd1..1e58a1f4 100644 --- a/libxrdp/xrdp_rdp.c +++ b/libxrdp/xrdp_rdp.c @@ -98,8 +98,8 @@ xrdp_rdp_read_config(struct xrdp_client_info *client_info) } else { - log_message(LOG_LEVEL_ALWAYS,"Warning: Your configured crypt level is" - "undefined 'high' will be used"); + log_message(LOG_LEVEL_ALWAYS,"Warning: Your configured crypt level is " + "undefined, 'high' will be used"); client_info->crypt_level = 3; } } diff --git a/sesman/access.c b/sesman/access.c index 269b9e77..b50f2caa 100644 --- a/sesman/access.c +++ b/sesman/access.c @@ -93,7 +93,7 @@ access_login_mng_allowed(char *user) if (0 == g_cfg->sec.ts_admins_enable) { - LOG_DBG("[MNG] Terminal Server Admin group is disabled," + LOG_DBG("[MNG] Terminal Server Admin group is disabled, " "allowing authentication", 1); return 1; } diff --git a/sesman/chansrv/pulse/module-xrdp-sink.c b/sesman/chansrv/pulse/module-xrdp-sink.c index 5d6256d4..f56644b9 100644 --- a/sesman/chansrv/pulse/module-xrdp-sink.c +++ b/sesman/chansrv/pulse/module-xrdp-sink.c @@ -77,7 +77,7 @@ PA_MODULE_USAGE( "sink_name= " "sink_properties= " "format= " - "rate=" + "rate= " "channels= " "channel_map="); diff --git a/sesman/scp_v1.c b/sesman/scp_v1.c index a0fff6d9..92e1dad5 100644 --- a/sesman/scp_v1.c +++ b/sesman/scp_v1.c @@ -110,7 +110,7 @@ scp_v1_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s) if (scount == 0) { /* no disconnected sessions - start a new one */ - log_message(LOG_LEVEL_DEBUG, "No disconnected sessions for this user" + log_message(LOG_LEVEL_DEBUG, "No disconnected sessions for this user " "- we create a new one"); if (0 != s->client_ip) diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index 26e5c028..088b6676 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -1151,7 +1151,7 @@ xrdp_mm_connect_chansrv(struct xrdp_mm *self, char *ip, char *port) if (!(self->chan_trans_up)) { - log_message(LOG_LEVEL_ERROR,"xrdp_mm_connect_chansrv: error in" + log_message(LOG_LEVEL_ERROR,"xrdp_mm_connect_chansrv: error in " "trans_connect chan"); } @@ -1164,7 +1164,7 @@ xrdp_mm_connect_chansrv(struct xrdp_mm *self, char *ip, char *port) } else { - log_message(LOG_LEVEL_DEBUG,"xrdp_mm_connect_chansrv: chansrv" + log_message(LOG_LEVEL_DEBUG,"xrdp_mm_connect_chansrv: chansrv " "connect successful"); } } diff --git a/xup/xup.c b/xup/xup.c index 21fdedd5..8e904d52 100644 --- a/xup/xup.c +++ b/xup/xup.c @@ -211,7 +211,7 @@ lib_mod_connect(struct mod *mod) error = -1; if (trans_connect(mod->trans, mod->ip, con_port, 3000) == 0) { - LLOGLN(0, ("lib_mod_connect: connected to Xserver" + LLOGLN(0, ("lib_mod_connect: connected to Xserver " "(Xorg or X11rdp) sck %d", mod->trans->sck)); error = 0; } From 04fc814efd6d1fbcd06963d07d2027ccaf86936e Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Thu, 11 Feb 2016 22:15:22 -0800 Subject: [PATCH 05/16] Use silent rules by default if supported by Automake Silent rules make warnings stand out, so they are fixed early. --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index efb307ac..099b623f 100644 --- a/configure.ac +++ b/configure.ac @@ -10,6 +10,9 @@ AC_C_CONST AC_PROG_LIBTOOL PKG_PROG_PKG_CONFIG +# Use silent rules by default if supported by Automake +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + case $host_os in *linux*) linux=yes From 0e75e13b425547a829ec9fb3a99c2ad68e6f5420 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Thu, 11 Feb 2016 23:40:27 -0800 Subject: [PATCH 06/16] Automake 1.7.2 is the oldest version working with xrdp Automake 1.6.x cannot deal with conditional EXTRA_LIBS. Automake 1.7 and 1.7.1 cannot deal with line continuation in SUBDIRS. It is important to have correct requirements to know what Automake features can be used. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 099b623f..af78a392 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ(2.59) AC_INIT([xrdp], [0.9.0], [xrdp-devel@googlegroups.com]) AC_CONFIG_HEADERS(config_ac.h:config_ac-h.in) -AM_INIT_AUTOMAKE([1.6 foreign]) +AM_INIT_AUTOMAKE([1.7.2 foreign]) AC_CONFIG_MACRO_DIR([m4]) AC_PROG_CC AC_C_CONST From 9a1dea8e5015fd0d8bb5304fd05eae10efadf473 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Thu, 11 Feb 2016 23:27:54 -0800 Subject: [PATCH 07/16] Fix sloppy formatting in instfiles/Makefile.am Use spaces around = and +=, indent by 2 spaces. --- instfiles/Makefile.am | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/instfiles/Makefile.am b/instfiles/Makefile.am index 99f37b61..4ef77992 100644 --- a/instfiles/Makefile.am +++ b/instfiles/Makefile.am @@ -32,28 +32,28 @@ startscript_DATA = \ # # platform specific files # -SUBDIRS= +SUBDIRS = if LINUX -SUBDIRS+= \ - pam.d \ - pulse -startscript_DATA+= xrdp.sh +SUBDIRS += \ + pam.d \ + pulse +startscript_DATA += xrdp.sh if HAVE_SYSTEMD systemdsystemunit_DATA = \ - xrdp-sesman.service \ - xrdp.service + xrdp-sesman.service \ + xrdp.service else -SUBDIRS+= \ - default \ - init.d +SUBDIRS += \ + default \ + init.d endif # HAVE_SYSTEMD endif # LINUX if FREEBSD -SUBDIRS+= \ - pam.d \ - rc.d \ - pulse +SUBDIRS += \ + pam.d \ + rc.d \ + pulse endif # From ffc4efb9ce09ccc370571793607b19193d8cb15b Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Tue, 9 Feb 2016 21:10:30 -0800 Subject: [PATCH 08/16] 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. --- .gitignore | 23 ++++++++++++----------- fontdump/.gitignore | 1 + sesman/chansrv/pcsc/.gitignore | 1 + sesman/chansrv/pulse/.gitignore | 1 + tests/.gitignore | 1 + xorg/.gitignore | 1 + 6 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 fontdump/.gitignore create mode 100644 sesman/chansrv/pcsc/.gitignore create mode 100644 sesman/chansrv/pulse/.gitignore create mode 100644 tests/.gitignore create mode 100644 xorg/.gitignore diff --git a/.gitignore b/.gitignore index 0437bf57..e7ca1e6b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ aclocal.m4 AUTHORS autom4te.cache/ ChangeLog +compile config_ac.h config_ac-h.in config.guess @@ -10,10 +11,11 @@ config.log config.status config.sub configure -compile depcomp .deps/ +genkeymap/xrdp-genkeymap install-sh +keygen/xrdp-keygen *.la .libs libtool @@ -22,18 +24,17 @@ ltmain.sh Makefile Makefile.in missing +mkinstalldirs NEWS *.o README +sesman/chansrv/xrdp-chansrv +sesman/sessvc/xrdp-sessvc +sesman/tools/xrdp-dis +sesman/tools/xrdp-sesadmin +sesman/tools/xrdp-sesrun +sesman/tools/xrdp-sestest +sesman/tools/xrdp-xcon +sesman/xrdp-sesman stamp-h1 -xrdp-chansrv -xrdp-genkeymap -xrdp-keygen -xrdp-sesadmin -xrdp-sesman -xrdp-sesrun -xrdp-sessvc -xrdp-sestest -xrdp-dis -xrdp-xcon xrdp/xrdp diff --git a/fontdump/.gitignore b/fontdump/.gitignore new file mode 100644 index 00000000..24600083 --- /dev/null +++ b/fontdump/.gitignore @@ -0,0 +1 @@ +!Makefile diff --git a/sesman/chansrv/pcsc/.gitignore b/sesman/chansrv/pcsc/.gitignore new file mode 100644 index 00000000..24600083 --- /dev/null +++ b/sesman/chansrv/pcsc/.gitignore @@ -0,0 +1 @@ +!Makefile diff --git a/sesman/chansrv/pulse/.gitignore b/sesman/chansrv/pulse/.gitignore new file mode 100644 index 00000000..24600083 --- /dev/null +++ b/sesman/chansrv/pulse/.gitignore @@ -0,0 +1 @@ +!Makefile diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 00000000..24600083 --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1 @@ +!Makefile diff --git a/xorg/.gitignore b/xorg/.gitignore new file mode 100644 index 00000000..24600083 --- /dev/null +++ b/xorg/.gitignore @@ -0,0 +1 @@ +!Makefile From dcab7552db2af346724c5090e529950b32a7076d Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Wed, 10 Feb 2016 10:24:09 -0800 Subject: [PATCH 09/16] 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. --- common/Makefile.am | 2 +- common/file_loc.h | 4 ++-- configure.ac | 3 ++- libxrdp/Makefile.am | 2 +- mc/Makefile.am | 2 +- neutrinordp/Makefile.am | 2 +- rdp/Makefile.am | 2 +- sesman/libscp/Makefile.am | 2 +- vnc/Makefile.am | 2 +- xrdp/Makefile.am | 2 +- xrdp/xrdp_mm.c | 2 +- xrdpapi/Makefile.am | 2 +- xrdpvr/Makefile.am | 2 +- xup/Makefile.am | 2 +- 14 files changed, 16 insertions(+), 15 deletions(-) diff --git a/common/Makefile.am b/common/Makefile.am index c8501586..cc72b22b 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -26,7 +26,7 @@ AM_CPPFLAGS = \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -DXRDP_LOG_PATH=\"${localstatedir}/log\" -lib_LTLIBRARIES = \ +module_LTLIBRARIES = \ libcommon.la libcommon_la_SOURCES = \ diff --git a/common/file_loc.h b/common/file_loc.h index 7389a1ed..8f5146cb 100644 --- a/common/file_loc.h +++ b/common/file_loc.h @@ -37,8 +37,8 @@ #define XRDP_SHARE_PATH "/usr/local/share/xrdp" #endif -#if !defined(XRDP_LIB_PATH) -#define XRDP_LIB_PATH "/usr/local/lib/xrdp" +#if !defined(XRDP_MODULE_PATH) +#define XRDP_MODULE_PATH "/usr/local/lib/xrdp" #endif #if !defined(XRDP_LOG_PATH) diff --git a/configure.ac b/configure.ac index af78a392..80fad1c3 100644 --- a/configure.ac +++ b/configure.ac @@ -226,7 +226,8 @@ AC_CHECK_HEADER([X11/extensions/Xrandr.h], [], CFLAGS="$save_CFLAGS" -libdir="${libdir}/xrdp"; +AC_SUBST([moduledir], '${libdir}/xrdp') + if test "x${prefix}" = "xNONE" ; then sysconfdir="/etc"; localstatedir="/var"; diff --git a/libxrdp/Makefile.am b/libxrdp/Makefile.am index 5b89b0c3..ade99c65 100644 --- a/libxrdp/Makefile.am +++ b/libxrdp/Makefile.am @@ -37,7 +37,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/common \ $(EXTRA_INCLUDES) -lib_LTLIBRARIES = \ +module_LTLIBRARIES = \ libxrdp.la libxrdp_la_SOURCES = \ diff --git a/mc/Makefile.am b/mc/Makefile.am index f56dac5f..b636a09d 100644 --- a/mc/Makefile.am +++ b/mc/Makefile.am @@ -7,7 +7,7 @@ AM_CPPFLAGS = \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common -lib_LTLIBRARIES = \ +module_LTLIBRARIES = \ libmc.la libmc_la_SOURCES = mc.c diff --git a/neutrinordp/Makefile.am b/neutrinordp/Makefile.am index 58fe9bc2..932ddc78 100644 --- a/neutrinordp/Makefile.am +++ b/neutrinordp/Makefile.am @@ -16,7 +16,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/common \ $(FREERDP_CFLAGS) -lib_LTLIBRARIES = \ +module_LTLIBRARIES = \ libxrdpneutrinordp.la libxrdpneutrinordp_la_SOURCES = xrdp-neutrinordp.c xrdp-color.c diff --git a/rdp/Makefile.am b/rdp/Makefile.am index 6d23b287..72c31101 100644 --- a/rdp/Makefile.am +++ b/rdp/Makefile.am @@ -15,7 +15,7 @@ AM_CPPFLAGS = \ $(EXTRA_DEFINES) \ -I$(top_srcdir)/common -lib_LTLIBRARIES = \ +module_LTLIBRARIES = \ librdp.la librdp_la_SOURCES = \ diff --git a/sesman/libscp/Makefile.am b/sesman/libscp/Makefile.am index 3172f2cb..627a3370 100644 --- a/sesman/libscp/Makefile.am +++ b/sesman/libscp/Makefile.am @@ -8,7 +8,7 @@ AM_CPPFLAGS = \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common -lib_LTLIBRARIES = \ +module_LTLIBRARIES = \ libscp.la libscp_la_SOURCES = \ diff --git a/vnc/Makefile.am b/vnc/Makefile.am index a9a3aa14..9d37c6da 100644 --- a/vnc/Makefile.am +++ b/vnc/Makefile.am @@ -7,7 +7,7 @@ AM_CPPFLAGS = \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common -lib_LTLIBRARIES = \ +module_LTLIBRARIES = \ libvnc.la libvnc_la_SOURCES = vnc.c diff --git a/xrdp/Makefile.am b/xrdp/Makefile.am index 308f01a4..f20cda69 100644 --- a/xrdp/Makefile.am +++ b/xrdp/Makefile.am @@ -22,7 +22,7 @@ AM_CPPFLAGS = \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ - -DXRDP_LIB_PATH=\"${libdir}\" \ + -DXRDP_MODULE_PATH=\"${moduledir}\" \ $(EXTRA_DEFINES) \ -I$(top_builddir) \ -I$(top_srcdir)/common \ diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index 088b6676..64ebdaf4 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -357,7 +357,7 @@ xrdp_mm_setup_mod1(struct xrdp_mm *self) if (self->mod_handle == 0) { - g_snprintf(text, 255, "%s/%s", XRDP_LIB_PATH, lib); + g_snprintf(text, 255, "%s/%s", XRDP_MODULE_PATH, lib); /* Let the main thread load the lib,*/ self->mod_handle = g_xrdp_sync(xrdp_mm_sync_load, (tintptr)text, 0); diff --git a/xrdpapi/Makefile.am b/xrdpapi/Makefile.am index 8107ffeb..30001b2a 100644 --- a/xrdpapi/Makefile.am +++ b/xrdpapi/Makefile.am @@ -9,7 +9,7 @@ AM_CPPFLAGS = \ $(EXTRA_DEFINES) \ $(EXTRA_INCLUDES) -lib_LTLIBRARIES = \ +module_LTLIBRARIES = \ libxrdpapi.la libxrdpapi_la_SOURCES = \ diff --git a/xrdpvr/Makefile.am b/xrdpvr/Makefile.am index f232ce41..0f2b7cbc 100644 --- a/xrdpvr/Makefile.am +++ b/xrdpvr/Makefile.am @@ -9,7 +9,7 @@ AM_CPPFLAGS = \ $(EXTRA_DEFINES) \ $(EXTRA_INCLUDES) -lib_LTLIBRARIES = \ +module_LTLIBRARIES = \ libxrdpvr.la libxrdpvr_la_SOURCES = \ diff --git a/xup/Makefile.am b/xup/Makefile.am index d7017b42..7669a55f 100644 --- a/xup/Makefile.am +++ b/xup/Makefile.am @@ -7,7 +7,7 @@ AM_CPPFLAGS = \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common -lib_LTLIBRARIES = \ +module_LTLIBRARIES = \ libxup.la libxup_la_SOURCES = xup.c From 81779ddb0137cda54362aae11cb05ae8e33b8297 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 13 Feb 2016 18:09:17 -0800 Subject: [PATCH 10/16] Use lowercase program names for syslog Other programs typically use the same case as their execulables. --- sesman/chansrv/chansrv.c | 2 +- sesman/sesman.c | 2 +- sesman/sig.c | 2 +- xrdp/xrdp.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c index 9752b7f3..b45fde34 100644 --- a/sesman/chansrv/chansrv.c +++ b/sesman/chansrv/chansrv.c @@ -1487,7 +1487,7 @@ main(int argc, char **argv) /* starting logging subsystem */ g_memset(&logconfig, 0, sizeof(struct log_config)); - logconfig.program_name = "XRDP-Chansrv"; + logconfig.program_name = "xrdp-chansrv"; g_snprintf(log_file, 255, "%s/xrdp-chansrv.log", log_path); g_writeln("chansrv::main: using log file [%s]", log_file); diff --git a/sesman/sesman.c b/sesman/sesman.c index 924a7ae8..30fc5f7c 100644 --- a/sesman/sesman.c +++ b/sesman/sesman.c @@ -268,7 +268,7 @@ main(int argc, char **argv) g_snprintf(cfg_file, 255, "%s/sesman.ini", XRDP_CFG_PATH); /* starting logging subsystem */ - error = log_start(cfg_file, "XRDP-sesman"); + error = log_start(cfg_file, "xrdp-sesman"); if (error != LOG_STARTUP_OK) { diff --git a/sesman/sig.c b/sesman/sig.c index 72892fb2..5a62046a 100644 --- a/sesman/sig.c +++ b/sesman/sig.c @@ -99,7 +99,7 @@ sig_sesman_reload_cfg(int sig) g_snprintf(cfg_file, 255, "%s/sesman.ini", XRDP_CFG_PATH); /* start again logging subsystem */ - error = log_start(cfg_file, "XRDP-sesman"); + error = log_start(cfg_file, "xrdp-sesman"); if (error != LOG_STARTUP_OK) { diff --git a/xrdp/xrdp.c b/xrdp/xrdp.c index 690508cb..c70c37c7 100644 --- a/xrdp/xrdp.c +++ b/xrdp/xrdp.c @@ -437,7 +437,7 @@ main(int argc, char **argv) } /* starting logging subsystem */ - error = log_start(cfg_file, "XRDP"); + error = log_start(cfg_file, "xrdp"); if (error != LOG_STARTUP_OK) { From fe055e989aef5954279af6bec70918b41597e268 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 13 Feb 2016 18:19:38 -0800 Subject: [PATCH 11/16] 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. --- sesman/session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sesman/session.c b/sesman/session.c index 8c3ccc17..67c5fc6f 100644 --- a/sesman/session.c +++ b/sesman/session.c @@ -778,7 +778,7 @@ session_start_fork(int width, int height, int bpp, char *username, ltime = g_time1(); localtime_r(<ime, &stime); temp->item->connect_time.year = (tui16)(stime.tm_year + 1900); - temp->item->connect_time.month = (tui8)stime.tm_mon; + temp->item->connect_time.month = (tui8)(stime.tm_mon + 1); temp->item->connect_time.day = (tui8)stime.tm_mday; temp->item->connect_time.hour = (tui8)stime.tm_hour; temp->item->connect_time.minute = (tui8)stime.tm_min; From afa6ec97cc90ce45086df13ca7a5914a28175820 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 13 Feb 2016 12:32:26 -0800 Subject: [PATCH 12/16] Install the most appropriate PAM settings file Installing a file referring to common-auth is of no use if that file doesn't exit. Don't use "password" entry, xrdp doesn't ever change user password. --- .gitignore | 1 + instfiles/pam.d/Makefile.am | 21 +++++++++++++++++-- .../pam.d/{xrdp-sesman => xrdp-sesman.common} | 1 - instfiles/pam.d/xrdp-sesman.password-auth | 4 ++++ 4 files changed, 24 insertions(+), 3 deletions(-) rename instfiles/pam.d/{xrdp-sesman => xrdp-sesman.common} (75%) create mode 100644 instfiles/pam.d/xrdp-sesman.password-auth diff --git a/.gitignore b/.gitignore index e7ca1e6b..c76bc4f9 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ depcomp .deps/ genkeymap/xrdp-genkeymap install-sh +instfiles/pam.d/xrdp-sesman keygen/xrdp-keygen *.la .libs diff --git a/instfiles/pam.d/Makefile.am b/instfiles/pam.d/Makefile.am index d51d5c20..3e09802b 100644 --- a/instfiles/pam.d/Makefile.am +++ b/instfiles/pam.d/Makefile.am @@ -1,4 +1,9 @@ -EXTRA_DIST = xrdp-sesman +EXTRA_DIST = \ + xrdp-sesman.common \ + xrdp-sesman.other \ + xrdp-sesman.password-auth + +CLEANFILES = xrdp-sesman if SESMAN_NOPAM PAMFILE = @@ -14,7 +19,19 @@ endif endif endif -pamddir=$(sysconfdir)/pam.d +pamddir = $(sysconfdir)/pam.d pamd_DATA = \ $(PAMFILE) + +xrdp-sesman: + if test -e /etc/pam.d/password-auth; then \ + pamrules=xrdp-sesman.password-auth; \ + else \ + if test -e /etc/pam.d/common-auth; then \ + pamrules=xrdp-sesman.common; \ + else \ + pamrules=xrdp-sesman.other; \ + fi; \ + fi; \ + $(LN_S) $(srcdir)/$$pamrules $@ diff --git a/instfiles/pam.d/xrdp-sesman b/instfiles/pam.d/xrdp-sesman.common similarity index 75% rename from instfiles/pam.d/xrdp-sesman rename to instfiles/pam.d/xrdp-sesman.common index 789ce8f7..b2089987 100644 --- a/instfiles/pam.d/xrdp-sesman +++ b/instfiles/pam.d/xrdp-sesman.common @@ -2,4 +2,3 @@ @include common-auth @include common-account @include common-session -@include common-password diff --git a/instfiles/pam.d/xrdp-sesman.password-auth b/instfiles/pam.d/xrdp-sesman.password-auth new file mode 100644 index 00000000..b17187c8 --- /dev/null +++ b/instfiles/pam.d/xrdp-sesman.password-auth @@ -0,0 +1,4 @@ +#%PAM-1.0 +auth include password-auth +account include password-auth +session include password-auth From 92a6833e9b808301bb3435bc1290f4b8d6242be5 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 13 Feb 2016 20:41:07 -0800 Subject: [PATCH 13/16] Fix typos --- common/list.c | 2 +- common/log.h | 2 +- common/os_calls.c | 4 ++-- common/xrdp_constants.h | 2 +- libxrdp/libxrdp.c | 2 +- libxrdp/libxrdpinc.h | 2 +- libxrdp/xrdp_caps.c | 2 +- libxrdp/xrdp_fastpath.c | 4 ++-- libxrdp/xrdp_mcs.c | 2 +- neutrinordp/xrdp-neutrinordp.c | 4 ++-- sesman/chansrv/chansrv_fuse.c | 6 +++--- sesman/chansrv/clipboard.c | 8 ++++---- sesman/chansrv/devredir.c | 8 ++++---- sesman/chansrv/devredir.h | 2 +- sesman/chansrv/drdynvc.c | 2 +- sesman/chansrv/pcsc/wrapper/winscard.c | 6 +++--- sesman/chansrv/rail.c | 12 ++++++------ sesman/chansrv/sound.c | 2 +- sesman/chansrv/xcommon.c | 4 ++-- sesman/config.h | 2 +- sesman/env.c | 2 +- sesman/env.h | 2 +- sesman/libscp/libscp_init.h | 2 +- sesman/libscp/libscp_lock.c | 4 ++-- sesman/libscp/libscp_tcp.c | 2 +- sesman/libscp/libscp_v1s.h | 2 +- sesman/libscp/libscp_v1s_mng.h | 2 +- sesman/libscp/libscp_vX.h | 2 +- sesman/sesman.c | 2 +- sesman/session.c | 6 +++--- sesman/sig.c | 2 +- sesman/tools/sesadmin.c | 4 ++-- sesman/tools/tcp.c | 2 +- tests/gtcp_proxy/gtcp-proxy.c | 2 +- tests/gtcp_proxy/gtcp.c | 2 +- tests/tcp_proxy/main.c | 2 +- vnc/vnc.c | 8 ++++---- vrplayer/decoderthread.cpp | 2 +- xorg/X11R7.6/rdp/rdpComposite.c | 12 ++++++------ xorg/X11R7.6/rdp/rdpdraw.c | 4 ++-- xorg/X11R7.6/rdp/rdpglyph.c | 4 ++-- xorg/X11R7.6/rdp/rdpinput.c | 20 ++++++++++---------- xorg/X11R7.6/rdp/rdpkeyboardbase.c | 6 +++--- xorg/X11R7.6/rdp/rdpkeyboardevdev.c | 4 ++-- xorg/X11R7.6/rdp/rdpmain.c | 4 ++-- xorg/X11R7.6/rdp/rdpmisc.c | 4 ++-- xorg/X11R7.6/rdp/rdpup.c | 2 +- xorg/tests/xdemo/bmp_parser.c | 2 +- xrdp/xrdp.c | 2 +- xrdp/xrdp_cache.c | 6 +++--- xrdp/xrdp_encoder.c | 2 +- xrdp/xrdp_keyboard.ini | 4 ++-- xrdp/xrdp_process.c | 4 ++-- xrdp/xrdp_types.h | 2 +- xrdp/xrdp_wm.c | 2 +- xrdp/xrdpwin.c | 2 +- xrdpapi/xrdpapi.c | 2 +- xrdpvr/xrdpvr.c | 2 +- 58 files changed, 109 insertions(+), 109 deletions(-) diff --git a/common/list.c b/common/list.c index 9fde1f6f..abab2fab 100644 --- a/common/list.c +++ b/common/list.c @@ -192,7 +192,7 @@ list_insert_item(struct list *self, int index, tbus item) /*****************************************************************************/ /* append one list to another using strdup for each item in the list */ -/* begins copy at start_index, a zero based index on the soure list */ +/* begins copy at start_index, a zero based index on the source list */ void APP_CC list_append_list_strdup(struct list *self, struct list *dest, int start_index) { diff --git a/common/log.h b/common/log.h index b95c615a..15307588 100644 --- a/common/log.h +++ b/common/log.h @@ -81,7 +81,7 @@ struct log_config /** * * @brief Starts the logging subsystem - * @param l_cfg loggging system configuration + * @param l_cfg logging system configuration * @return * */ diff --git a/common/os_calls.c b/common/os_calls.c index 0034cb5b..a4c98a75 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -1327,7 +1327,7 @@ tintptr APP_CC g_create_wait_obj_from_socket(tintptr socket, int write) { #ifdef _WIN32 - /* Create and return corresponding event handle for WaitForMultipleObjets */ + /* Create and return corresponding event handle for WaitForMultipleObjects */ WSAEVENT event; long lnetevent = 0; @@ -1979,7 +1979,7 @@ g_directory_exist(const char *dirname) { #if defined(_WIN32) return 0; // use GetFileAttributes and check return value - // is not -1 and FILE_ATTRIBUT_DIRECTORY bit is set + // is not -1 and FILE_ATTRIBUTE_DIRECTORY bit is set #else struct stat st; diff --git a/common/xrdp_constants.h b/common/xrdp_constants.h index b8739b2b..94f4305c 100644 --- a/common/xrdp_constants.h +++ b/common/xrdp_constants.h @@ -521,7 +521,7 @@ #define NO_BITMAP_COMPRESSION_HDR 0x0400 #define LONG_CREDENTIALS_SUPPORTED 0x0004 #define AUTORECONNECT_SUPPORTED 0x0008 -#define ENC_SALTED_CHEKSUM 0x0010 +#define ENC_SALTED_CHECKSUM 0x0010 #define NEGOTIATEORDERSUPPORT 0x0002 #define ZEROBOUNDSDELTASUPPORT 0x0008 #define COLORINDEXSUPPORT 0x0020 diff --git a/libxrdp/libxrdp.c b/libxrdp/libxrdp.c index 834e6ae3..a823bfdf 100644 --- a/libxrdp/libxrdp.c +++ b/libxrdp/libxrdp.c @@ -66,7 +66,7 @@ libxrdp_disconnect(struct xrdp_session *session) /******************************************************************************/ int EXPORT_CC -libxrdp_process_incomming(struct xrdp_session *session) +libxrdp_process_incoming(struct xrdp_session *session) { int rv; diff --git a/libxrdp/libxrdpinc.h b/libxrdp/libxrdpinc.h index e3e79564..ffda9e81 100644 --- a/libxrdp/libxrdpinc.h +++ b/libxrdp/libxrdpinc.h @@ -83,7 +83,7 @@ libxrdp_exit(struct xrdp_session *session); int DEFAULT_CC libxrdp_disconnect(struct xrdp_session *session); int DEFAULT_CC -libxrdp_process_incomming(struct xrdp_session *session); +libxrdp_process_incoming(struct xrdp_session *session); int EXPORT_CC libxrdp_get_pdu_bytes(const char *aheader); struct stream * APP_CC diff --git a/libxrdp/xrdp_caps.c b/libxrdp/xrdp_caps.c index 98ab03fa..6d109f76 100644 --- a/libxrdp/xrdp_caps.c +++ b/libxrdp/xrdp_caps.c @@ -185,7 +185,7 @@ xrdp_caps_process_bmpcache(struct xrdp_rdp *self, struct stream *s, i = MAX(i, 0); self->client_info.cache2_entries = i; in_uint16_le(s, self->client_info.cache2_size); - /* caceh 3 */ + /* cache 3 */ in_uint16_le(s, i); i = MIN(i, XRDP_MAX_BITMAP_CACHE_IDX); i = MAX(i, 0); diff --git a/libxrdp/xrdp_fastpath.c b/libxrdp/xrdp_fastpath.c index 6a0cdfc0..008c8289 100644 --- a/libxrdp/xrdp_fastpath.c +++ b/libxrdp/xrdp_fastpath.c @@ -97,7 +97,7 @@ xrdp_fastpath_recv(struct xrdp_fastpath *self, struct stream *s) } /*****************************************************************************/ -/* no fragmenation */ +/* no fragmentation */ int APP_CC xrdp_fastpath_init(struct xrdp_fastpath *self, struct stream *s) { @@ -133,7 +133,7 @@ xrdp_fastpath_session_callback(struct xrdp_fastpath *self, int msg, } /*****************************************************************************/ -/* no fragmenation */ +/* no fragmentation */ int APP_CC xrdp_fastpath_send(struct xrdp_fastpath *self, struct stream *s) { diff --git a/libxrdp/xrdp_mcs.c b/libxrdp/xrdp_mcs.c index 03e6bca7..6f04e719 100644 --- a/libxrdp/xrdp_mcs.c +++ b/libxrdp/xrdp_mcs.c @@ -761,7 +761,7 @@ xrdp_mcs_out_gcc_data(struct xrdp_sec *self) out_uint8(s, 0); if (self->mcs_layer->iso_layer->rdpNegData) { - /* ReqeustedProtocol */ + /* RequestedProtocol */ out_uint32_le(s, self->mcs_layer->iso_layer->requestedProtocol); } out_uint16_le(s, SEC_TAG_SRV_CHANNELS); diff --git a/neutrinordp/xrdp-neutrinordp.c b/neutrinordp/xrdp-neutrinordp.c index 0b90767d..67bc276b 100644 --- a/neutrinordp/xrdp-neutrinordp.c +++ b/neutrinordp/xrdp-neutrinordp.c @@ -1357,7 +1357,7 @@ lfreerdp_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc) /******************************************************************************/ static void DEFAULT_CC -lfreerdp_syncronize(rdpContext* context) +lfreerdp_synchronize(rdpContext* context) { struct mod *mod; mod = ((struct mod_context *)context)->modi; @@ -1494,7 +1494,7 @@ lfreerdp_pre_connect(freerdp *instance) instance->update->EndPaint = lfreerdp_end_paint; instance->update->SetBounds = lfreerdp_set_bounds; instance->update->BitmapUpdate = lfreerdp_bitmap_update; - instance->update->Synchronize = lfreerdp_syncronize ; + instance->update->Synchronize = lfreerdp_synchronize; instance->update->primary->DstBlt = lfreerdp_dst_blt; instance->update->primary->PatBlt = lfreerdp_pat_blt; instance->update->primary->ScrBlt = lfreerdp_scr_blt; diff --git a/sesman/chansrv/chansrv_fuse.c b/sesman/chansrv/chansrv_fuse.c index ed180454..7997dfb9 100644 --- a/sesman/chansrv/chansrv_fuse.c +++ b/sesman/chansrv/chansrv_fuse.c @@ -19,7 +19,7 @@ /* * TODO * o when creating dir/file, ensure it does not already exist - * o do not allow dirs to be created in ino==1 except for .clipbard and share mounts + * o do not allow dirs to be created in ino==1 except for .clipboard and share mounts * o fix the HACK where I have to use my own buf instead of g_buffer * this is in func xfuse_check_wait_objs() * o if fuse mount point is already mounted, I get segfault @@ -306,7 +306,7 @@ static void xfuse_cb_lookup(fuse_req_t req, fuse_ino_t parent, static void xfuse_cb_getattr(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi); -/* this is not a callback, but its's used by xfuse_cb_readdir() */ +/* this is not a callback, but it's used by xfuse_cb_readdir() */ static void xfuse_dirbuf_add(fuse_req_t req, struct dirbuf *b, const char *name, fuse_ino_t ino); @@ -1264,7 +1264,7 @@ static struct xrdp_inode * xfuse_create_file_in_xrdp_fs(tui32 device_id, * Check if specified file exists * * @param parent parent inode of file - * @param name flilename or dirname + * @param name filename or dirname * * @return 1 if specified file exists, 0 otherwise *****************************************************************************/ diff --git a/sesman/chansrv/clipboard.c b/sesman/chansrv/clipboard.c index 11c37a16..929805f9 100644 --- a/sesman/chansrv/clipboard.c +++ b/sesman/chansrv/clipboard.c @@ -1086,11 +1086,11 @@ clipboard_process_format_announce(struct stream *s, int clip_msg_status, /* response to CB_FORMAT_LIST; used to indicate whether processing of the Format List PDU was successful */ static int APP_CC -clipboard_prcoess_format_ack(struct stream *s, int clip_msg_status, +clipboard_process_format_ack(struct stream *s, int clip_msg_status, int clip_msg_len) { - log_debug("clipboard_prcoess_format_ack: CLIPRDR_FORMAT_ACK"); - log_debug("clipboard_prcoess_format_ack:"); + log_debug("clipboard_process_format_ack: CLIPRDR_FORMAT_ACK"); + log_debug("clipboard_process_format_ack:"); return 0; } @@ -1634,7 +1634,7 @@ clipboard_data_in(struct stream *s, int chan_id, int chan_flags, int length, /* response to CB_FORMAT_LIST; used to indicate whether */ /* processing of the Format List PDU was successful */ case CB_FORMAT_LIST_RESPONSE: /* 3 CLIPRDR_FORMAT_ACK */ - rv = clipboard_prcoess_format_ack(ls, clip_msg_status, + rv = clipboard_process_format_ack(ls, clip_msg_status, clip_msg_len); break; /* sent by recipient of CB_FORMAT_LIST; used to request data for one */ diff --git a/sesman/chansrv/devredir.c b/sesman/chansrv/devredir.c index cea42c81..b1558463 100644 --- a/sesman/chansrv/devredir.c +++ b/sesman/chansrv/devredir.c @@ -242,11 +242,11 @@ dev_redir_data_in(struct stream *s, int chan_id, int chan_flags, int length, case PAKID_CORE_CLIENT_NAME: /* client is telling us its computer name; do we even care? */ - /* let client know loggin was successful */ + /* let client know login was successful */ dev_redir_send_server_user_logged_on(); usleep(1000 * 100); - /* let client know our capabilites */ + /* let client know our capabilities */ dev_redir_send_server_core_cap_req(); /* send confirm clientID */ @@ -576,7 +576,7 @@ void dev_redir_send_drive_dir_request(IRP *irp, tui32 device_id, ******************************************************************************/ /** - * @brief process client's repsonse to our core_capability_req() msg + * @brief process client's response to our core_capability_req() msg * * @param s stream containing client's response *****************************************************************************/ @@ -1040,7 +1040,7 @@ dev_redir_get_dir_listing(void *fusep, tui32 device_id, char *path) log_debug("looking for device_id=%d path=%s", device_id, path); - /* when we get a respone to dev_redir_send_drive_create_request(), we */ + /* when we get a response to dev_redir_send_drive_create_request(), we */ /* call dev_redir_send_drive_dir_request(), which needs the following */ /* at the end of the path argument */ if (dev_redir_string_ends_with(irp->pathname, '\\')) diff --git a/sesman/chansrv/devredir.h b/sesman/chansrv/devredir.h index 5a402c9c..8e2cb957 100644 --- a/sesman/chansrv/devredir.h +++ b/sesman/chansrv/devredir.h @@ -329,7 +329,7 @@ enum FS_INFORMATION_CLASS (((_a) & W_FILE_ATTRIBUTE_DIRECTORY) ? S_IFDIR | 0100 : S_IFREG) |\ (((_a) & W_FILE_ATTRIBUTE_READONLY) ? 0444 : 0644) -/* winodws time starts on Jan 1, 1601 */ +/* Windows time starts on Jan 1, 1601 */ /* Linux time starts on Jan 1, 1970 */ #define EPOCH_DIFF 11644473600LL #define WINDOWS_TO_LINUX_TIME(_t) ((_t) / 10000000) - EPOCH_DIFF; diff --git a/sesman/chansrv/drdynvc.c b/sesman/chansrv/drdynvc.c index 70b08d97..5c20661e 100644 --- a/sesman/chansrv/drdynvc.c +++ b/sesman/chansrv/drdynvc.c @@ -414,7 +414,7 @@ drdynvc_process_data(struct stream *s, unsigned char cmd) * process incoming data on a dynamic virtual channel * * @pram s stream containing the incoming data - * @pram chand_id LK_TODO + * @pram chan_id LK_TODO * @pram chan_flags LK_TODO * @pram length LK_TODO * @pram total_length LK_TODO diff --git a/sesman/chansrv/pcsc/wrapper/winscard.c b/sesman/chansrv/pcsc/wrapper/winscard.c index 34157f7c..f00ddf84 100755 --- a/sesman/chansrv/pcsc/wrapper/winscard.c +++ b/sesman/chansrv/pcsc/wrapper/winscard.c @@ -98,7 +98,7 @@ static int g_funcs_loaded = 0; /*****************************************************************************/ static int __fastcall -load_funsc(void) +load_funcs(void) { HMODULE lib; @@ -108,7 +108,7 @@ load_funsc(void) } g_funcs_loaded = 1; lib = LoadLibrary("winscard-org.dll"); - LLOGLN(0, ("load_funsc: lib %p", lib)); + LLOGLN(0, ("load_funcs: lib %p", lib)); LLOAD(aSCardEstablishContext, tSCardEstablishContext, "SCardEstablishContext"); LLOAD(aSCardReleaseContext, tSCardReleaseContext, "SCardReleaseContext"); LLOAD(aSCardIsValidContext, tSCardIsValidContext, "SCardIsValidContext"); @@ -180,7 +180,7 @@ DllEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { case DLL_PROCESS_ATTACH: LLOGLN(0, ("DllEntryPoint: DLL_PROCESS_ATTACH")); - load_funsc(); + load_funcs(); rv = TRUE; break; case DLL_THREAD_ATTACH: diff --git a/sesman/chansrv/rail.c b/sesman/chansrv/rail.c index f12d8e3f..09f40eba 100644 --- a/sesman/chansrv/rail.c +++ b/sesman/chansrv/rail.c @@ -383,7 +383,7 @@ rail_startup() if (g_xrr_event_base > 0) { - LOG(0, ("rail_init: found RandR entension")); + LOG(0, ("rail_init: found RandR extension")); st = XRRQueryVersion(g_display, &ver_maj, &ver_min); if (st) { @@ -543,12 +543,12 @@ rail_close_window(int window_id) /*****************************************************************************/ void DEFAULT_CC -my_timoeut(void* data) +my_timeout(void* data) { - LOG(10, ("my_timoeut: g_got_focus %d", g_got_focus)); + LOG(10, ("my_timeout: g_got_focus %d", g_got_focus)); if (g_focus_counter == (int)(long)data) { - LOG(10, ("my_timoeut: g_focus_counter %d", g_focus_counter)); + LOG(10, ("my_timeout: g_focus_counter %d", g_focus_counter)); rail_win_popdown(); } } @@ -617,7 +617,7 @@ rail_process_activate(struct stream *s, int size) LOG(10, (" window attributes: override_redirect %d", window_attributes.override_redirect)); - add_timeout(200, my_timoeut, (void*)(long)g_focus_counter); + add_timeout(200, my_timeout, (void*)(long)g_focus_counter); } return 0; } @@ -1976,7 +1976,7 @@ rail_xevent(void *xevent) case ReparentNotify: LOG(10, (" got ReparentNotify window 0x%8.8x parent 0x%8.8x " - "event 0x%8.8x x %d y %d overrider redirect %d", + "event 0x%8.8x x %d y %d override redirect %d", lxevent->xreparent.window, lxevent->xreparent.parent, lxevent->xreparent.event, lxevent->xreparent.x, lxevent->xreparent.y, lxevent->xreparent.override_redirect)); diff --git a/sesman/chansrv/sound.c b/sesman/chansrv/sound.c index f63cb72c..a0899f67 100644 --- a/sesman/chansrv/sound.c +++ b/sesman/chansrv/sound.c @@ -1001,7 +1001,7 @@ sound_check_wait_objs(void) /****************************************************************************** ** ** - ** Microphone releated code ** + ** Microphone related code ** ** ** ******************************************************************************/ diff --git a/sesman/chansrv/xcommon.c b/sesman/chansrv/xcommon.c index 919bc41b..d6d2d4b4 100644 --- a/sesman/chansrv/xcommon.c +++ b/sesman/chansrv/xcommon.c @@ -70,8 +70,8 @@ xcommon_fatal_handler(Display *dis) } /*****************************************************************************/ -/* returns time in miliseconds - this is like g_time2 in os_calls, but not miliseconds since machine was +/* returns time in milliseconds + this is like g_time2 in os_calls, but not milliseconds since machine was up, something else this is a time value similar to what the xserver uses */ int APP_CC diff --git a/sesman/config.h b/sesman/config.h index 08d84ce1..61337665 100644 --- a/sesman/config.h +++ b/sesman/config.h @@ -116,7 +116,7 @@ struct config_security int ts_users; /** * @var ts_admins - * @brief Terminal Server Adminnistrators group + * @brief Terminal Server Administrators group */ int ts_admins_enable; int ts_admins; diff --git a/sesman/env.c b/sesman/env.c index b2f06160..39e020fd 100644 --- a/sesman/env.c +++ b/sesman/env.c @@ -45,7 +45,7 @@ env_check_password_file(char *filename, char *passwd) void *des; void *sha1; - /* create password hash from passowrd */ + /* create password hash from password */ passwd_bytes = g_strlen(passwd); sha1 = ssl_sha1_info_create(); ssl_sha1_transform(sha1, "xrdp_vnc", 8); diff --git a/sesman/env.h b/sesman/env.h index 50473a01..378e7fd1 100644 --- a/sesman/env.h +++ b/sesman/env.h @@ -33,7 +33,7 @@ * * @brief Creates vnc password file * @param filename VNC password file name - * @param password The password to be encrypte + * @param password The password to be encrypted * @return 0 on success, 1 on error * */ diff --git a/sesman/libscp/libscp_init.h b/sesman/libscp/libscp_init.h index 20a75857..91fb4090 100644 --- a/sesman/libscp/libscp_init.h +++ b/sesman/libscp/libscp_init.h @@ -36,7 +36,7 @@ * @brief version neutral server accept function * @param c connection descriptor * @param s session descriptor pointer address. - * it will return a newely allocated descriptor. + * it will return a newly allocated descriptor. * It this memory needs to be g_free()d * */ diff --git a/sesman/libscp/libscp_lock.c b/sesman/libscp/libscp_lock.c index d35e3c9c..bd3ff771 100644 --- a/sesman/libscp/libscp_lock.c +++ b/sesman/libscp/libscp_lock.c @@ -94,7 +94,7 @@ scp_lock_fork_release(void) void DEFAULT_CC scp_lock_fork_critical_section_end(int blocking) { - //LOG_DBG("lock_fork_critical_secection_end()",0); + //LOG_DBG("lock_fork_critical_section_end()",0); /* lock mutex */ pthread_mutex_lock(&lock_fork); @@ -117,7 +117,7 @@ scp_lock_fork_critical_section_end(int blocking) int DEFAULT_CC scp_lock_fork_critical_section_start(void) { - //LOG_DBG("lock_fork_critical_secection_start()",0); + //LOG_DBG("lock_fork_critical_section_start()",0); do { pthread_mutex_lock(&lock_fork); diff --git a/sesman/libscp/libscp_tcp.c b/sesman/libscp/libscp_tcp.c index 30e8006c..d92597f4 100644 --- a/sesman/libscp/libscp_tcp.c +++ b/sesman/libscp/libscp_tcp.c @@ -19,7 +19,7 @@ /** * * @file tcp.c - * @brief Tcp stream funcions + * @brief Tcp stream functions * @author Jay Sorg, Simone Fedele * */ diff --git a/sesman/libscp/libscp_v1s.h b/sesman/libscp/libscp_v1s.h index 5e3ec980..322edb28 100644 --- a/sesman/libscp/libscp_v1s.h +++ b/sesman/libscp/libscp_v1s.h @@ -38,7 +38,7 @@ * @param skipVchk if set to !0 skips the version control (to be used after * scp_vXs_accept() ) * - * this function places in *s the address of a newely allocated SCP_SESSION structure + * this function places in *s the address of a newly allocated SCP_SESSION structure * that should be free()d */ enum SCP_SERVER_STATES_E diff --git a/sesman/libscp/libscp_v1s_mng.h b/sesman/libscp/libscp_v1s_mng.h index 72df9fa6..83dee35b 100644 --- a/sesman/libscp/libscp_v1s_mng.h +++ b/sesman/libscp/libscp_v1s_mng.h @@ -36,7 +36,7 @@ * @param c connection descriptor * @param s pointer to session descriptor pointer * - * this function places in *s the address of a newely allocated SCP_SESSION structure + * this function places in *s the address of a newly allocated SCP_SESSION structure * that should be free()d */ enum SCP_SERVER_STATES_E diff --git a/sesman/libscp/libscp_vX.h b/sesman/libscp/libscp_vX.h index a68a9ede..ef0a8290 100644 --- a/sesman/libscp/libscp_vX.h +++ b/sesman/libscp/libscp_vX.h @@ -38,7 +38,7 @@ * @brief version neutral server accept function * @param c connection descriptor * @param s session descriptor pointer address. - * it will return a newely allocated descriptor. + * it will return a newly allocated descriptor. * It this memory needs to be g_free()d * */ diff --git a/sesman/sesman.c b/sesman/sesman.c index 30fc5f7c..30ca3a79 100644 --- a/sesman/sesman.c +++ b/sesman/sesman.c @@ -160,7 +160,7 @@ main(int argc, char **argv) (0 == g_strcasecmp(argv[1], "-ns")))) { /* starts sesman not daemonized */ - g_printf("starting sesman in foregroud...\n"); + g_printf("starting sesman in foreground...\n"); daemon = 0; } else if ((2 == argc) && ((0 == g_strcasecmp(argv[1], "--help")) || diff --git a/sesman/session.c b/sesman/session.c index 67c5fc6f..3860c199 100644 --- a/sesman/session.c +++ b/sesman/session.c @@ -348,7 +348,7 @@ session_is_display_in_chain(int display) /******************************************************************************/ /* called with the main thread */ static int APP_CC -session_get_aval_display_from_chain(void) +session_get_avail_display_from_chain(void) { int display; @@ -461,7 +461,7 @@ session_start_fork(int width, int height, int bpp, char *username, return 0; } - display = session_get_aval_display_from_chain(); + display = session_get_avail_display_from_chain(); if (display == 0) { @@ -470,7 +470,7 @@ session_start_fork(int width, int height, int bpp, char *username, return 0; } - pid = g_fork(); /* parent is fork from tcp accpet, + pid = g_fork(); /* parent is fork from tcp accept, child forks X and wm, then becomes scp */ if (pid == -1) diff --git a/sesman/sig.c b/sesman/sig.c index 5a62046a..d881515b 100644 --- a/sesman/sig.c +++ b/sesman/sig.c @@ -93,7 +93,7 @@ sig_sesman_reload_cfg(int sig) /* stop logging subsystem */ log_end(); - /* replace old config with new readed one */ + /* replace old config with newly read one */ g_cfg = cfg; g_snprintf(cfg_file, 255, "%s/sesman.ini", XRDP_CFG_PATH); diff --git a/sesman/tools/sesadmin.c b/sesman/tools/sesadmin.c index 203bc023..fcf995d8 100644 --- a/sesman/tools/sesadmin.c +++ b/sesman/tools/sesadmin.c @@ -168,8 +168,8 @@ int main(int argc, char **argv) void cmndHelp() { - fprintf(stderr, "sesadmin - a console sesman adminitration tool\n"); - fprintf(stderr, "sysntax: sesadmin [] COMMAND [OPTIONS]\n\n"); + fprintf(stderr, "sesadmin - a console sesman administration tool\n"); + fprintf(stderr, "syntax: sesadmin [] COMMAND [OPTIONS]\n\n"); fprintf(stderr, "-u=: username to connect to sesman [MANDATORY]\n"); fprintf(stderr, "-p=: password to connect to sesman [MANDATORY]\n"); fprintf(stderr, "-s=: sesman host (default is localhost)\n"); diff --git a/sesman/tools/tcp.c b/sesman/tools/tcp.c index 2f7ae948..32c0bbc9 100644 --- a/sesman/tools/tcp.c +++ b/sesman/tools/tcp.c @@ -19,7 +19,7 @@ /** * * @file tcp.c - * @brief Tcp stream funcions + * @brief Tcp stream functions * @author Jay Sorg, Simone Fedele * */ diff --git a/tests/gtcp_proxy/gtcp-proxy.c b/tests/gtcp_proxy/gtcp-proxy.c index 7b6312b0..b9efd5d4 100644 --- a/tests/gtcp_proxy/gtcp-proxy.c +++ b/tests/gtcp_proxy/gtcp-proxy.c @@ -223,7 +223,7 @@ int main(int argc, char **argv) } /** - * Start listening on specifed local socket; when we get a connection, + * Start listening on specified local socket; when we get a connection, * connect to specified remote server and transfer data between local * and remote server *****************************************************************************/ diff --git a/tests/gtcp_proxy/gtcp.c b/tests/gtcp_proxy/gtcp.c index 9f0fcf88..4b218a3c 100644 --- a/tests/gtcp_proxy/gtcp.c +++ b/tests/gtcp_proxy/gtcp.c @@ -69,7 +69,7 @@ int tcp_socket_create(void) } /** - * Place specifed socket in non blocking mode + * Place specified socket in non blocking mode *****************************************************************************/ void tcp_set_non_blocking(int skt) diff --git a/tests/tcp_proxy/main.c b/tests/tcp_proxy/main.c index aa276c44..1cc58889 100644 --- a/tests/tcp_proxy/main.c +++ b/tests/tcp_proxy/main.c @@ -523,7 +523,7 @@ main_loop(char *local_port, char *remote_ip, char *remote_port, int hexdump) if (i > 99) { - g_writeln("timout connecting"); + g_writeln("timeout connecting"); error = 1; } diff --git a/vnc/vnc.c b/vnc/vnc.c index 7f747918..091978e0 100644 --- a/vnc/vnc.c +++ b/vnc/vnc.c @@ -60,7 +60,7 @@ rfbEncryptBytes(char *bytes, char *passwd) int len; int passwd_bytes; - /* create password hash from passowrd */ + /* create password hash from password */ passwd_bytes = g_strlen(passwd); sha1 = ssl_sha1_info_create(); ssl_sha1_transform(sha1, "xrdp_vnc", 8); @@ -365,7 +365,7 @@ lib_mod_event(struct vnc *v, int msg, long param1, long param2, } else if (msg == 200) /* invalidate */ { - /* FrambufferUpdateRequest */ + /* FramebufferUpdateRequest */ init_stream(s, 8192); out_uint8(s, 3); out_uint8(s, 0); @@ -727,7 +727,7 @@ lib_framebuffer_update(struct vnc *v) if (error == 0) { - /* FrambufferUpdateRequest */ + /* FramebufferUpdateRequest */ init_stream(s, 8192); out_uint8(s, 3); out_uint8(s, 1); @@ -1316,7 +1316,7 @@ lib_mod_connect(struct vnc *v) if (error == 0) { - /* FrambufferUpdateRequest */ + /* FramebufferUpdateRequest */ init_stream(s, 8192); out_uint8(s, 3); out_uint8(s, 0); diff --git a/vrplayer/decoderthread.cpp b/vrplayer/decoderthread.cpp index 36ba4c85..7841a3b5 100644 --- a/vrplayer/decoderthread.cpp +++ b/vrplayer/decoderthread.cpp @@ -23,7 +23,7 @@ /* * TODO: * o need to maintain aspect ratio while resizing - * o clicking in the middle of the slider bar shuld move the slider to the middle + * o clicking in the middle of the slider bar should move the slider to the middle * o need to be able to rewind the move when it is done playing * o need to be able to load another move and play it w/o restarting player * o pause button needs to work diff --git a/xorg/X11R7.6/rdp/rdpComposite.c b/xorg/X11R7.6/rdp/rdpComposite.c index f763783e..9376a533 100644 --- a/xorg/X11R7.6/rdp/rdpComposite.c +++ b/xorg/X11R7.6/rdp/rdpComposite.c @@ -224,7 +224,7 @@ print_format(PictFormatShort format) /******************************************************************************/ static int -compsoite_print(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, +composite_print(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { @@ -233,7 +233,7 @@ compsoite_print(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, rdpPixmapRec* pSrcPriv; rdpPixmapRec* pDstPriv; - LLOGLN(0, ("compsoite_print: op %d xSrc %d ySrc %d xDst %d yDst %d " + LLOGLN(0, ("composite_print: op %d xSrc %d ySrc %d xDst %d yDst %d " "width %d height %d", op, xSrc, ySrc, xDst, yDst, width, height)); @@ -493,7 +493,7 @@ check_drawables(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, { LLOGLN(10, ("check_drawables: can not remote [%s]", g_com_fail_strings[fail_reason])); #if 0 - compsoite_print(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, + composite_print(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); #endif } @@ -501,7 +501,7 @@ check_drawables(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, { LLOGLN(10, ("check_drawables: can remote [%s]", g_com_fail_strings[fail_reason])); #if 0 - compsoite_print(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, + composite_print(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); #endif } @@ -707,7 +707,7 @@ rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, { if (pMask != 0) { - /* TODO: here we can try to send it as a gylph */ + /* TODO: here we can try to send it as a glyph */ } } } @@ -745,7 +745,7 @@ rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, post_process = 1; if (g_do_dirty_os) { - LLOGLN(10, ("rdpComposite: gettig dirty")); + LLOGLN(10, ("rdpComposite: getting dirty")); pDstPriv->is_dirty = 1; dirty_type = g_doing_font ? RDI_IMGLL : RDI_IMGLY; pDirtyPriv = pDstPriv; diff --git a/xorg/X11R7.6/rdp/rdpdraw.c b/xorg/X11R7.6/rdp/rdpdraw.c index d61375ae..51fe5c61 100644 --- a/xorg/X11R7.6/rdp/rdpdraw.c +++ b/xorg/X11R7.6/rdp/rdpdraw.c @@ -608,7 +608,7 @@ dump_draw_list(rdpPixmapRec* priv) /******************************************************************************/ /* returns boolean */ static int -region_interect_at_all(RegionPtr reg_small, RegionPtr reg_big) +region_intersect_at_all(RegionPtr reg_small, RegionPtr reg_big) { int rv; RegionRec reg; @@ -719,7 +719,7 @@ draw_item_pack(PixmapPtr pix, rdpPixmapRec *priv) { if ((di->type == RDI_TEXT) && (di_prev->type == RDI_IMGLY)) { - if (region_interect_at_all(di->reg, di_prev->reg)) + if (region_intersect_at_all(di->reg, di_prev->reg)) { di_prev->type = RDI_IMGLL; } diff --git a/xorg/X11R7.6/rdp/rdpglyph.c b/xorg/X11R7.6/rdp/rdpglyph.c index cb895ae5..f0dda8d4 100644 --- a/xorg/X11R7.6/rdp/rdpglyph.c +++ b/xorg/X11R7.6/rdp/rdpglyph.c @@ -503,7 +503,7 @@ rdp_text_chars_to_data(struct rdp_text* rtext) PictFormatPtr format; } GlyphListRec, *GlyphListPtr; */ -/* see ghyphstr.h but the follow is not in there +/* see glyphstr.h but the following is not in there typedef struct _XGlyphInfo { unsigned short width; unsigned short height; @@ -557,7 +557,7 @@ rdpGlyphu(CARD8 op, PicturePtr pSrc, PicturePtr pDst, post_process = 1; if (g_do_dirty_os) { - LLOGLN(10, ("rdpGlyphu: gettig dirty")); + LLOGLN(10, ("rdpGlyphu: getting dirty")); pDstPriv->is_dirty = 1; dirty_type = RDI_IMGLL; pDirtyPriv = pDstPriv; diff --git a/xorg/X11R7.6/rdp/rdpinput.c b/xorg/X11R7.6/rdp/rdpinput.c index 4801b79c..f221ae34 100644 --- a/xorg/X11R7.6/rdp/rdpinput.c +++ b/xorg/X11R7.6/rdp/rdpinput.c @@ -26,7 +26,7 @@ keyboard and mouse stuff flags right so control down is used to determine between pause and num lock */ /* this should be fixed in rdesktop */ -/* g_pause_spe flag for specal control sent by ms client before scan code +/* g_pause_spe flag for special control sent by ms client before scan code 69 is sent to tell that its pause, not num lock. both pause and num lock use scan code 69 */ @@ -68,7 +68,7 @@ static OsTimerPtr g_kbtimer = 0; static OsTimerPtr g_timer = 0; static int g_x = 0; static int g_y = 0; -static int g_timer_schedualed = 0; +static int g_timer_scheduled = 0; static int g_delay_motion = 1; /* turn on or off */ static int g_use_evdev = 0; @@ -238,7 +238,7 @@ rdpChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl) 0x0000042C Azeri Latin 0x0000042F FYRO Macedonian 0x00000437 Georgian -0x00000438 Faeroese +0x00000438 Faroese 0x00000439 Devanagari - INSCRIPT 0x0000043A Maltese 47-key 0x0000043B Norwegian with Sami @@ -859,7 +859,7 @@ static CARD32 rdpDeferredInputCallback(OsTimerPtr timer, CARD32 now, pointer arg) { LLOGLN(10, ("rdpDeferredInputCallback:")); - g_timer_schedualed = 0; + g_timer_scheduled = 0; if ((g_old_x != g_x) || (g_old_y != g_y)) { rdpEnqueueMotion(g_x, g_y); @@ -884,13 +884,13 @@ PtrAddEvent(int buttonMask, int x, int y) return; } send_now = (buttonMask ^ g_old_button_mask) || (g_delay_motion == 0); - LLOGLN(10, ("PtrAddEvent: send_now %d g_timer_schedualed %d", - send_now, g_timer_schedualed)); + LLOGLN(10, ("PtrAddEvent: send_now %d g_timer_scheduled %d", + send_now, g_timer_scheduled)); if (send_now) { - if (g_timer_schedualed) + if (g_timer_scheduled) { - g_timer_schedualed = 0; + g_timer_scheduled = 0; TimerCancel(g_timer); } if ((g_old_x != x) || (g_old_y != y)) @@ -923,9 +923,9 @@ PtrAddEvent(int buttonMask, int x, int y) { g_x = x; g_y = y; - if (!g_timer_schedualed) + if (!g_timer_scheduled) { - g_timer_schedualed = 1; + g_timer_scheduled = 1; g_timer = TimerSet(g_timer, 0, 60, rdpDeferredInputCallback, 0); } } diff --git a/xorg/X11R7.6/rdp/rdpkeyboardbase.c b/xorg/X11R7.6/rdp/rdpkeyboardbase.c index 1c62541d..c35a0392 100644 --- a/xorg/X11R7.6/rdp/rdpkeyboardbase.c +++ b/xorg/X11R7.6/rdp/rdpkeyboardbase.c @@ -56,7 +56,7 @@ extern int g_tab_down; /* in rdpmain.c */ #define XSCAN_KP_3 89 #define XSCAN_KP_0 90 #define XSCAN_KP_Decimal 91 -/* "/ ?" on br keybaord */ +/* "/ ?" on br keyboard */ #define XSCAN_97 97 /* ------------------------------? */ #define XSCAN_Enter 108 /* 104 */ /* on keypad */ #define XSCAN_Control_R 109 /* 105 */ @@ -81,7 +81,7 @@ extern int g_tab_down; /* in rdpmain.c */ #define XSCAN_Menu 117 /* 135 */ #define XSCAN_LMeta 156 #define XSCAN_RMeta 156 -#define XSCAN_211 211 /* "/ ?" on br keybaord, "\ _" on jp keyboard */ +#define XSCAN_211 211 /* "/ ?" on br keyboard, "\ _" on jp keyboard */ /******************************************************************************/ void @@ -279,7 +279,7 @@ KbdAddEvent_base(int down, int param1, int param2, int param3, int param4) break; case RDPSCAN_115: - rdpEnqueueKey(type, XSCAN_211); /* "/ ?" on br keybaord, "\ _" on jp keyboard */ + rdpEnqueueKey(type, XSCAN_211); /* "/ ?" on br keyboard, "\ _" on jp keyboard */ break; case RDPSCAN_126: diff --git a/xorg/X11R7.6/rdp/rdpkeyboardevdev.c b/xorg/X11R7.6/rdp/rdpkeyboardevdev.c index 770a102f..0c560c83 100644 --- a/xorg/X11R7.6/rdp/rdpkeyboardevdev.c +++ b/xorg/X11R7.6/rdp/rdpkeyboardevdev.c @@ -56,7 +56,7 @@ extern int g_tab_down; /* in rdpmain.c */ #define XSCAN_KP_3 89 #define XSCAN_KP_0 90 #define XSCAN_KP_Decimal 91 -/* "/ ?" on br keybaord */ +/* "/ ?" on br keyboard */ #define XSCAN_97 97 #define XSCAN_Enter 104 /* on keypad */ #define XSCAN_Control_R 105 @@ -278,7 +278,7 @@ KbdAddEvent_evdev(int down, int param1, int param2, int param3, int param4) break; case RDPSCAN_115: - rdpEnqueueKey(type, XSCAN_97); /* "/ ?" on br keybaord */ + rdpEnqueueKey(type, XSCAN_97); /* "/ ?" on br keyboard */ break; case RDPSCAN_126: diff --git a/xorg/X11R7.6/rdp/rdpmain.c b/xorg/X11R7.6/rdp/rdpmain.c index f173de57..95de7be0 100644 --- a/xorg/X11R7.6/rdp/rdpmain.c +++ b/xorg/X11R7.6/rdp/rdpmain.c @@ -414,7 +414,7 @@ rdpScreenInit(int index, ScreenPtr pScreen, int argc, char **argv) g_rdpScreen.CloseScreen = pScreen->CloseScreen; /* GC procedures */ g_rdpScreen.CreateGC = pScreen->CreateGC; - /* Pixmap procudures */ + /* Pixmap procedures */ g_rdpScreen.CreatePixmap = pScreen->CreatePixmap; g_rdpScreen.DestroyPixmap = pScreen->DestroyPixmap; @@ -654,7 +654,7 @@ void OsVendorInit(void) { #if XRDP_DISABLE_LINUX_ABSTRACT - /* turn off the Linux abstract unix doamin sockets TRANS_ABSTRACT */ + /* turn off the Linux abstract unix domain sockets TRANS_ABSTRACT */ /* TRANS_NOLISTEN = 1 << 3 */ _XSERVTransSocketLocalFuncs.flags = 0; #endif diff --git a/xorg/X11R7.6/rdp/rdpmisc.c b/xorg/X11R7.6/rdp/rdpmisc.c index 1d57d1fa..f8316ff8 100644 --- a/xorg/X11R7.6/rdp/rdpmisc.c +++ b/xorg/X11R7.6/rdp/rdpmisc.c @@ -254,7 +254,7 @@ g_malloc(int size, int zero) //#ifdef _XSERVER64 #if 1 - /* I thought xalloc whould work here but I guess not, why, todo */ + /* I thought xalloc would work here but I guess not, why, todo */ rv = (char *)malloc(size); #else rv = (char *)Xalloc(size); @@ -279,7 +279,7 @@ g_free(void *ptr) { //#ifdef _XSERVER64 #if 1 - /* I thought xfree whould work here but I guess not, why, todo */ + /* I thought xfree would work here but I guess not, why, todo */ free(ptr); #else Xfree(ptr); diff --git a/xorg/X11R7.6/rdp/rdpup.c b/xorg/X11R7.6/rdp/rdpup.c index 230c1538..0532d063 100644 --- a/xorg/X11R7.6/rdp/rdpup.c +++ b/xorg/X11R7.6/rdp/rdpup.c @@ -2122,7 +2122,7 @@ rdpup_send_area(struct image_data *id, int x, int y, int w, int h) safety = 0; while (RegionContainsRect(g_shm_reg, &box)) { - /* instread of rdpup_end_update, call rdpup_send_pending */ + /* instead of rdpup_end_update, call rdpup_send_pending */ rdpup_send_pending(); rdpup_begin_update(); safety++; diff --git a/xorg/tests/xdemo/bmp_parser.c b/xorg/tests/xdemo/bmp_parser.c index 66c050d8..60d86864 100644 --- a/xorg/tests/xdemo/bmp_parser.c +++ b/xorg/tests/xdemo/bmp_parser.c @@ -70,7 +70,7 @@ int parse_bmp(char *filename, struct pic_info *pic_info) if ((fd = open(filename, O_RDONLY)) < 0) { - printf("error opeing %s\n", filename); + printf("error opening %s\n", filename); return -1; } diff --git a/xrdp/xrdp.c b/xrdp/xrdp.c index c70c37c7..12fcb2fa 100644 --- a/xrdp/xrdp.c +++ b/xrdp/xrdp.c @@ -34,7 +34,7 @@ static long g_sync_mutex = 0; static long g_sync1_mutex = 0; static tbus g_term_event = 0; static tbus g_sync_event = 0; -/* syncronize stuff */ +/* synchronize stuff */ static int g_sync_command = 0; static long g_sync_result = 0; static long g_sync_param1 = 0; diff --git a/xrdp/xrdp_cache.c b/xrdp/xrdp_cache.c index 834271db..d4133325 100644 --- a/xrdp/xrdp_cache.c +++ b/xrdp/xrdp_cache.c @@ -79,7 +79,7 @@ xrdp_cache_reset_crc(struct xrdp_cache *self) { for (jndex = 0; jndex < 64 * 1024; jndex++) { - /* it's ok to deinit a zero'ed out struct list16 */ + /* it's ok to deinit a zeroed out struct list16 */ list16_deinit(&(self->crc16[index][jndex])); list16_init(&(self->crc16[index][jndex])); } @@ -684,7 +684,7 @@ xrdp_cache_add_pointer(struct xrdp_cache *self, } /*****************************************************************************/ -/* this does not take owership of pointer_item, it makes a copy */ +/* this does not take ownership of pointer_item, it makes a copy */ int APP_CC xrdp_cache_add_pointer_static(struct xrdp_cache *self, struct xrdp_pointer_item *pointer_item, @@ -716,7 +716,7 @@ xrdp_cache_add_pointer_static(struct xrdp_cache *self, } /*****************************************************************************/ -/* this does not take owership of brush_item_data, it makes a copy */ +/* this does not take ownership of brush_item_data, it makes a copy */ int APP_CC xrdp_cache_add_brush(struct xrdp_cache *self, char *brush_item_data) diff --git a/xrdp/xrdp_encoder.c b/xrdp/xrdp_encoder.c index 2b96d803..18aa6a15 100644 --- a/xrdp/xrdp_encoder.c +++ b/xrdp/xrdp_encoder.c @@ -111,7 +111,7 @@ xrdp_encoder_create(struct xrdp_mm *mm) return 0; } - LLOGLN(0, ("init_xrdp_encoder: initing encoder codec_id %d", self->codec_id)); + LLOGLN(0, ("init_xrdp_encoder: initializing encoder codec_id %d", self->codec_id)); /* setup required FIFOs */ self->fifo_to_proc = fifo_create(); diff --git a/xrdp/xrdp_keyboard.ini b/xrdp/xrdp_keyboard.ini index 032b9d3e..0f1a28cb 100644 --- a/xrdp/xrdp_keyboard.ini +++ b/xrdp/xrdp_keyboard.ini @@ -40,8 +40,8 @@ # default [default] -# keyboard_type and keyboard_subtype is not readed for default section. It -# is only as a place holder to keep consistency. Default model/variant are +# keyboard_type and keyboard_subtype is not read for default section. It +# is only a placeholder to keep consistency. Default model/variant are # platform dependent, and could be overridden if needed. keyboard_type=0 keyboard_subtype=0 diff --git a/xrdp/xrdp_process.c b/xrdp/xrdp_process.c index 7d9c3a14..6cb9ea02 100644 --- a/xrdp/xrdp_process.c +++ b/xrdp/xrdp_process.c @@ -202,7 +202,7 @@ xrdp_process_main_loop(struct xrdp_process *self) /* this function is just above */ self->session->is_term = xrdp_is_term; - if (libxrdp_process_incomming(self->session) == 0) + if (libxrdp_process_incoming(self->session) == 0) { init_stream(self->server_trans->in_s, 32 * 1024); @@ -253,7 +253,7 @@ xrdp_process_main_loop(struct xrdp_process *self) } else { - g_writeln("xrdp_process_main_loop: libxrdp_process_incomming failed"); + g_writeln("xrdp_process_main_loop: libxrdp_process_incoming failed"); /* this will try to send a disconnect, maybe should check that connection got far enough */ libxrdp_disconnect(self->session); diff --git a/xrdp/xrdp_types.h b/xrdp/xrdp_types.h index a2a4d5fd..6230d678 100644 --- a/xrdp/xrdp_types.h +++ b/xrdp/xrdp_types.h @@ -223,7 +223,7 @@ struct xrdp_brush_item /* moved to xrdp_constants.h #define XRDP_BITMAP_CACHE_ENTRIES 2048 */ -/* differnce caches */ +/* difference caches */ struct xrdp_cache { struct xrdp_wm* wm; /* owner */ diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c index 806a2532..362d0d0a 100644 --- a/xrdp/xrdp_wm.c +++ b/xrdp/xrdp_wm.c @@ -870,7 +870,7 @@ xrdp_wm_bitblt(struct xrdp_wm *self, } /*****************************************************************************/ -/* return true is rect is totaly exposed going in reverse z order */ +/* return true if rect is totally exposed going in reverse z order */ /* from wnd up */ static int APP_CC xrdp_wm_is_rect_vis(struct xrdp_wm *self, struct xrdp_bitmap *wnd, diff --git a/xrdp/xrdpwin.c b/xrdp/xrdpwin.c index f3ef1074..99eb5c76 100644 --- a/xrdp/xrdpwin.c +++ b/xrdp/xrdpwin.c @@ -34,7 +34,7 @@ static long g_sync_mutex = 0; static long g_sync1_mutex = 0; static tbus g_term_event = 0; static tbus g_sync_event = 0; -/* syncronize stuff */ +/* synchronize stuff */ static int g_sync_command = 0; static long g_sync_result = 0; static long g_sync_param1 = 0; diff --git a/xrdpapi/xrdpapi.c b/xrdpapi/xrdpapi.c index 974a094c..13f8e584 100644 --- a/xrdpapi/xrdpapi.c +++ b/xrdpapi/xrdpapi.c @@ -118,7 +118,7 @@ WTSVirtualChannelOpenEx(unsigned int SessionId, const char *pVirtualName, if (wts->display_num <= 0) { - LLOGLN(0, ("WTSVirtualChannelOpenEx: fatal errror; display is 0")); + LLOGLN(0, ("WTSVirtualChannelOpenEx: fatal error; display is 0")); free(wts); return NULL; } diff --git a/xrdpvr/xrdpvr.c b/xrdpvr/xrdpvr.c index 6147a66e..8de52be8 100644 --- a/xrdpvr/xrdpvr.c +++ b/xrdpvr/xrdpvr.c @@ -194,7 +194,7 @@ xrdpvr_play_media(void *channel, int stream_id, char *filename) //if (avformat_find_stream_info(g_psi.p_format_ctx, NULL) < 0) if (av_find_stream_info(g_psi.p_format_ctx) < 0) { - printf("ERRRO reading stream info\n"); + printf("ERROR reading stream info\n"); return -1; } From 50cbf01044474b6828a772b2d45dc8c661a6ccb7 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sun, 14 Feb 2016 10:27:17 -0800 Subject: [PATCH 14/16] 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. --- sesman/tools/sesadmin.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sesman/tools/sesadmin.c b/sesman/tools/sesadmin.c index fcf995d8..3415b75b 100644 --- a/sesman/tools/sesadmin.c +++ b/sesman/tools/sesadmin.c @@ -101,7 +101,14 @@ int main(int argc, char **argv) if (0 == g_strncmp(user, "", 1)) { - g_strncpy(user, "root", 256); + cmndHelp(); + return 0; + } + + if (0 == g_strncmp(cmnd, "", 1)) + { + cmndHelp(); + return 0; } if (0 == g_strncmp(pass, "", 1)) @@ -171,7 +178,7 @@ void cmndHelp() fprintf(stderr, "sesadmin - a console sesman administration tool\n"); fprintf(stderr, "syntax: sesadmin [] COMMAND [OPTIONS]\n\n"); fprintf(stderr, "-u=: username to connect to sesman [MANDATORY]\n"); - fprintf(stderr, "-p=: password to connect to sesman [MANDATORY]\n"); + fprintf(stderr, "-p=: password to connect to sesman (asked if not given)\n"); fprintf(stderr, "-s=: sesman host (default is localhost)\n"); fprintf(stderr, "-i= : sesman port (default 3350)\n"); fprintf(stderr, "-c= : command to execute on the server [MANDATORY]\n"); From 3ad28e1130b18dd651457078f10c43dc7b67ed58 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 20 Feb 2016 01:47:46 -0800 Subject: [PATCH 15/16] Add m4 directory to EXTRA_DIST, not all Automake versions package it --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 36072479..84a6eb47 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I m4 AM_DISTCHECK_CONFIGURE_FLAGS = --without-systemdsystemunitdir EXTRA_DIST = bootstrap COPYING coding_style.md design.txt faq-compile.txt \ - faq-general.txt file-loc.txt install.txt prog_std.txt readme.txt + faq-general.txt file-loc.txt install.txt m4 prog_std.txt readme.txt if XRDP_NEUTRINORDP NEUTRINORDPDIR = neutrinordp From 59a5fb0ddbb05623abd7fe742be4321e0beffb0a Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sun, 21 Feb 2016 21:49:04 -0800 Subject: [PATCH 16/16] Move headers from EXTRA_DIST to sources, sort alphabetically There should be no functional difference. --- common/Makefile.am | 44 +++++++++++++++++----------------- libxrdp/Makefile.am | 21 +++++++++-------- mc/Makefile.am | 6 ++--- neutrinordp/Makefile.am | 6 +++-- rdp/Makefile.am | 2 +- sesman/Makefile.am | 20 ++++++++++++---- sesman/chansrv/Makefile.am | 48 ++++++++++++++++++-------------------- sesman/libscp/Makefile.am | 23 ++++++++++++++---- sesman/tools/Makefile.am | 5 ++-- vnc/Makefile.am | 6 ++--- xrdp/Makefile.am | 12 ++++++---- xrdpapi/Makefile.am | 5 ++-- xrdpvr/Makefile.am | 5 ++-- xup/Makefile.am | 6 ++--- 14 files changed, 115 insertions(+), 94 deletions(-) diff --git a/common/Makefile.am b/common/Makefile.am index cc72b22b..cbd3001c 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -1,24 +1,3 @@ -EXTRA_DIST = \ - arch.h \ - defines.h \ - file.h \ - file_loc.h \ - list.h \ - list16.h \ - fifo.h \ - log.h \ - os_calls.h \ - os_calls.h \ - parse.h \ - rail.h \ - ssl_calls.h \ - thread_calls.h \ - trans.h \ - xrdp_client_info.h \ - xrdp_constants.h \ - xrdp_rail.h \ - crc16.h - AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ @@ -30,15 +9,34 @@ module_LTLIBRARIES = \ libcommon.la libcommon_la_SOURCES = \ + arch.h \ + crc16.h \ + defines.h \ + fifo.c \ + fifo.h \ file.c \ + file.h \ + file_loc.h \ list.c \ + list.h \ list16.c \ - fifo.c \ + list16.h \ log.c \ + log.h \ os_calls.c \ + os_calls.h \ + os_calls.h \ + parse.h \ + rail.h \ ssl_calls.c \ + ssl_calls.h \ thread_calls.c \ - trans.c + thread_calls.h \ + trans.c \ + trans.h \ + xrdp_client_info.h \ + xrdp_constants.h \ + xrdp_rail.h libcommon_la_LIBADD = \ -lcrypto \ diff --git a/libxrdp/Makefile.am b/libxrdp/Makefile.am index ade99c65..d1c37fb0 100644 --- a/libxrdp/Makefile.am +++ b/libxrdp/Makefile.am @@ -1,5 +1,3 @@ -EXTRA_DIST = libxrdp.h libxrdpinc.h xrdp_orders_rail.h - EXTRA_DEFINES = EXTRA_INCLUDES = EXTRA_LIBS = @@ -42,19 +40,22 @@ module_LTLIBRARIES = \ libxrdp_la_SOURCES = \ libxrdp.c \ + libxrdp.h \ + libxrdpinc.h \ + xrdp_bitmap32_compress.c \ + xrdp_bitmap_compress.c \ + xrdp_caps.c \ xrdp_channel.c \ + xrdp_fastpath.c \ xrdp_iso.c \ + xrdp_jpeg_compress.c \ xrdp_mcs.c \ + xrdp_mppc_enc.c \ xrdp_orders.c \ - xrdp_rdp.c \ - xrdp_sec.c \ - xrdp_bitmap_compress.c \ - xrdp_bitmap32_compress.c \ - xrdp_jpeg_compress.c \ xrdp_orders_rail.c \ - xrdp_mppc_enc.c \ - xrdp_fastpath.c \ - xrdp_caps.c + xrdp_orders_rail.h \ + xrdp_rdp.c \ + xrdp_sec.c libxrdp_la_LDFLAGS = \ $(EXTRA_FLAGS) diff --git a/mc/Makefile.am b/mc/Makefile.am index b636a09d..e705ff0d 100644 --- a/mc/Makefile.am +++ b/mc/Makefile.am @@ -1,5 +1,3 @@ -EXTRA_DIST = mc.h - AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ @@ -10,7 +8,9 @@ AM_CPPFLAGS = \ module_LTLIBRARIES = \ libmc.la -libmc_la_SOURCES = mc.c +libmc_la_SOURCES = \ + mc.c \ + mc.h libmc_la_LIBADD = \ $(top_builddir)/common/libcommon.la diff --git a/neutrinordp/Makefile.am b/neutrinordp/Makefile.am index 932ddc78..83504b28 100644 --- a/neutrinordp/Makefile.am +++ b/neutrinordp/Makefile.am @@ -1,4 +1,3 @@ -EXTRA_DIST = xrdp-neutrinordp.h EXTRA_DEFINES = if XRDP_DEBUG @@ -19,7 +18,10 @@ AM_CPPFLAGS = \ module_LTLIBRARIES = \ libxrdpneutrinordp.la -libxrdpneutrinordp_la_SOURCES = xrdp-neutrinordp.c xrdp-color.c +libxrdpneutrinordp_la_SOURCES = \ + xrdp-color.c \ + xrdp-neutrinordp.c \ + xrdp-neutrinordp.h libxrdpneutrinordp_la_LIBADD = \ $(top_builddir)/common/libcommon.la \ diff --git a/rdp/Makefile.am b/rdp/Makefile.am index 72c31101..5ae15786 100644 --- a/rdp/Makefile.am +++ b/rdp/Makefile.am @@ -1,4 +1,3 @@ -EXTRA_DIST = rdp.h EXTRA_DEFINES = if XRDP_DEBUG @@ -20,6 +19,7 @@ module_LTLIBRARIES = \ librdp_la_SOURCES = \ rdp.c \ + rdp.h \ rdp_bitmap.c \ rdp_iso.c \ rdp_lic.c \ diff --git a/sesman/Makefile.am b/sesman/Makefile.am index 979f72d9..c40112aa 100644 --- a/sesman/Makefile.am +++ b/sesman/Makefile.am @@ -1,6 +1,5 @@ -EXTRA_DIST = sesman.ini startwm.sh sesman.h access.h auth.h config.h env.h \ -scp.h scp_v0.h scp_v1.h scp_v1_mng.h session.h sig.h +EXTRA_DIST = sesman.ini startwm.sh AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ @@ -37,16 +36,27 @@ sbin_PROGRAMS = \ xrdp-sesman xrdp_sesman_SOURCES = \ + access.c \ + access.h \ + auth.h \ + config.c \ + config.h \ + env.c \ + env.h \ scp.c \ + scp.h \ scp_v0.c \ + scp_v0.h \ scp_v1.c \ + scp_v1.h \ scp_v1_mng.c \ + scp_v1_mng.h \ sesman.c \ + sesman.h \ session.c \ + session.h \ sig.c \ - access.c \ - config.c \ - env.c \ + sig.h \ $(AUTH_C) xrdp_sesman_LDADD = \ diff --git a/sesman/chansrv/Makefile.am b/sesman/chansrv/Makefile.am index 45397b73..45597e12 100644 --- a/sesman/chansrv/Makefile.am +++ b/sesman/chansrv/Makefile.am @@ -1,21 +1,3 @@ -EXTRA_DIST = \ - chansrv.h \ - chansrv_fuse.h \ - clipboard.h \ - clipboard_common.h \ - clipboard_file.h \ - devredir.h \ - drdynvc.h \ - rail.h \ - sound.h \ - xcommon.h \ - mlog.h \ - chansrv_common.h \ - irp.h \ - smartcard.h \ - smartcard_pcsc.h \ - fifo.h - EXTRA_DEFINES = EXTRA_INCLUDES = EXTRA_LIBS = @@ -47,19 +29,35 @@ sbin_PROGRAMS = \ xrdp_chansrv_SOURCES = \ chansrv.c \ - sound.c \ + chansrv.h \ + chansrv_common.c \ + chansrv_common.h \ + chansrv_fuse.c \ + chansrv_fuse.h \ clipboard.c \ + clipboard.h \ + clipboard_common.h \ clipboard_file.c \ + clipboard_file.h \ devredir.c \ + devredir.h \ + drdynvc.c \ + drdynvc.h \ + fifo.c \ + fifo.h \ + irp.c \ + irp.h \ + mlog.h \ + rail.c \ + rail.h \ smartcard.c \ + smartcard.h \ smartcard_pcsc.c \ - rail.c \ + smartcard_pcsc.h \ + sound.c \ + sound.h \ xcommon.c \ - drdynvc.c \ - chansrv_fuse.c \ - irp.c \ - fifo.c \ - chansrv_common.c + xcommon.h xrdp_chansrv_LDFLAGS = \ $(X_LIBS) \ diff --git a/sesman/libscp/Makefile.am b/sesman/libscp/Makefile.am index 627a3370..1bb89910 100644 --- a/sesman/libscp/Makefile.am +++ b/sesman/libscp/Makefile.am @@ -1,6 +1,3 @@ -EXTRA_DIST = libscp_connection.h libscp_commands.h libscp.h libscp_session.h libscp_types_mng.h libscp_v1c_mng.h libscp_vX.h libscp_commands_mng.h libscp_init.h libscp_tcp.h libscp_v0.h libscp_v1s.h libscp_lock.h \ -libscp_types.h libscp_v1c.h libscp_v1s_mng.h - AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ @@ -12,17 +9,33 @@ module_LTLIBRARIES = \ libscp.la libscp_la_SOURCES = \ + libscp.h \ + libscp_commands.h \ + libscp_commands_mng.h \ libscp_connection.c \ + libscp_connection.h \ libscp_init.c \ + libscp_init.h \ libscp_lock.c \ + libscp_lock.h \ libscp_session.c \ + libscp_session.h \ libscp_tcp.c \ + libscp_tcp.h \ + libscp_types.h \ + libscp_types_mng.h \ libscp_v0.c \ + libscp_v0.h \ libscp_v1c.c \ - libscp_v1s.c \ + libscp_v1c.h \ libscp_v1c_mng.c \ + libscp_v1c_mng.h \ + libscp_v1s.c \ + libscp_v1s.h \ libscp_v1s_mng.c \ - libscp_vX.c + libscp_v1s_mng.h \ + libscp_vX.c \ + libscp_vX.h libscp_la_LIBADD = \ $(top_builddir)/common/libcommon.la \ diff --git a/sesman/tools/Makefile.am b/sesman/tools/Makefile.am index 066039b0..44bf068b 100644 --- a/sesman/tools/Makefile.am +++ b/sesman/tools/Makefile.am @@ -1,5 +1,3 @@ -EXTRA_DIST = tcp.h - AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ @@ -21,9 +19,10 @@ noinst_PROGRAMS = \ xrdp-xcon xrdp_sesrun_SOURCES = \ + config.c \ sesrun.c \ tcp.c \ - config.c + tcp.h xrdp_sestest_SOURCES = \ sestest.c diff --git a/vnc/Makefile.am b/vnc/Makefile.am index 9d37c6da..453022f4 100644 --- a/vnc/Makefile.am +++ b/vnc/Makefile.am @@ -1,5 +1,3 @@ -EXTRA_DIST = vnc.h - AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ @@ -10,7 +8,9 @@ AM_CPPFLAGS = \ module_LTLIBRARIES = \ libvnc.la -libvnc_la_SOURCES = vnc.c +libvnc_la_SOURCES = \ + vnc.c \ + vnc.h libvnc_la_LIBADD = \ $(top_builddir)/common/libcommon.la diff --git a/xrdp/Makefile.am b/xrdp/Makefile.am index f20cda69..d9fc2a67 100644 --- a/xrdp/Makefile.am +++ b/xrdp/Makefile.am @@ -1,5 +1,4 @@ -EXTRA_DIST = xrdp.ini ad24b.bmp ad256.bmp xrdp24b.bmp xrdp256.bmp xrdp_logo.bmp sans-10.fv1 cursor0.cur cursor1.cur xrdp.h xrdp_types.h \ -xrdp_encoder.h xrdp_keyboard.ini +EXTRA_DIST = $(xrdpsysconf_DATA) $(xrdppkgdata_DATA) EXTRA_INCLUDES = EXTRA_LIBS = @@ -35,9 +34,12 @@ sbin_PROGRAMS = \ xrdp_SOURCES = \ funcs.c \ lang.c \ - xrdp_bitmap.c \ xrdp.c \ + xrdp.h \ + xrdp_bitmap.c \ xrdp_cache.c \ + xrdp_encoder.c \ + xrdp_encoder.h \ xrdp_font.c \ xrdp_listen.c \ xrdp_login_wnd.c \ @@ -45,8 +47,8 @@ xrdp_SOURCES = \ xrdp_painter.c \ xrdp_process.c \ xrdp_region.c \ - xrdp_wm.c \ - xrdp_encoder.c + xrdp_types.h \ + xrdp_wm.c xrdp_LDADD = \ $(top_builddir)/common/libcommon.la \ diff --git a/xrdpapi/Makefile.am b/xrdpapi/Makefile.am index 30001b2a..59f58b52 100644 --- a/xrdpapi/Makefile.am +++ b/xrdpapi/Makefile.am @@ -1,5 +1,3 @@ -EXTRA_DIST = xrdpapi.h - EXTRA_DEFINES = EXTRA_INCLUDES = EXTRA_LIBS = @@ -13,7 +11,8 @@ module_LTLIBRARIES = \ libxrdpapi.la libxrdpapi_la_SOURCES = \ - xrdpapi.c + xrdpapi.c \ + xrdpapi.h libxrdpapi_la_LDFLAGS = \ $(EXTRA_FLAGS) diff --git a/xrdpvr/Makefile.am b/xrdpvr/Makefile.am index 0f2b7cbc..dd7b5601 100644 --- a/xrdpvr/Makefile.am +++ b/xrdpvr/Makefile.am @@ -1,5 +1,3 @@ -EXTRA_DIST = xrdpvr.h - EXTRA_DEFINES = EXTRA_INCLUDES = EXTRA_LIBS = @@ -13,7 +11,8 @@ module_LTLIBRARIES = \ libxrdpvr.la libxrdpvr_la_SOURCES = \ - xrdpvr.c + xrdpvr.c \ + xrdpvr.h libxrdpvr_la_LDFLAGS = \ $(EXTRA_FLAGS) diff --git a/xup/Makefile.am b/xup/Makefile.am index 7669a55f..cdaca15c 100644 --- a/xup/Makefile.am +++ b/xup/Makefile.am @@ -1,5 +1,3 @@ -EXTRA_DIST = xup.h - AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ @@ -10,7 +8,9 @@ AM_CPPFLAGS = \ module_LTLIBRARIES = \ libxup.la -libxup_la_SOURCES = xup.c +libxup_la_SOURCES = \ + xup.c \ + xup.h libxup_la_LIBADD = \ $(top_builddir)/common/libcommon.la