aboutsummaryrefslogtreecommitdiff
path: root/src/proxy.c
diff options
context:
space:
mode:
authorJulien Dessaux2018-08-26 15:55:38 +0200
committerJulien Dessaux2018-08-26 16:04:11 +0200
commitbeff818f25ae69cfe8501e18271b2509320de8df (patch)
treed132e9d366aaebac9f7b91b8a63fcafbbe550af8 /src/proxy.c
parentAdded address sanitization and fixed found bugs (diff)
downloadbastion-beff818f25ae69cfe8501e18271b2509320de8df.tar.gz
bastion-beff818f25ae69cfe8501e18271b2509320de8df.tar.bz2
bastion-beff818f25ae69cfe8501e18271b2509320de8df.zip
Added session recording with https://github.com/kilobyte/termrec
Diffstat (limited to 'src/proxy.c')
-rw-r--r--src/proxy.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/proxy.c b/src/proxy.c
index 3bbecf3..5718a8a 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -4,6 +4,7 @@
#include "client.h"
#include "proxy.h"
+#include "state.h"
// callback function for channel data and exceptions
static int proxy_data_function(ssh_session session, ssh_channel channel, void *data,
@@ -30,6 +31,7 @@ static int proxy_pty_request(ssh_session session, ssh_channel channel,
(void) py;
(void) px;
+ // TODO record pty size in recorder
if (ssh_channel_is_open(pdata->client_channel)) {
if (ssh_channel_request_pty_size(pdata->client_channel, term, cols, rows) == SSH_OK)
return SSH_OK;
@@ -51,6 +53,7 @@ static int proxy_pty_resize(ssh_session session, ssh_channel channel, int cols,
(void) py;
(void) px;
+ // TODO record pty size in recorder
if (ssh_channel_is_open(pdata->client_channel)) {
if (ssh_channel_change_pty_size(pdata->client_channel, cols, rows) == SSH_OK)
return SSH_OK;
@@ -158,7 +161,7 @@ static void proxy_channel_exit_signal_callback (ssh_session session, ssh_channel
printf("proxy exit signal callback\n");
}
-void handle_proxy_session(ssh_event event, ssh_session session, ssh_channel my_channel, const char * hostname)
+void handle_proxy_session(ssh_event event, ssh_session session, ssh_channel my_channel)
{
struct client_channel_data_struct * cdata;
@@ -169,7 +172,7 @@ void handle_proxy_session(ssh_event event, ssh_session session, ssh_channel my_c
.client_channel = NULL,
};
- cdata = client_dial(event, &pdata, hostname);
+ cdata = client_dial(event, &pdata);
if (cdata == NULL) {
return;