Branch: ulab-next-nosound

a7e9bd1a 2019-03-17 05:17:58 Pavel Roskin
Check return value of scp_session_set_bpp()
M sesman/libscp/libscp_v0.c
M sesman/libscp/libscp_v1s.c

sesman/libscp/libscp_v0.c

diff --git a/sesman/libscp/libscp_v0.c b/sesman/libscp/libscp_v0.c
index 8cf1340..7fbdd2e 100644
--- a/sesman/libscp/libscp_v0.c
+++ b/sesman/libscp/libscp_v0.c
@@ -252,7 +252,14 @@
         scp_session_set_height(session, sz);
         /* bpp */
         in_uint16_be(c->in_s, sz);
-        scp_session_set_bpp(session, (tui8)sz);
+        if (0 != scp_session_set_bpp(session, (tui8)sz))
+        {
+            scp_session_destroy(session);
+            log_message(LOG_LEVEL_WARNING,
+                        "[v0:%d] connection aborted: unsupported bpp: %d",
+                        __LINE__, (tui8)sz);
+            return SCP_SERVER_STATE_INTERNAL_ERR;
+        }
 
         if (s_check_rem(c->in_s, 2))
         {

sesman/libscp/libscp_v1s.c

diff --git a/sesman/libscp/libscp_v1s.c b/sesman/libscp/libscp_v1s.c
index fb13743..ac370ad 100644
--- a/sesman/libscp/libscp_v1s.c
+++ b/sesman/libscp/libscp_v1s.c
@@ -131,6 +131,14 @@
     in_uint16_be(c->in_s, cmd);
     scp_session_set_height(session, cmd);
     in_uint8(c->in_s, sz);
+    if (0 != scp_session_set_bpp(session, sz))
+    {
+        scp_session_destroy(session);
+        log_message(LOG_LEVEL_WARNING,
+                    "[v1s:%d] connection aborted: unsupported bpp: %d",
+                    __LINE__, sz);
+        return SCP_SERVER_STATE_INTERNAL_ERR;
+    }
     scp_session_set_bpp(session, sz);
     in_uint8(c->in_s, sz);
     scp_session_set_rsr(session, sz);
306bd8bd 2019-03-17 05:17:58 Pavel Roskin
Allow sessions with 32 bpp
M sesman/libscp/libscp_session.c

sesman/libscp/libscp_session.c

diff --git a/sesman/libscp/libscp_session.c b/sesman/libscp/libscp_session.c
index d25fc64..1de615c 100644
--- a/sesman/libscp/libscp_session.c
+++ b/sesman/libscp/libscp_session.c
@@ -137,6 +137,7 @@
         case 15:
         case 16:
         case 24:
+        case 32:
             s->bpp = bpp;
         default:
             return 1;
aedc251a 2019-03-17 05:17:58 Pavel Roskin
vnc: enable 32 bpp support for Xvnc, it actually works
M vnc/vnc.c

vnc/vnc.c

diff --git a/vnc/vnc.c b/vnc/vnc.c
index 2e16ed2..7f74791 100644
--- a/vnc/vnc.c
+++ b/vnc/vnc.c
@@ -993,12 +993,18 @@
     v->server_msg(v, "VNC started connecting", 0);
     check_sec_result = 1;
 
-    /* only support 8 and 16 bpp connections from rdp client */
-    if ((v->server_bpp != 8) && (v->server_bpp != 15) &&
-            (v->server_bpp != 16) && (v->server_bpp != 24))
+    /* check if bpp is supported for rdp connection */
+    switch (v->server_bpp)
     {
-        v->server_msg(v, "VNC error - only supporting 8, 15, 16 and 24 bpp rdp "
-                      "connections", 0);
+        case 8:
+        case 15:
+        case 16:
+        case 24:
+        case 32:
+            break;
+        default:
+            v->server_msg(v, "VNC error - only supporting 8, 15, 16, 24 and 32 "
+                          "bpp rdp connections", 0);
         return 1;
     }
 
a0f71618 2019-03-17 05:17:58 Itamar Reis Peixoto
remove duplicated call to scp_session_set_bpp
M sesman/libscp/libscp_v1s.c

sesman/libscp/libscp_v1s.c

diff --git a/sesman/libscp/libscp_v1s.c b/sesman/libscp/libscp_v1s.c
index ac370ad..6d69d18 100644
--- a/sesman/libscp/libscp_v1s.c
+++ b/sesman/libscp/libscp_v1s.c
@@ -139,7 +139,6 @@
                     __LINE__, sz);
         return SCP_SERVER_STATE_INTERNAL_ERR;
     }
-    scp_session_set_bpp(session, sz);
     in_uint8(c->in_s, sz);
     scp_session_set_rsr(session, sz);
     in_uint8a(c->in_s, buf, 17);
