]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Change the naming policy for connection-sharing Unix sockets.
authorSimon Tatham <anakin@pobox.com>
Tue, 9 Sep 2014 12:47:39 +0000 (12:47 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 9 Sep 2014 12:47:39 +0000 (12:47 +0000)
commit24cd95b6f91bf71a36ac0712d56d6b5fdfbf1bd4
treee65929c99cf83ac7f63e6389db596b5c3dcda181
parent70ab076d839072357dab75590287d44961302de8
Change the naming policy for connection-sharing Unix sockets.

I had initially assumed that, since all of a user's per-connection
subdirectories live inside a top-level putty-connshare.$USER directory
that's not accessible to anyone else, there would be no need to
obfuscate the names of the internal directories for privacy, because
nobody would be able to look at them anyway.

Unfortunately, that's not true: 'netstat -ax' run by any user will
show up the full pathnames of Unix-domain sockets, including pathname
components that you wouldn't have had the access to go and look at
directly. So the Unix connection sharing socket names do need to be
obfuscated after all.

Since Unix doesn't have Windows's CryptProtectMemory, we have to do
this manually, by creating a file of random salt data inside the
top-level putty-connshare directory (if there isn't one there already)
and then hashing that salt with the "user@host" connection identifier
to get the socket directory name. What a pain.

[originally from svn r10222]
ssh.c
unix/uxshare.c