windows-backconnectionhostnames-fix-20060809
authorJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 10 Aug 2006 00:27:50 +0000 (00:27 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 10 Aug 2006 00:27:50 +0000 (00:27 +0000)
commitcca848edb12abea4deb8f676b07182575d61186d
tree938d921636688e0e89adba00c79a87fb39a906ca
parent09020663fad32a30cec3f425d6dee7807799eadb
windows-backconnectionhostnames-fix-20060809

The previous code failed to specify the correct size of the REG_MULTI_SZ
being written to the registry when appending an additional name to the
list of Back Connection Host names.  This would cause the written string
to contain

   FOO\0B

instead of

   FOO\0\BAR\0\0

this caused problems for Windows 2000 lsass.exe which failed to properly
allocate the buffer for RegQueryValueEx and failed to check that it did
not read beyond the buffer.   If the list was not terminated with two
nuls an exception would be thrown that could result in a lock being
orphaned on the NTLMNameTable.  This would in turn prevent authentications
to UNC resources from completing.  As a result, the startup of
afsd_service.exe would fail if a GlobalAutoMapper drive was configured.

The work around is to set the correct value in the registry before
switching machine names or installing/removing the Microsoft Loopback
Adapter.
src/WINNT/afsd/afsd_init.c