diff --git a/.gitignore b/.gitignore index 0437bf57..c76bc4f9 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,12 @@ config.log config.status config.sub configure -compile depcomp .deps/ +genkeymap/xrdp-genkeymap install-sh +instfiles/pam.d/xrdp-sesman +keygen/xrdp-keygen *.la .libs libtool @@ -22,18 +25,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/Coding_Style.odt b/Coding_Style.odt deleted file mode 100644 index 23aeef12..00000000 Binary files a/Coding_Style.odt and /dev/null differ diff --git a/Makefile.am b/Makefile.am index 8e6e18b8..84a6eb47 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,8 @@ ACLOCAL_AMFLAGS = -I m4 AM_DISTCHECK_CONFIGURE_FLAGS = --without-systemdsystemunitdir -EXTRA_DIST = bootstrap COPYING design.txt faq-compile.txt faq-general.txt file-loc.txt install.txt prog_std.txt readme.txt +EXTRA_DIST = bootstrap COPYING coding_style.md design.txt faq-compile.txt \ + faq-general.txt file-loc.txt install.txt m4 prog_std.txt readme.txt if XRDP_NEUTRINORDP NEUTRINORDPDIR = neutrinordp diff --git a/coding_style.md b/coding_style.md new file mode 100644 index 00000000..584dac78 --- /dev/null +++ b/coding_style.md @@ -0,0 +1,195 @@ +XRdp Coding Style +================= + +The coding style used by XRdp is described below. + +The XRdp project uses astyle (artistic style) to format the code. Astyle +requires a configuration file that describes how you want your code +formatted. This file is present in the XRdp root directory and is named +`astyle_config.as`. + +Here is how we run the astyle command: + + astyle --options=/path/to/file/astyle_config.as "*.c" + +This coding style is a work in progress and is still evolving. + + +Indentation +----------- + +* 4 spaces per indent +* No tabs for any indents + +☞ + + if (fd < 0) + { + return -1; + } + + +Line wrapping +------------- + +* Keep lines shorter than 80 chars +* Align wrapped argument to the first argument + +☞ + + log_message("connection aborted: error %d", + ret); + + +Variable names +-------------- + +* Use lowercase with underscores as needed +* Don't use camelCase + +☞ + + int fd; + int bytes_in_stream; + + +Variable declaration +-------------------- + +* Each variable is declared on a separate line + +☞ + + int i; + int j; + + +Whitespace +---------- + +* Use blank lines to group statements +* Use at most one empty line between statements +* For pointers and references, use a single space before * or & but not after +* Use one space after a cast +* No space before square brackets + +☞ + + char *cptr; + int *iptr; + cptr = (char *) malloc(1024); + + write(fd, &buf[12], 16); + + +Function declarations +--------------------- + +* Use newline before function name + +☞ + + static int + value_ok(int val) + { + return (val >= 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"); + } diff --git a/common/Makefile.am b/common/Makefile.am index c8501586..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}\" \ @@ -26,19 +5,38 @@ AM_CPPFLAGS = \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -DXRDP_LOG_PATH=\"${localstatedir}/log\" -lib_LTLIBRARIES = \ +module_LTLIBRARIES = \ libcommon.la libcommon_la_SOURCES = \ - file.c \ - list.c \ - list16.c \ + arch.h \ + crc16.h \ + defines.h \ fifo.c \ + fifo.h \ + file.c \ + file.h \ + file_loc.h \ + list.c \ + list.h \ + list16.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/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/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/configure.ac b/configure.ac index efb307ac..80fad1c3 100644 --- a/configure.ac +++ b/configure.ac @@ -3,13 +3,16 @@ 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 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 @@ -223,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/fontdump/.gitignore b/fontdump/.gitignore new file mode 100644 index 00000000..24600083 --- /dev/null +++ b/fontdump/.gitignore @@ -0,0 +1 @@ +!Makefile 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 # 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 diff --git a/libxrdp/Makefile.am b/libxrdp/Makefile.am index 5b89b0c3..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 = @@ -37,24 +35,27 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/common \ $(EXTRA_INCLUDES) -lib_LTLIBRARIES = \ +module_LTLIBRARIES = \ libxrdp.la libxrdp_la_SOURCES = \ libxrdp.c \ - xrdp_channel.c \ - xrdp_iso.c \ - xrdp_mcs.c \ - xrdp_orders.c \ - xrdp_rdp.c \ - xrdp_sec.c \ - xrdp_bitmap_compress.c \ + libxrdp.h \ + libxrdpinc.h \ xrdp_bitmap32_compress.c \ - xrdp_jpeg_compress.c \ - xrdp_orders_rail.c \ - xrdp_mppc_enc.c \ + xrdp_bitmap_compress.c \ + xrdp_caps.c \ + xrdp_channel.c \ xrdp_fastpath.c \ - xrdp_caps.c + xrdp_iso.c \ + xrdp_jpeg_compress.c \ + xrdp_mcs.c \ + xrdp_mppc_enc.c \ + xrdp_orders.c \ + xrdp_orders_rail.c \ + xrdp_orders_rail.h \ + xrdp_rdp.c \ + xrdp_sec.c libxrdp_la_LDFLAGS = \ $(EXTRA_FLAGS) 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/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/mc/Makefile.am b/mc/Makefile.am index f56dac5f..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}\" \ @@ -7,10 +5,12 @@ AM_CPPFLAGS = \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common -lib_LTLIBRARIES = \ +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 58fe9bc2..83504b28 100644 --- a/neutrinordp/Makefile.am +++ b/neutrinordp/Makefile.am @@ -1,4 +1,3 @@ -EXTRA_DIST = xrdp-neutrinordp.h EXTRA_DEFINES = if XRDP_DEBUG @@ -16,10 +15,13 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/common \ $(FREERDP_CFLAGS) -lib_LTLIBRARIES = \ +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/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/rdp/Makefile.am b/rdp/Makefile.am index 6d23b287..5ae15786 100644 --- a/rdp/Makefile.am +++ b/rdp/Makefile.am @@ -1,4 +1,3 @@ -EXTRA_DIST = rdp.h EXTRA_DEFINES = if XRDP_DEBUG @@ -15,11 +14,12 @@ AM_CPPFLAGS = \ $(EXTRA_DEFINES) \ -I$(top_srcdir)/common -lib_LTLIBRARIES = \ +module_LTLIBRARIES = \ librdp.la 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 = \ - scp.c \ - scp_v0.c \ - scp_v1.c \ - scp_v1_mng.c \ - sesman.c \ - session.c \ - sig.c \ 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 \ + sig.h \ $(AUTH_C) xrdp_sesman_LDADD = \ 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/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 \ - clipboard.c \ - clipboard_file.c \ - devredir.c \ - smartcard.c \ - smartcard_pcsc.c \ - rail.c \ - xcommon.c \ - drdynvc.c \ + chansrv.h \ + chansrv_common.c \ + chansrv_common.h \ chansrv_fuse.c \ - irp.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 \ - chansrv_common.c + fifo.h \ + irp.c \ + irp.h \ + mlog.h \ + rail.c \ + rail.h \ + smartcard.c \ + smartcard.h \ + smartcard_pcsc.c \ + smartcard_pcsc.h \ + sound.c \ + sound.h \ + xcommon.c \ + xcommon.h xrdp_chansrv_LDFLAGS = \ $(X_LIBS) \ 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/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/.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/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/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/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/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/Makefile.am b/sesman/libscp/Makefile.am index 3172f2cb..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}\" \ @@ -8,21 +5,37 @@ AM_CPPFLAGS = \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common -lib_LTLIBRARIES = \ +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/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/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/sesman/sesman.c b/sesman/sesman.c index 924a7ae8..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")) || @@ -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/session.c b/sesman/session.c index 8c3ccc17..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) @@ -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; diff --git a/sesman/sig.c b/sesman/sig.c index 72892fb2..d881515b 100644 --- a/sesman/sig.c +++ b/sesman/sig.c @@ -93,13 +93,13 @@ 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); /* 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/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 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/sesman/tools/sesadmin.c b/sesman/tools/sesadmin.c index 203bc023..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)) @@ -168,10 +175,10 @@ 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, "-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"); 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/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 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/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/Makefile.am b/vnc/Makefile.am index a9a3aa14..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}\" \ @@ -7,10 +5,12 @@ AM_CPPFLAGS = \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common -lib_LTLIBRARIES = \ +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/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/.gitignore b/xorg/.gitignore new file mode 100644 index 00000000..24600083 --- /dev/null +++ b/xorg/.gitignore @@ -0,0 +1 @@ +!Makefile 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/Makefile.am b/xrdp/Makefile.am index 308f01a4..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 = @@ -22,7 +21,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 \ @@ -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/xrdp/xrdp.c b/xrdp/xrdp.c index 690508cb..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; @@ -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) { 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_mm.c b/xrdp/xrdp_mm.c index 26e5c028..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); @@ -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/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/Makefile.am b/xrdpapi/Makefile.am index 8107ffeb..59f58b52 100644 --- a/xrdpapi/Makefile.am +++ b/xrdpapi/Makefile.am @@ -1,5 +1,3 @@ -EXTRA_DIST = xrdpapi.h - EXTRA_DEFINES = EXTRA_INCLUDES = EXTRA_LIBS = @@ -9,11 +7,12 @@ AM_CPPFLAGS = \ $(EXTRA_DEFINES) \ $(EXTRA_INCLUDES) -lib_LTLIBRARIES = \ +module_LTLIBRARIES = \ libxrdpapi.la libxrdpapi_la_SOURCES = \ - xrdpapi.c + xrdpapi.c \ + xrdpapi.h libxrdpapi_la_LDFLAGS = \ $(EXTRA_FLAGS) 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/Makefile.am b/xrdpvr/Makefile.am index f232ce41..dd7b5601 100644 --- a/xrdpvr/Makefile.am +++ b/xrdpvr/Makefile.am @@ -1,5 +1,3 @@ -EXTRA_DIST = xrdpvr.h - EXTRA_DEFINES = EXTRA_INCLUDES = EXTRA_LIBS = @@ -9,11 +7,12 @@ AM_CPPFLAGS = \ $(EXTRA_DEFINES) \ $(EXTRA_INCLUDES) -lib_LTLIBRARIES = \ +module_LTLIBRARIES = \ libxrdpvr.la libxrdpvr_la_SOURCES = \ - xrdpvr.c + xrdpvr.c \ + xrdpvr.h libxrdpvr_la_LDFLAGS = \ $(EXTRA_FLAGS) 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; } diff --git a/xup/Makefile.am b/xup/Makefile.am index d7017b42..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}\" \ @@ -7,10 +5,12 @@ AM_CPPFLAGS = \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common -lib_LTLIBRARIES = \ +module_LTLIBRARIES = \ libxup.la -libxup_la_SOURCES = xup.c +libxup_la_SOURCES = \ + xup.c \ + xup.h libxup_la_LIBADD = \ $(top_builddir)/common/libcommon.la 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; }