Windows: NPCancelConnection without drive letter
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 20 Mar 2013 20:23:59 +0000 (16:23 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 22 Mar 2013 14:33:08 +0000 (07:33 -0700)
When canceling a network connection to a UNC path, do not match
connections that have drive letters assigned.  Only cancel the connection
if there it matches the UNC path and has no local name.

Change-Id: I2c27c6d08cec65406f7e7f9eb61cd6d6c7be1f5c
Reviewed-on: http://gerrit.openafs.org/9640
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsrdr/kernel/lib/AFSNetworkProviderSupport.cpp

index 3cb840b..c6cd352 100644 (file)
@@ -458,7 +458,9 @@ AFSCancelConnection( IN AFSNetworkProviderConnectionCB *ConnectCB,
             if( ( ConnectCB->LocalName != L'\0' &&
                   pConnection->LocalName == ConnectCB->LocalName)
                 ||
-                ( RtlCompareUnicodeString( &uniRemoteName,
+                ( ConnectCB->LocalName == L'\0' &&
+                  pConnection->LocalName == L'\0' &&
+                  RtlCompareUnicodeString( &uniRemoteName,
                                            &pConnection->RemoteName,
                                            TRUE) == 0))
             {