96bc82c7 2019-03-17 05:17:58 Jay Sorg
sesman: add missing break
M sesman/libscp/libscp_session.c

sesman/libscp/libscp_session.c

diff --git a/sesman/libscp/libscp_session.c b/sesman/libscp/libscp_session.c
index 1de615c..a1859aa 100644
--- a/sesman/libscp/libscp_session.c
+++ b/sesman/libscp/libscp_session.c
@@ -139,10 +139,10 @@
         case 24:
         case 32:
             s->bpp = bpp;
+            break;
         default:
             return 1;
     }
-
     return 0;
 }
 
b3a14885 2019-03-17 05:17:58 Timothy Pearson
Put Raptor fork back under GPL
M COPYING

COPYING

diff --git a/COPYING b/COPYING
index 08dea94..10b86d5 100644
--- a/COPYING
+++ b/COPYING
@@ -1,176 +1,372 @@
-Apache License, Version 2.0
 
-Version 2.0, January 2004
+special clause for libxrdp and librdp, both based on rdesktop
+these libraries link to openssl
 
-http://www.apache.org/licenses/
+  This software is released under the GNU General Public License
+  (reproduced below) with the additional exemption that compiling,
+  linking, and/or using OpenSSL together with this software is
+  allowed.
 
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+---
 
-1. Definitions.
+special clause for xrdp, that main executable
+for linking with proprietary modules
 
-"License" shall mean the terms and conditions for use, reproduction, and 
-distribution as defined by Sections 1 through 9 of this document.
+  Linking this library statically or dynamically with other modules
+  is making a combined work based on this library. Thus, the terms
+  and conditions of the GNU General Public License cover the whole
+  combination.
 
-"Licensor" shall mean the copyright owner or entity authorized by the 
-copyright owner that is granting the License.
+  As a special exception, the copyright holders of this library
+  give you permission to link this library with independent modules
+  to produce an executable, regardless of the license terms of
+  these independent modules, and to copy and distribute the resulting
+  executable under terms of your choice, provided that you also meet,
+  for each linked independent module, the terms and conditions of the
+  license of that module. An independent module is a module which is
+  not derived from or based on this library. If you modify this
+  library, you may extend this exception to your version of the
+  library, but you are not obliged to do so. If you do not wish
+  to do so, delete this exception statement from your version.
 
-"Legal Entity" shall mean the union of the acting entity and all other 
-entities that control, are controlled by, or are under common control 
-with that entity. For the purposes of this definition, "control" means 
-(i) the power, direct or indirect, to cause the direction or management 
-of such entity, whether by contract or otherwise, or (ii) ownership of 
-fifty percent (50%) or more of the outstanding shares, or 
-(iii) beneficial ownership of such entity.
+---
 
-"You" (or "Your") shall mean an individual or Legal Entity exercising 
-permissions granted by this License.
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
 
-"Source" form shall mean the preferred form for making modifications, 
-including but not limited to software source code, documentation source, 
-and configuration files.
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                          675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
 
-"Object" form shall mean any form resulting from mechanical transformation 
-or translation of a Source form, including but not limited to compiled 
-object code, generated documentation, and conversions to other media types.
+			    Preamble
 
-"Work" shall mean the work of authorship, whether in Source or Object form, 
-made available under the License, as indicated by a copyright notice that is 
-included in or attached to the work (an example is provided in the Appendix below).
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
 
-"Derivative Works" shall mean any work, whether in Source or Object form, 
-that is based on (or derived from) the Work and for which the editorial 
-revisions, annotations, elaborations, or other modifications represent, as a 
-whole, an original work of authorship. For the purposes of this License, 
-Derivative Works shall not include works that remain separable from, or 
-merely link (or bind by name) to the interfaces of, the Work and 
-Derivative Works thereof.
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
 
-"Contribution" shall mean any work of authorship, including the original 
-version of the Work and any modifications or additions to that Work or Derivative 
-Works thereof, that is intentionally submitted to Licensor for inclusion in the 
-Work by the copyright owner or by an individual or Legal Entity authorized to 
-submit on behalf of the copyright owner. For the purposes of this definition, 
-"submitted" means any form of electronic, verbal, or written communication sent 
-to the Licensor or its representatives, including but not limited to 
-communication on electronic mailing lists, source code control systems, and 
-issue tracking systems that are managed by, or on behalf of, the Licensor for 
-the purpose of discussing and improving the Work, but excluding communication 
-that is conspicuously marked or otherwise designated in writing by the copyright 
-owner as "Not a Contribution."
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
 
-"Contributor" shall mean Licensor and any individual or Legal Entity on behalf 
-of whom a Contribution has been received by Licensor and subsequently incorporated 
-within the Work.
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
 
