Problem found when testing bug 2251.
A shadowing client will try to set up tunnels for local devices. If it succeeds, it will be killed by unbind_ports when the shadowed user reconnects to their session. The idea is that shadowers should stay connected even though the shadowed user reconnects to their session.
The most common cases where it will succeed in setting up tunnels is when the shadowing client exports more local devices than the original client. This is common with the HTML5 client, which does not export devices, and when using the native client with different configurations.
As we do most of our testing with the same native client configuration, we've probably never seen this happen in our tests, but it should be common in the real world, where people might disable/enable local devices according to their environments.
Here's an example of how you can reproduce this problem:
1. Start a new session with the native client.
Enable local drives and printer redirection, disable everything else.
2. Shadow the session with the native client.
Disable local drives and printer redirection, enable everything else.
3. Reconnect to the session with any client.
The shadower connection will be disconnected along with the original connection. The expected result is that the original connection would be disconnected while the shadower connection would stay connected.
Both server and client have been changed, so tester needs to verify all combinations of old/new server/client.
Tested using ThinLinc client build 5036 and 5063, server 4.5.0 and 4.5.0post 5063.
- Verified that shadowing using new client against old server
worked as expected. No local devices was started at client
side and no local device ssh tunnels was configured.
- Verified shadowing using old client against new server. Client
didn't start the local device services due to that the server
never told which ports to use. Nicely logged to tlclient.log.
Tested normal client connections and random reconnect / shadowing using
native and html client. No unexpected behaviour was detected.
Looked through the diffs and the also looks fine, closing.