Windows: AFSGetConnectionInfo partial match validation
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 13 May 2015 03:15:50 +0000 (23:15 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Thu, 24 Sep 2015 04:18:51 +0000 (00:18 -0400)
commitaf7f7da0aad29ff9bf5adad288b512d31954b36e
tree6bc448b66f7a331e6212a5ebb6fce0dbcd755b00
parent99894f0a7070caca7c8e96af3d82cf2bfdfe2bb9
Windows: AFSGetConnectionInfo partial match validation

AFSGetConnectionInfo() is called to respond to NPGetResourceInformation
and NPGetConnectionPerformance WNet API requests.  The former permits
the requestor to provide a path containing components that are not
processed by the file system represented by the called network provider.
As such partial matches are permitted BUT they must consist of full
components.  In other words, \\afs\sh is not a valid partial match for
\\afs\share but \\afs\share is a valid partial match for \\afs\share\dir.

This change adds validation checks to enforce full component comparisons.
It also cleans up some of the associated comparisons and trace output.

Change-Id: Ia736030f554f9770b201227c4dce26d7d45fe0d2
Reviewed-on: http://gerrit.openafs.org/11887
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsrdr/kernel/lib/AFSNetworkProviderSupport.cpp