Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/neutrinolabs/xrdp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/sesman
diff options
context:
space:
mode:
authormatt335672 <30179339+matt335672@users.noreply.github.com>2022-03-19 14:29:28 +0300
committermatt335672 <30179339+matt335672@users.noreply.github.com>2022-04-18 11:12:35 +0300
commit0db849fc5c3f02ee24f10acd9f54a91a96fa2eaa (patch)
tree1ea47ce9d5e5451532fa06c7a0666f2316674558 /sesman
parent9c30d4c2f8ece62b6b28551d499b25c4cc965cfa (diff)
Move SCP to a Unix Domain Socket
The TCP socket implementation of sesman has a number of limitations, namely that it is affected by firewalls, and also that determining the user on the other end requires a full authentication process. The advantage of the TCP socket is that sesman and xrdp can be run on separate machines. This is however not supported by the xorgxrdp backend (shared memory), and is insecure, in that passwords are sent in-the-clear, and the connection is susceptible to MitM attacks. This architecture has been deprecated in release notes since xrdp v0.9.17, and although it will continue to be supported in any further releases in the x0.9.x series, it will not be supported in the next major version.
Diffstat (limited to 'sesman')
-rw-r--r--sesman/Makefile.am1
-rw-r--r--sesman/config.c88
-rw-r--r--sesman/config.h7
-rw-r--r--sesman/sesman.c125
-rw-r--r--sesman/sesman.ini.in4
-rw-r--r--sesman/sig.c13
-rw-r--r--sesman/tools/sesadmin.c13
-rw-r--r--sesman/tools/sesrun.c20
8 files changed, 146 insertions, 125 deletions
diff --git a/sesman/Makefile.am b/sesman/Makefile.am
index 181861af..7d7052a5 100644
--- a/sesman/Makefile.am
+++ b/sesman/Makefile.am
@@ -8,6 +8,7 @@ AM_CPPFLAGS = \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" \
-DXRDP_SOCKET_PATH=\"${socketdir}\" \
+ -DSESMAN_RUNTIME_PATH=\"${sesmanruntimedir}\" \
-I$(top_srcdir)/common \
-I$(top_srcdir)/libipm
diff --git a/sesman/config.c b/sesman/config.c
index 61e9e403..4eabdd46 100644
--- a/sesman/config.c
+++ b/sesman/config.c
@@ -35,6 +35,7 @@
#include "log.h"
#include "string_calls.h"
#include "chansrv/chansrv_common.h"
+#include "scp.h"
/***************************************************************************//**
*
@@ -51,14 +52,11 @@ config_read_globals(int file, struct config_sesman *cf, struct list *param_n,
struct list *param_v)
{
int i;
- int length;
- char *buf;
list_clear(param_v);
list_clear(param_n);
/* resetting the struct */
- cf->listen_address[0] = '\0';
cf->listen_port[0] = '\0';
cf->enable_user_wm = 0;
cf->user_wm[0] = '\0';
@@ -70,47 +68,50 @@ config_read_globals(int file, struct config_sesman *cf, struct list *param_n,
for (i = 0; i < param_n->count; i++)
{
- buf = (char *)list_get_item(param_n, i);
+ const char *param = (const char *)list_get_item(param_n, i);
+ const char *val = (const char *)list_get_item(param_v, i);
- if (0 == g_strcasecmp(buf, SESMAN_CFG_DEFWM))
+ if (0 == g_strcasecmp(param, SESMAN_CFG_DEFWM))
{
- cf->default_wm = g_strdup((char *)list_get_item(param_v, i));
+ cf->default_wm = g_strdup(val);
}
- else if (0 == g_strcasecmp(buf, SESMAN_CFG_USERWM))
+ else if (0 == g_strcasecmp(param, SESMAN_CFG_USERWM))
{
- g_strncpy(cf->user_wm, (char *)list_get_item(param_v, i), 31);
+ g_strncpy(cf->user_wm, val, sizeof(cf->user_wm) - 1);
}
- else if (0 == g_strcasecmp(buf, SESMAN_CFG_ENABLE_USERWM))
+ else if (0 == g_strcasecmp(param, SESMAN_CFG_ENABLE_USERWM))
{
- cf->enable_user_wm = g_text2bool((char *)list_get_item(param_v, i));
+ cf->enable_user_wm = g_text2bool(val);
}
- else if (0 == g_strcasecmp(buf, SESMAN_CFG_PORT))
+ else if (0 == g_strcasecmp(param, SESMAN_CFG_PORT))
{
- g_strncpy(cf->listen_port, (char *)list_get_item(param_v, i), 15);
+ scp_port_to_unix_domain_path(val, cf->listen_port,
+ sizeof(cf->listen_port));
}
- else if (0 == g_strcasecmp(buf, SESMAN_CFG_ADDRESS))
+ else if (0 == g_strcasecmp(param, SESMAN_CFG_AUTH_FILE_PATH))
{
- g_strncpy(cf->listen_address, (char *)list_get_item(param_v, i), 31);
+ cf->auth_file_path = g_strdup(val);
}
- else if (0 == g_strcasecmp(buf, SESMAN_CFG_AUTH_FILE_PATH))
+ else if (g_strcasecmp(param, SESMAN_CFG_RECONNECT_SH) == 0)
{
- cf->auth_file_path = g_strdup((char *)list_get_item(param_v, i));
+ cf->reconnect_sh = g_strdup(val);
}
- else if (g_strcasecmp(buf, SESMAN_CFG_RECONNECT_SH) == 0)
+ else if (0 == g_strcasecmp(param, SESMAN_CFG_ADDRESS))
{
- cf->reconnect_sh = g_strdup((char *)list_get_item(param_v, i));
+ /* Config must be updated for Unix Domain Sockets */
+ LOG(LOG_LEVEL_WARNING, "Obsolete setting' " SESMAN_CFG_ADDRESS
+ "' in [" SESMAN_CFG_GLOBALS "] should be removed.");
+ LOG(LOG_LEVEL_WARNING, "Review setting' " SESMAN_CFG_PORT "' in ["
+ SESMAN_CFG_GLOBALS "]");
}
}
/* checking for missing required parameters */
- if ('\0' == cf->listen_address[0])
- {
- g_strncpy(cf->listen_address, "0.0.0.0", 8);
- }
-
if ('\0' == cf->listen_port[0])
{
- g_strncpy(cf->listen_port, "3350", 5);
+ /* Load the default value */
+ scp_port_to_unix_domain_path(NULL, cf->listen_port,
+ sizeof(cf->listen_port));
}
if ('\0' == cf->user_wm[0])
@@ -118,46 +119,40 @@ config_read_globals(int file, struct config_sesman *cf, struct list *param_n,
cf->enable_user_wm = 0;
}
- if (cf->default_wm == 0)
- {
- cf->default_wm = g_strdup("startwm.sh");
- }
- else if (g_strlen(cf->default_wm) == 0)
+ if (cf->default_wm == 0 || cf->default_wm[0] == '\0')
{
g_free(cf->default_wm);
cf->default_wm = g_strdup("startwm.sh");
}
- /* if default_wm doesn't begin with '/', it's a relative path to XRDP_CFG_PATH */
+ /* if default_wm doesn't begin with '/', it's a relative path to
+ * XRDP_CFG_PATH */
if (cf->default_wm[0] != '/')
{
/* sizeof operator returns string length including null terminator */
- length = sizeof(XRDP_CFG_PATH) + g_strlen(cf->default_wm) + 1; /* '/' */
- buf = (char *)g_malloc(length, 0);
+ int length = (sizeof(XRDP_CFG_PATH) +
+ g_strlen(cf->default_wm) + 1); /* '/' */
+ char *buf = (char *)g_malloc(length, 0);
g_sprintf(buf, "%s/%s", XRDP_CFG_PATH, cf->default_wm);
g_free(cf->default_wm);
- cf->default_wm = g_strdup(buf);
- g_free(buf);
+ cf->default_wm = buf;
}
- if (cf->reconnect_sh == 0)
- {
- cf->reconnect_sh = g_strdup("reconnectwm.sh");
- }
- else if (g_strlen(cf->reconnect_sh) == 0)
+ if (cf->reconnect_sh == 0 || cf->reconnect_sh[0] == '\0')
{
g_free(cf->reconnect_sh);
cf->reconnect_sh = g_strdup("reconnectwm.sh");
}
- /* if reconnect_sh doesn't begin with '/', it's a relative path to XRDP_CFG_PATH */
+ /* if reconnect_sh doesn't begin with '/', it's a relative path to
+ * XRDP_CFG_PATH */
if (cf->reconnect_sh[0] != '/')
{
/* sizeof operator returns string length including null terminator */
- length = sizeof(XRDP_CFG_PATH) + g_strlen(cf->reconnect_sh) + 1; /* '/' */
- buf = (char *)g_malloc(length, 0);
+ int length = (sizeof(XRDP_CFG_PATH) +
+ g_strlen(cf->reconnect_sh) + 1); /* '/' */
+ char *buf = (char *)g_malloc(length, 0);
g_sprintf(buf, "%s/%s", XRDP_CFG_PATH, cf->reconnect_sh);
g_free(cf->reconnect_sh);
- cf->reconnect_sh = g_strdup(buf);
- g_free(buf);
+ cf->reconnect_sh = buf;
}
return 0;
@@ -530,6 +525,7 @@ config_read(const char *sesman_ini)
param_n->auto_free = 1;
param_v = list_create();
param_v->auto_free = 1;
+ all_ok = 1;
/* read global config */
config_read_globals(fd, cfg, param_n, param_v);
@@ -552,7 +548,6 @@ config_read(const char *sesman_ini)
list_delete(param_v);
list_delete(param_n);
g_file_close(fd);
- all_ok = 1;
}
}
}
@@ -579,14 +574,13 @@ config_dump(struct config_sesman *config)
/* Global sesman configuration */
g_writeln("Filename: %s", config->sesman_ini);
g_writeln("Global configuration:");
- g_writeln(" ListenAddress: %s", config->listen_address);
g_writeln(" ListenPort: %s", config->listen_port);
g_writeln(" EnableUserWindowManager: %d", config->enable_user_wm);
g_writeln(" UserWindowManager: %s", config->user_wm);
g_writeln(" DefaultWindowManager: %s", config->default_wm);
g_writeln(" ReconnectScript: %s", config->reconnect_sh);
g_writeln(" AuthFilePath: %s",
- ((config->auth_file_path) ? (config->auth_file_path) : ("disabled")));
+ (config->auth_file_path ? config->auth_file_path : "disabled"));
/* Session configuration */
g_writeln("Session configuration:");
diff --git a/sesman/config.h b/sesman/config.h
index c6b72f8a..b73ff46c 100644
--- a/sesman/config.h
+++ b/sesman/config.h
@@ -202,15 +202,10 @@ struct config_sesman
char *sesman_ini;
/**
- * @var listen_address
- * @brief Listening address
- */
- char listen_address[32];
- /**
* @var listen_port
* @brief Listening port
*/
- char listen_port[16];
+ char listen_port[256];
/**
* @var enable_user_wm
* @brief Flag that enables user specific wm
diff --git a/sesman/sesman.c b/sesman/sesman.c
index b5c78f4c..96849379 100644
--- a/sesman/sesman.c
+++ b/sesman/sesman.c
@@ -36,6 +36,7 @@
#include "trans.h"
#include "scp_process.h"
+#include "lock_uds.h"
/**
* Maximum number of short-lived connections to sesman
@@ -70,6 +71,10 @@ struct sesman_con
};
static struct trans *g_list_trans;
+
+/* Variables used to lock g_list_trans */
+static struct lock_uds *g_list_trans_lock;
+
static struct list *g_con_list = NULL;
static int g_pid;
@@ -206,46 +211,53 @@ sesman_process_params(int argc, char **argv,
}
/******************************************************************************/
-static int sesman_listen_test(struct config_sesman *cfg)
+static int
+create_sesman_runtime_dir(void)
{
- int error;
- int sck;
- int rv = 0;
+ int rv = -1;
+ /* Make sure if we create the directory, there's no gap where it
+ * may have the wrong permissions */
+ int entry_umask = g_umask_hex(0x755);
- sck = g_tcp_socket();
- if (sck < 0)
+ if (!g_directory_exist(SESMAN_RUNTIME_PATH) &&
+ !g_create_dir(SESMAN_RUNTIME_PATH))
{
- return 1;
+ LOG(LOG_LEVEL_ERROR,
+ "Can't create runtime directory '"
+ SESMAN_RUNTIME_PATH "' [%s]", g_get_strerror());
}
-
- LOG(LOG_LEVEL_DEBUG, "Testing if xrdp-sesman can listen on %s port %s.",
- cfg->listen_address, cfg->listen_port);
- g_tcp_set_non_blocking(sck);
- error = g_tcp_bind_address(sck, cfg->listen_port, cfg->listen_address);
- if (error == 0)
+ else if (g_chown(SESMAN_RUNTIME_PATH, g_getuid(), g_getuid()) != 0)
{
- /* try to listen */
- error = g_tcp_listen(sck);
-
- if (error == 0)
- {
- /* if listen succeeded, stop listen immediately */
- g_sck_close(sck);
- }
- else
- {
- rv = 1;
- }
+ LOG(LOG_LEVEL_ERROR,
+ "Can't set ownership of sesman runtime directory [%s]",
+ g_get_strerror());
+ }
+ else if (g_chmod_hex(SESMAN_RUNTIME_PATH, 0x755) != 0)
+ {
+ /* This might seem redundant, but there's a chance the
+ * directory already exists */
+ LOG(LOG_LEVEL_ERROR,
+ "Can't set permissions of sesman runtime directory [%s]",
+ g_get_strerror());
}
else
{
- rv = 1;
+ rv = 0;
}
+ g_umask_hex(entry_umask);
return rv;
}
/******************************************************************************/
+static int sesman_listen_test(struct config_sesman *cfg)
+{
+ int status = sesman_create_listening_transport(cfg);
+ sesman_delete_listening_transport();
+ return status;
+}
+
+/******************************************************************************/
int
sesman_close_all(void)
{
@@ -357,8 +369,18 @@ set_reload_event(int sig)
void
sesman_delete_listening_transport(void)
{
- trans_delete(g_list_trans);
+ if (g_getpid() == g_pid)
+ {
+ trans_delete(g_list_trans);
+ }
+ else
+ {
+ trans_delete_from_child(g_list_trans);
+ }
g_list_trans = NULL;
+
+ unlock_uds(g_list_trans_lock);
+ g_list_trans_lock = NULL;
}
/******************************************************************************/
@@ -366,26 +388,43 @@ int
sesman_create_listening_transport(const struct config_sesman *cfg)
{
int rv = 1;
- g_list_trans = trans_create(TRANS_MODE_TCP, 8192, 8192);
+ g_list_trans = trans_create(TRANS_MODE_UNIX, 8192, 8192);
if (g_list_trans == NULL)
{
LOG(LOG_LEVEL_ERROR, "%s: trans_create failed", __func__);
}
- else
+ else if ((g_list_trans_lock = lock_uds(cfg->listen_port)) != NULL)
{
- LOG(LOG_LEVEL_DEBUG, "%s: address %s port %s",
- __func__, cfg->listen_address, cfg->listen_port);
- rv = trans_listen_address(g_list_trans, cfg->listen_port,
- cfg->listen_address);
+ /* Make sure the file is always created with the correct
+ * permissions, if it's not there */
+ int entry_umask = g_umask_hex(0x666);
+ LOG_DEVEL(LOG_LEVEL_DEBUG, "%s: port %s", __func__, cfg->listen_port);
+ rv = trans_listen_address(g_list_trans, cfg->listen_port, NULL);
if (rv != 0)
{
LOG(LOG_LEVEL_ERROR, "%s: trans_listen_address failed", __func__);
- sesman_delete_listening_transport();
+ }
+ else if (g_chown(cfg->listen_port, g_getuid(), g_getuid()) != 0)
+ {
+ LOG(LOG_LEVEL_ERROR,
+ "Can't set ownership of '%s' [%s]",
+ cfg->listen_port, g_get_strerror());
+ }
+ else if ((rv = g_chmod_hex(cfg->listen_port, 0x666)) != 0)
+ {
+ LOG(LOG_LEVEL_ERROR, "%s: Can't set permissions on '%s' [%s]",
+ __func__, cfg->listen_port, g_get_strerror());
}
else
{
g_list_trans->trans_conn_in = sesman_listen_conn_in;
}
+ g_umask_hex(entry_umask);
+ }
+
+ if (rv != 0)
+ {
+ sesman_delete_listening_transport();
}
return rv;
@@ -422,6 +461,7 @@ sesman_main_loop(void)
list_delete(g_con_list);
return 1;
}
+ LOG(LOG_LEVEL_INFO, "Sesman now listening on %s", g_cfg->listen_port);
error = 0;
while (!error)
@@ -722,7 +762,6 @@ main(int argc, char **argv)
LOG(LOG_LEVEL_TRACE, "config loaded in %s at %s:%d", __func__, __FILE__, __LINE__);
LOG(LOG_LEVEL_TRACE, " sesman_ini = %s", g_cfg->sesman_ini);
- LOG(LOG_LEVEL_TRACE, " listen_address = %s", g_cfg->listen_address);
LOG(LOG_LEVEL_TRACE, " listen_port = %s", g_cfg->listen_port);
LOG(LOG_LEVEL_TRACE, " enable_user_wm = %d", g_cfg->enable_user_wm);
LOG(LOG_LEVEL_TRACE, " default_wm = %s", g_cfg->default_wm);
@@ -751,6 +790,16 @@ main(int argc, char **argv)
}
}
+ /* Create the runtime directory before we try to listen (or
+ * test-listen), so there's somewhere for the default socket to live */
+ if (create_sesman_runtime_dir() != 0)
+ {
+ config_free(g_cfg);
+ log_end();
+ g_deinit();
+ g_exit(1);
+ }
+
if (daemon)
{
/* start of daemonizing code */
@@ -759,6 +808,7 @@ main(int argc, char **argv)
LOG(LOG_LEVEL_ERROR, "Failed to start xrdp-sesman daemon, "
"possibly address already in use.");
config_free(g_cfg);
+ log_end();
g_deinit();
g_exit(1);
}
@@ -766,14 +816,17 @@ main(int argc, char **argv)
if (0 != g_fork())
{
config_free(g_cfg);
+ log_end();
g_deinit();
g_exit(0);
}
}
- /* signal handling */
+ /* Now we've forked (if necessary), we can get the prgram PID */
g_pid = g_getpid();
+
+ /* signal handling */
g_snprintf(text, 255, "xrdp_sesman_%8.8x_main_term", g_pid);
g_term_event = g_create_wait_obj(text);
g_snprintf(text, 255, "xrdp_sesman_%8.8x_sigchld", g_pid);
diff --git a/sesman/sesman.ini.in b/sesman/sesman.ini.in
index 8c5f173f..15ef50ba 100644
--- a/sesman/sesman.ini.in
+++ b/sesman/sesman.ini.in
@@ -1,8 +1,8 @@
;; See `man 5 sesman.ini` for details
[Globals]
-ListenAddress=127.0.0.1
-ListenPort=3350
+; listening port
+#ListenPort=sesman.socket
EnableUserWindowManager=true
; Give in relative path to user's home directory
UserWindowManager=startwm.sh
diff --git a/sesman/sig.c b/sesman/sig.c
index 14d4c820..65c1d288 100644
--- a/sesman/sig.c
+++ b/sesman/sig.c
@@ -47,16 +47,19 @@ sig_sesman_reload_cfg(void)
}
/* Deal with significant config changes */
- if (g_strcmp(g_cfg->listen_address, cfg->listen_address) != 0 ||
- g_strcmp(g_cfg->listen_port, cfg->listen_port) != 0)
+ if (g_strcmp(g_cfg->listen_port, cfg->listen_port) != 0)
{
- LOG(LOG_LEVEL_INFO, "sesman listen address changed to %s:%s",
- cfg->listen_address, cfg->listen_port);
+ LOG(LOG_LEVEL_INFO, "sesman listen port changed to %s",
+ cfg->listen_port);
/* We have to delete the old port before listening to the new one
* in case they overlap in scope */
sesman_delete_listening_transport();
- sesman_create_listening_transport(cfg);
+ if (sesman_create_listening_transport(cfg) == 0)
+ {
+ LOG(LOG_LEVEL_INFO, "Sesman now listening on %s",
+ g_cfg->listen_port);
+ }
}
/* free old config data */
diff --git a/sesman/tools/sesadmin.c b/sesman/tools/sesadmin.c
index e04e4ef2..4ef56a02 100644
--- a/sesman/tools/sesadmin.c
+++ b/sesman/tools/sesadmin.c
@@ -34,7 +34,6 @@
char user[257];
char pass[257];
char cmnd[257];
-char serv[257];
char port[257];
static int cmndList(struct trans *t);
@@ -55,7 +54,6 @@ int main(int argc, char **argv)
user[0] = '\0';
pass[0] = '\0';
cmnd[0] = '\0';
- serv[0] = '\0';
port[0] = '\0';
logging = log_config_init_for_console(LOG_LEVEL_INFO, NULL);
@@ -72,10 +70,6 @@ int main(int argc, char **argv)
{
g_strncpy(pass, (argv[idx]) + 3, 256);
}
- else if (0 == g_strncmp(argv[idx], "-s=", 3))
- {
- g_strncpy(serv, (argv[idx]) + 3, 256);
- }
else if (0 == g_strncmp(argv[idx], "-i=", 3))
{
g_strncpy(port, (argv[idx]) + 3, 256);
@@ -86,11 +80,6 @@ int main(int argc, char **argv)
}
}
- if (0 == g_strncmp(serv, "", 1))
- {
- g_strncpy(serv, "localhost", 256);
- }
-
if (0 == g_strncmp(port, "", 1))
{
g_strncpy(port, "3350", 256);
@@ -115,7 +104,7 @@ int main(int argc, char **argv)
}
- t = scp_connect(serv, port, NULL);
+ t = scp_connect(port, NULL);
if (t == NULL)
diff --git a/sesman/tools/sesrun.c b/sesman/tools/sesrun.c
index cbdc7a46..1429376a 100644
--- a/sesman/tools/sesrun.c
+++ b/sesman/tools/sesrun.c
@@ -63,10 +63,6 @@
# define DEFAULT_BPP 32
#endif
-#ifndef DEFAULT_SERVER
-# define DEFAULT_SERVER "localhost"
-#endif
-
#ifndef DEFAULT_TYPE
# define DEFAULT_TYPE "Xorg"
#endif
@@ -95,7 +91,6 @@ struct session_params
int height;
int bpp;
enum scp_session_type session_type;
- const char *server;
const char *directory;
const char *shell;
@@ -175,9 +170,6 @@ usage(void)
g_printf(" -g <geometry> Default:%dx%d\n",
DEFAULT_WIDTH, DEFAULT_HEIGHT);
g_printf(" -b <bits-per-pixel> Default:%d\n", DEFAULT_BPP);
- /* Don't encourage use of this one - we need to move to local sockets */
- g_printf(" -s <server> Default:%s (Deprecated)\n",
- DEFAULT_SERVER);
g_printf(" -t <type> Default:%s\n", DEFAULT_TYPE);
g_printf(" -D <directory> Default: $HOME\n"
" -S <shell> Default: Defined window manager\n"
@@ -291,7 +283,6 @@ parse_program_args(int argc, char *argv[], struct session_params *sp,
sp->height = DEFAULT_HEIGHT;
sp->bpp = DEFAULT_BPP;
(void)string_to_session_type(DEFAULT_TYPE, &sp->session_type);
- sp->server = DEFAULT_SERVER;
sp->directory = "";
sp->shell = "";
@@ -315,11 +306,6 @@ parse_program_args(int argc, char *argv[], struct session_params *sp,
sp->bpp = atoi(optarg);
break;
- case 's':
- LOG(LOG_LEVEL_WARNING, "Using deprecated option '-s'");
- sp->server = optarg;
- break;
-
case 't':
if (string_to_session_type(optarg, &sp->session_type) != 0)
{
@@ -419,10 +405,10 @@ send_create_session_request(struct trans *t, const struct session_params *sp)
{
LOG(LOG_LEVEL_DEBUG,
"width:%d height:%d bpp:%d code:%d\n"
- "server:\"%s\" directory:\"%s\"\n"
+ "directory:\"%s\"\n"
"shell:\"%s\" connection_description:\"%s\"",
sp->width, sp->height, sp->bpp, sp->session_type,
- sp->server, sp->directory,
+ sp->directory,
sp->shell, sp->connection_description);
/* Only log the password in development builds */
LOG_DEVEL(LOG_LEVEL_DEBUG, "password:\"%s\"", sp->password);
@@ -498,7 +484,7 @@ main(int argc, char **argv)
LOG(LOG_LEVEL_ERROR, "error reading config file %s : %s",
sesman_ini, g_get_strerror());
}
- else if (!(t = scp_connect(sp.server, cfg->listen_port, NULL)))
+ else if (!(t = scp_connect(cfg->listen_port, NULL)))
{
LOG(LOG_LEVEL_ERROR, "connect error - %s", g_get_strerror());
}