summaryrefslogtreecommitdiffstats
path: root/xrdp/xrdp_mm.c
diff options
context:
space:
mode:
Diffstat (limited to 'xrdp/xrdp_mm.c')
-rw-r--r--xrdp/xrdp_mm.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c
index 37b51ca3..f19eaada 100644
--- a/xrdp/xrdp_mm.c
+++ b/xrdp/xrdp_mm.c
@@ -489,6 +489,7 @@ static int APP_CC
xrdp_mm_setup_mod2(struct xrdp_mm *self)
{
char text[256];
+ char raptortext[256];
char *name;
char *value;
int i;
@@ -523,12 +524,12 @@ xrdp_mm_setup_mod2(struct xrdp_mm *self)
char* rsmip = raptor_sm_get_ip_for_username(self->login_username, true);
int allocdisplay = raptor_sm_get_display_for_username(self->login_username);
if ((raptor_sm_sesslimit_reached(self->login_username)) && (allocdisplay < 0)) {
- g_snprintf(text, 255, "[LICENSE] Maximum concurrent session");
- xrdp_wm_log_msg(self->wm, text);
- g_snprintf(text, 255, "[LICENSE] limit exceeded for group.");
- xrdp_wm_log_msg(self->wm, text);
- g_snprintf(text, 255, "[LICENSE] Login for user %s denied.", self->login_username);
- xrdp_wm_log_msg(self->wm, text);
+ g_snprintf(raptortext, 255, "[LICENSE] Maximum concurrent session");
+ xrdp_wm_log_msg(self->wm, raptortext);
+ g_snprintf(raptortext, 255, "[LICENSE] limit exceeded for group.");
+ xrdp_wm_log_msg(self->wm, raptortext);
+ g_snprintf(raptortext, 255, "[LICENSE] Login for user %s denied.", self->login_username);
+ xrdp_wm_log_msg(self->wm, raptortext);
raptor_sm_session_terminated(self->login_username);
return 1;
}
@@ -537,10 +538,14 @@ xrdp_mm_setup_mod2(struct xrdp_mm *self)
self->display = allocdisplay;
}
self->mod->mod_set_param(self->mod, "ip", rsmip);
+#ifdef DISABLE_UNIX_DOMAIN_SOCKETS
+ use_uds = 0;
+#else
use_uds = 1;
if (g_strcmp(rsmip, "127.0.0.1") != 0) {
use_uds = 0;
}
+#endif
}
g_free(rsmip);
@@ -1138,7 +1143,11 @@ xrdp_mm_connect_chansrv(struct xrdp_mm *self, char *ip, char *port)
self->usechansrv = 1;
/* connect channel redir */
+#ifdef DISABLE_UNIX_DOMAIN_SOCKETS
+ if (0)
+#else
if ((g_strcmp(ip, "127.0.0.1") == 0) || (ip[0] == 0))
+#endif
{
/* unix socket */
self->chan_trans = trans_create(TRANS_MODE_UNIX, 8192, 8192);
@@ -1235,7 +1244,11 @@ xrdp_mm_process_login_response(struct xrdp_mm *self, struct stream *s)
self->wm->dragging = 0;
/* connect channel redir */
+#ifdef DISABLE_UNIX_DOMAIN_SOCKETS
+ if (0)
+#else
if ((g_strcmp(ip, "127.0.0.1") == 0) || (ip[0] == 0))
+#endif
{
g_snprintf(port, 255, XRDP_CHANSRV_STR, display);
}