-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
sesman.ini contains the following section for the session allocation policy:-
;; Policy - session allocation policy
; Type: enum [ "Default" | "UBD" | "UBI" | "UBC" | "UBDI" | "UBDC" ]
; "Default" session per <User,BitPerPixel>
; "UBD" session per <User,BitPerPixel,DisplaySize>
; "UBI" session per <User,BitPerPixel,IPAddr>
; "UBC" session per <User,BitPerPixel,Connection>
; "UBDI" session per <User,BitPerPixel,DisplaySize,IPAddr>
; "UBDC" session per <User,BitPerPixel,DisplaySize,Connection>
Policy=Default
The above is the latest, but little has changed since xrdp v0.9.1 when this section was introduced as part of commit 1934c9e
The problem I've got is the 'connection' setting. A 'connection' in this context is a string created by common/os_calls.c:g_write_ip_address(). The string is of the form:-
<ip_addr>:<port> - socket: <sck>
where <ip_addr>
and <port>
are from the peer connected to xrdp, and sck
is the socket number allocated to the connection by xrdp.
If 'C' is in the session allocation policy, the connection string for an existing session has to match the connection string for a reconnection for a reconnect to succeed (code is here). I can't see how this can succeed reliably. Both <port>
and <sck>
are very likely to be different on a reconnect.
So as far as I can tell, the 'Connection' argument to the Policy
setting is effectively useless. Consequently, I'd like to remove this option for the next major release as it seems to have no use cases, and so no-one can be using it. It can usefully be replaced with the client name - see #2099
Am I misunderstanding something here?
@fpaquet - am I correct in thinking you had something to do with 1934c9e? If so, I'd appreciate you telling me what I'm misunderstanding, or what your actual intentions were for this setting.
Thanks for any enlightenment.