summaryrefslogtreecommitdiffstats
path: root/sesman/scp_v1.c
diff options
context:
space:
mode:
authorNicola Ruggero <nicola@nxnt.org>2010-11-04 12:14:03 +0100
committerNicola Ruggero <nicola@nxnt.org>2010-11-04 12:14:03 +0100
commitd797b2cf497587355bbf25cd27d59edd1c3f2915 (patch)
tree8a706ce33714460c948c7d7d762e7b5ece23dec1 /sesman/scp_v1.c
parent87297c5014695da08815fca9c410505237162f24 (diff)
downloadxrdp-proprietary-d797b2cf497587355bbf25cd27d59edd1c3f2915.tar.gz
xrdp-proprietary-d797b2cf497587355bbf25cd27d59edd1c3f2915.zip
Implemented client IP logging
Diffstat (limited to 'sesman/scp_v1.c')
-rw-r--r--sesman/scp_v1.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/sesman/scp_v1.c b/sesman/scp_v1.c
index 4f3a6b38..5c303bb2 100644
--- a/sesman/scp_v1.c
+++ b/sesman/scp_v1.c
@@ -107,20 +107,27 @@ scp_v1_process(struct SCP_CONNECTION* c, struct SCP_SESSION* s)
if (scount == 0)
{
/* no disconnected sessions - start a new one */
- log_message(&(g_cfg->log), LOG_LEVEL_INFO, "granted TS access to user %s", s->username);
+ if (0 != s->client_ip)
+ {
+ log_message(&(g_cfg->log), LOG_LEVEL_INFO, "++ created session (access granted): username %s, ip %s", s->username, s->client_ip);
+ }
+ else
+ {
+ log_message(&(g_cfg->log), LOG_LEVEL_INFO, "++ created session (access granted): username %s", s->username);
+ }
if (SCP_SESSION_TYPE_XVNC == s->type)
{
log_message(&(g_cfg->log), 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->domain, s->program, s->directory, s->client_ip);
}
else
{
log_message(&(g_cfg->log), 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->domain, s->program, s->directory, s->client_ip);
}
e = scp_v1s_connect_new_session(c, display);
@@ -160,8 +167,14 @@ scp_v1_process(struct SCP_CONNECTION* c, struct SCP_SESSION* s)
display=sitem->display;
/*e=scp_v1s_reconnect_session(c, sitem, display);*/
e=scp_v1s_reconnect_session(c, display);
- log_message(&(g_cfg->log), LOG_LEVEL_INFO, "User %s reconnected to session %d on port %d", \
- s->username, sitem->pid, display);
+ if (0 != s->client_ip)
+ {
+ log_message(&(g_cfg->log), LOG_LEVEL_INFO, "++ reconnected session: username %s, display :%d.0, session_pid %d, ip %s", s->username, display, sitem->pid, s->client_ip);
+ }
+ else
+ {
+ log_message(&(g_cfg->log), LOG_LEVEL_INFO, "++ reconnected session: username %s, display :%d.0, session_pid %d", s->username, display, sitem->pid);
+ }
g_free(sitem);
}
break;