-2. Grant of Copyright License. Subject to the terms and conditions of this License, 
-each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, 
-no-charge, royalty-free, irrevocable copyright license to reproduce, prepare 
-Derivative Works of, publicly display, publicly perform, sublicense, and distribute 
-the Work and such Derivative Works in Source or Object form.
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
 
-3. Grant of Patent License. Subject to the terms and conditions of this License, 
-each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, 
-no-charge, royalty-free, irrevocable (except as stated in this section) patent 
-license to make, have made, use, offer to sell, sell, import, and otherwise transfer 
-the Work, where such license applies only to those patent claims licensable by such 
-Contributor that are necessarily infringed by their Contribution(s) alone or by 
-combination of their Contribution(s) with the Work to which such Contribution(s) was 
-submitted. If You institute patent litigation against any entity (including a 
-cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution 
** Diff limit reached (max: 250 lines) **
62b37d1f 2019-03-17 05:17:58 Timothy Pearson
Minor modifications for Debian
A debian_configure
M sesman/startwm.sh
** Diff limit reached (max: 250 lines) **
9757f64c 2019-03-17 05:17:58 Timothy Pearson
Fix xrdp script on Debian
M instfiles/xrdp.sh
** Diff limit reached (max: 250 lines) **
c25d6d15 2019-03-17 05:17:58 Timothy Pearson
Add preliminary Raptor session management
A raptorsmiface/Makefile.am
A raptorsmiface/libraptorsmiface.c
A raptorsmiface/libraptorsmiface.h
M Makefile.am
M configure.ac
M sesman/Makefile.am
M sesman/chansrv/Makefile.am
M sesman/chansrv/chansrv.c
M sesman/sesman.ini
M sesman/session.c
M xrdp/Makefile.am
M xrdp/xrdp.ini
M xrdp/xrdp_mm.c
M xrdp/xrdp_types.h
** Diff limit reached (max: 250 lines) **
d71833d3 2019-03-17 05:17:58 Timothy Pearson
Fix a number of problems
System is now mostly stabilized
M common/defines.h
M common/trans.c
M raptorsmiface/libraptorsmiface.c
M raptorsmiface/libraptorsmiface.h
M sesman/chansrv/chansrv.c
M sesman/scp_v0.c
M sesman/scp_v1.c
M sesman/session.c
M xrdp/xrdp_mm.c
M xup/xup.c
** Diff limit reached (max: 250 lines) **
54172305 2019-03-17 05:17:58 Timothy Pearson
Add server/group mapping
M raptorsmiface/libraptorsmiface.c
M xrdp/xrdp_mm.c
** Diff limit reached (max: 250 lines) **
ca636d14 2019-03-17 05:17:58 Timothy Pearson
Partially fix immediate exit after login
M xup/xup.c
** Diff limit reached (max: 250 lines) **
157ed0cd 2019-03-17 05:17:58 Timothy Pearson
Add hack to support blank cursors for now
M xorg/X11R7.6/rdp/rdpinput.c
M xup/xup.c
** Diff limit reached (max: 250 lines) **
dc1a2d7d 2019-03-17 05:17:58 Timothy Pearson
Update branding
M xrdp/ad24b.bmp
M xrdp/ad256.bmp
M xrdp/xrdp.ini
M xrdp/xrdp24b.bmp
M xrdp/xrdp256.bmp
M xrdp/xrdp_login_wnd.c
M xrdp/xrdp_logo.bmp
** Diff limit reached (max: 250 lines) **
04011fff 2019-03-17 05:17:58 Timothy Pearson
Use a black login background
M xrdp/xrdp.ini
M xrdp/xrdp24b.bmp
M xrdp/xrdp256.bmp
** Diff limit reached (max: 250 lines) **
910d92be 2019-03-17 05:17:58 Timothy Pearson
Add ability to recover somewhat from a dead master node
M raptorsmiface/libraptorsmiface.c
** Diff limit reached (max: 250 lines) **
222cc9ab 2019-03-17 05:17:58 Timothy Pearson
Add master node session recovery support
M raptorsmiface/libraptorsmiface.c
M raptorsmiface/libraptorsmiface.h
M sesman/scp_v0.c
M sesman/scp_v1.c
M sesman/session.c
** Diff limit reached (max: 250 lines) **
9101a8b6 2019-03-17 05:17:58 Timothy Pearson
Add additional debug statement
M raptorsmiface/libraptorsmiface.c
** Diff limit reached (max: 250 lines) **
b684fae9 2019-03-17 05:17:58 Timothy Pearson
Fix merge
M sesman/scp_v0.c
M sesman/session.c
** Diff limit reached (max: 250 lines) **
2be3b6a0 2019-03-17 05:17:58 Timothy Pearson
Add rudimentary sound support
M raptorsmiface/libraptorsmiface.c
M raptorsmiface/libraptorsmiface.h
M sesman/chansrv/chansrv.c
M sesman/chansrv/clipboard.c
M sesman/chansrv/sound.c
** Diff limit reached (max: 250 lines) **
19a4d234 2019-03-17 05:17:58 Timothy Pearson
Add statistics reporting
M raptorsmiface/libraptorsmiface.c
M raptorsmiface/libraptorsmiface.h
M xrdp/xrdp_types.h
** Diff limit reached (max: 250 lines) **
be1d8c1b 2019-03-17 05:17:58 Timothy Pearson
Add additional statistics reporting
M raptorsmiface/libraptorsmiface.c
M raptorsmiface/libraptorsmiface.h
M xrdp/xrdp.c
** Diff limit reached (max: 250 lines) **
0c457297 2019-03-17 05:17:58 Timothy Pearson
Add MySQL database skeleton file
A database/mysql/remotelab_sm_database.sql
** Diff limit reached (max: 250 lines) **
96173935 2019-03-17 05:17:58 Timothy Pearson
Add database configuration options to main config file
M raptorsmiface/libraptorsmiface.c
M raptorsmiface/libraptorsmiface.h
** Diff limit reached (max: 250 lines) **
5c0493b6 2019-03-17 05:17:58 Timothy Pearson
Fix non-root-user display server startup failure
Transfer and clean up Kerberos ticket on login and logout
Remove spurious debugging messages
M instfiles/pam.d/xrdp-sesman
M raptorsmiface/libraptorsmiface.c
M sesman/env.c
M xrdp/xrdp_login_wnd.c
** Diff limit reached (max: 250 lines) **
e501ebb7 2019-03-17 05:17:58 Timothy Pearson
Fix sporadic xrdp-sesman crash on session initiation
Fix a number of memory leaks
Fix access to freed memory
Fix invalid function return values
M raptorsmiface/libraptorsmiface.c
M raptorsmiface/libraptorsmiface.h
** Diff limit reached (max: 250 lines) **
f81a2192 2019-03-17 05:17:58 Timothy Pearson
Download installation files from correct locations
Keep track of arbiter(s) in use per connection
M raptorsmiface/libraptorsmiface.c
M raptorsmiface/libraptorsmiface.h
** Diff limit reached (max: 250 lines) **
c1b5971e 2019-03-17 05:17:58 Timothy Pearson
Second part of prior commit
M database/mysql/remotelab_sm_database.sql
** Diff limit reached (max: 250 lines) **
6aad9461 2019-03-17 05:17:58 Timothy Pearson
Update for OpenSSL 1.1
M common/ssl_calls.c
** Diff limit reached (max: 250 lines) **
a616bd13 2019-03-17 05:17:58 Timothy Pearson
Update sources to build on ppc64el
A xorg/X11R7.6/libdrm-2.4.26.patch
M xorg/X11R7.6/buildx.sh
** Diff limit reached (max: 250 lines) **
b2854c25 2019-03-17 05:17:59 Timothy Pearson
Fix endianness checks on ppc64
M common/arch.h
** Diff limit reached (max: 250 lines) **
fff517c1 2019-03-17 05:17:59 Timothy Pearson
Don't try connecting to remote node if preliminary node allocation has failed for any reason
M sesman/session.c
** Diff limit reached (max: 250 lines) **
c23bc949 2019-03-17 05:17:59 Timothy Pearson
Add debug warning when maximum session limit is hit for a specified user group
M raptorsmiface/libraptorsmiface.c
** Diff limit reached (max: 250 lines) **
5d7dde21 2019-03-17 05:17:59 Timothy Pearson
Fix a few situations where process output was corrupted with existing uncleard buffer data
This fixes session termination not being marked in the database
M raptorsmiface/libraptorsmiface.c
** Diff limit reached (max: 250 lines) **
bc50a570 2019-03-17 05:17:59 Timothy Pearson
Fix a couple of additional ppc64 endianness / alignment issues
A xorg/X11R7.6/xorg-server-1.9.3.patch
M common/arch.h
M xorg/X11R7.6/rdp/rdp.h
** Diff limit reached (max: 250 lines) **
1d59110b 2019-03-17 05:17:59 Timothy Pearson
Update management network range
M raptorsmiface/libraptorsmiface.h
** Diff limit reached (max: 250 lines) **
f4dd17a1 2019-03-17 05:17:59 Timothy Pearson
Always show log during connection
M xrdp/xrdp_wm.c
** Diff limit reached (max: 250 lines) **
2d22b988 2019-03-17 05:17:59 Timothy Pearson
Disable SHM access between XUP and Xorg as they are not running on the same machine
M sesman/session.c
M xorg/X11R7.6/rdp/rdpup.c
** Diff limit reached (max: 250 lines) **
42f057d2 2019-03-17 05:17:59 Timothy Pearson
Enhance debug logging of SHM related functions
M common/os_calls.c
M xup/xup.c
** Diff limit reached (max: 250 lines) **