diff options
author | Laxmikant Rashinkar <lk@Ubuntu-12.04-32bit> | 2014-10-11 14:49:46 -0700 |
---|---|---|
committer | Laxmikant Rashinkar <lk@Ubuntu-12.04-32bit> | 2014-10-11 14:49:46 -0700 |
commit | 8c316b46b8d6b1cb3cf32165daf817030aac1a47 (patch) | |
tree | 089c5741cb2a914501e5ab28898a5c71c4c4103b /sesman/libscp | |
parent | 5b6b74577fda4bbcd0a02a585d783c59d68953da (diff) | |
parent | bc7a6b9bc66afe4adf7c232c94e41694319d4155 (diff) | |
download | xrdp-proprietary-8c316b46b8d6b1cb3cf32165daf817030aac1a47.tar.gz xrdp-proprietary-8c316b46b8d6b1cb3cf32165daf817030aac1a47.zip |
Merge branch 'devel'
Diffstat (limited to 'sesman/libscp')
-rw-r--r-- | sesman/libscp/libscp_session.c | 8 | ||||
-rw-r--r-- | sesman/libscp/libscp_types.h | 2 | ||||
-rw-r--r-- | sesman/libscp/libscp_v0.c | 12 |
3 files changed, 20 insertions, 2 deletions
diff --git a/sesman/libscp/libscp_session.c b/sesman/libscp/libscp_session.c index 4c389655..d25fc64a 100644 --- a/sesman/libscp/libscp_session.c +++ b/sesman/libscp/libscp_session.c @@ -58,12 +58,19 @@ scp_session_set_type(struct SCP_SESSION *s, tui8 type) case SCP_SESSION_TYPE_XVNC: s->type = SCP_SESSION_TYPE_XVNC; break; + case SCP_SESSION_TYPE_XRDP: s->type = SCP_SESSION_TYPE_XRDP; break; + + case SCP_SESSION_TYPE_XORG: + s->type = SCP_SESSION_TYPE_XORG; + break; + case SCP_GW_AUTHENTICATION: s->type = SCP_GW_AUTHENTICATION; break; + case SCP_SESSION_TYPE_MANAGE: s->type = SCP_SESSION_TYPE_MANAGE; s->mng = (struct SCP_MNG_DATA *)g_malloc(sizeof(struct SCP_MNG_DATA), 1); @@ -75,6 +82,7 @@ scp_session_set_type(struct SCP_SESSION *s, tui8 type) } break; + default: log_message(LOG_LEVEL_WARNING, "[session:%d] set_type: unknown type", __LINE__); return 1; diff --git a/sesman/libscp/libscp_types.h b/sesman/libscp/libscp_types.h index 2140eced..de851867 100644 --- a/sesman/libscp/libscp_types.h +++ b/sesman/libscp/libscp_types.h @@ -41,6 +41,8 @@ #define SCP_SESSION_TYPE_XVNC 0x00 #define SCP_SESSION_TYPE_XRDP 0x01 #define SCP_SESSION_TYPE_MANAGE 0x02 +#define SCP_SESSION_TYPE_XORG 0x03 + /* SCP_GW_AUTHENTICATION can be used when XRDP + sesman act as a gateway * XRDP sends this command to let sesman verify if the user is allowed * to use the gateway */ diff --git a/sesman/libscp/libscp_v0.c b/sesman/libscp/libscp_v0.c index afa09bd8..8cf1340b 100644 --- a/sesman/libscp/libscp_v0.c +++ b/sesman/libscp/libscp_v0.c @@ -56,6 +56,10 @@ scp_v0c_connect(struct SCP_CONNECTION *c, struct SCP_SESSION *s) { out_uint16_be(c->out_s, 10); } + else if (s->type == SCP_SESSION_TYPE_XORG) + { + out_uint16_be(c->out_s, 20); + } else { log_message(LOG_LEVEL_WARNING, "[v0:%d] connection aborted: network error", __LINE__); @@ -191,7 +195,7 @@ scp_v0s_accept(struct SCP_CONNECTION *c, struct SCP_SESSION **s, int skipVchk) in_uint16_be(c->in_s, code); - if (code == 0 || code == 10) + if (code == 0 || code == 10 || code == 20) { session = scp_session_create(); @@ -207,10 +211,14 @@ scp_v0s_accept(struct SCP_CONNECTION *c, struct SCP_SESSION **s, int skipVchk) { scp_session_set_type(session, SCP_SESSION_TYPE_XVNC); } - else + else if (code == 10) { scp_session_set_type(session, SCP_SESSION_TYPE_XRDP); } + else if (code == 20) + { + scp_session_set_type(session, SCP_SESSION_TYPE_XORG); + } /* reading username */ in_uint16_be(c->in_s, sz); |