summaryrefslogtreecommitdiffstats
path: root/sesman/scp_v0.c
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2016-12-03 23:12:48 -0800
committerJay Sorg <jay.sorg@gmail.com>2016-12-03 23:12:48 -0800
commit57905d71ada103ae397e441e2c14b6f64c365a69 (patch)
tree629afdc3d8280a8b3d82e549a7357f64f098f00c /sesman/scp_v0.c
parent42d370fcddcbf131618b2a9b741203952a3242db (diff)
downloadxrdp-proprietary-57905d71ada103ae397e441e2c14b6f64c365a69.tar.gz
xrdp-proprietary-57905d71ada103ae397e441e2c14b6f64c365a69.zip
vnc: change password file to use guid hash
Diffstat (limited to 'sesman/scp_v0.c')
-rw-r--r--sesman/scp_v0.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/sesman/scp_v0.c b/sesman/scp_v0.c
index 565dacb8..0b913a09 100644
--- a/sesman/scp_v0.c
+++ b/sesman/scp_v0.c
@@ -99,6 +99,11 @@ scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
if (1 == access_login_allowed(s->username))
{
+ tui8 guid[16];
+
+ g_random((char*)guid, 16);
+ scp_session_set_guid(s, guid);
+
if (0 != s->client_ip)
{
log_message(LOG_LEVEL_INFO, "++ created session (access granted): "
@@ -113,27 +118,18 @@ scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
if (SCP_SESSION_TYPE_XVNC == s->type)
{
log_message( LOG_LEVEL_INFO, "starting Xvnc session...");
- display = session_start(s->width, s->height, s->bpp, s->username,
- s->password, data, SESMAN_SESSION_TYPE_XVNC,
- s->domain, s->program, s->directory,
- s->client_ip);
+ display = session_start(data, SESMAN_SESSION_TYPE_XVNC, s);
}
else if (SCP_SESSION_TYPE_XRDP == s->type)
{
log_message(LOG_LEVEL_INFO, "starting X11rdp session...");
- display = session_start(s->width, s->height, s->bpp, s->username,
- s->password, data, SESMAN_SESSION_TYPE_XRDP,
- s->domain, s->program, s->directory,
- s->client_ip);
+ display = session_start(data, SESMAN_SESSION_TYPE_XRDP, s);
}
else if (SCP_SESSION_TYPE_XORG == s->type)
{
/* type is SCP_SESSION_TYPE_XORG */
log_message(LOG_LEVEL_INFO, "starting Xorg session...");
- display = session_start(s->width, s->height, s->bpp, s->username,
- s->password, data, SESMAN_SESSION_TYPE_XORG,
- s->domain, s->program, s->directory,
- s->client_ip);
+ display = session_start(data, SESMAN_SESSION_TYPE_XORG, s);
}
}
else
@@ -148,7 +144,7 @@ scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
}
else
{
- scp_v0s_allow_connection(c, display);
+ scp_v0s_allow_connection(c, display, s->guid);
}
}
else