Skip to content

Commit 6ba1503

Browse files
committed
Disable vmconnect mode for non-vsock connections
1 parent 09e1173 commit 6ba1503

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

libxrdp/xrdp_iso.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,17 @@ xrdp_iso_create(struct xrdp_mcs *owner, struct trans *trans)
7272
self = (struct xrdp_iso *) g_malloc(sizeof(struct xrdp_iso), 1);
7373
self->mcs_layer = owner;
7474
self->trans = trans;
75+
76+
// See if we're running in vmconnect mode on this connection
77+
struct xrdp_client_info *client_info = &(self->mcs_layer->sec_layer->rdp_layer->client_info);
78+
if (client_info->vmconnect && trans->mode != TRANS_MODE_VSOCK)
79+
{
80+
char desc[MAX_PEER_DESCSTRLEN];
81+
g_sck_get_peer_description(trans->sck, desc, sizeof(desc));
82+
LOG(LOG_LEVEL_INFO, "Disabling vmconnect mode for connection from %s",
83+
desc);
84+
client_info->vmconnect = 0;
85+
}
7586
return self;
7687
}
7788

0 commit comments

Comments
 (0)