Introduce instance_name field into xrdp.ini and xrdp-sesrun, along with

the N policy in sesman.ini, allowing xrdp sessions to be tagged with an
instance name to enable persistent association with a specific
xrdp instance, to allow experiences where users reconnect to specific
sessions based on e.g. the xrdp listening port used.
This commit is contained in:
Leonard Nielsen
2026-01-20 12:00:40 +01:00
parent 259dc937bf
commit 0edde4c090
28 changed files with 162 additions and 51 deletions
+5 -1
View File
@@ -43,6 +43,7 @@ process_session_announce_event(struct session_item *si)
{
int rv;
const char *start_ip_addr;
const char *instance_name;
unsigned int display;
rv = ercp_get_session_announce_event(si->sesexec_trans,
@@ -54,7 +55,8 @@ process_session_announce_event(struct session_item *si)
&si->bpp,
&si->guid,
&start_ip_addr,
&si->start_time);
&si->start_time,
&instance_name);
if (rv == 0)
{
// We may already know the display we sent sesexec. If we do,
@@ -71,6 +73,8 @@ process_session_announce_event(struct session_item *si)
{
snprintf(si->start_ip_addr, sizeof(si->start_ip_addr),
"%s", start_ip_addr);
snprintf(si->xrdp_instance_name, sizeof(si->xrdp_instance_name),
"%s", instance_name);
si->display = display;
si->state = E_SESSION_RUNNING;