]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
windows-vista-20060421
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 22 Apr 2006 04:45:47 +0000 (04:45 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 22 Apr 2006 04:45:47 +0000 (04:45 +0000)
Vista has a bug in the Netbios ADAPTER_STATUS output in which the
first four bytes of the MAC address with 127.0.0.1.  We must check
for that when searching for the Loopback Adapter.

src/WINNT/afsd/lanahelper.cpp
src/WINNT/afsd/smb3.c

index 148a0c49ccfe524c6c7e9b9fc8a62e2bd5544a22..c4495e9c883508c7cb4b3520ec7de45ceebe2b13 100644 (file)
@@ -435,6 +435,7 @@ extern "C" BOOL lana_IsLoopback(lana_number_t lana)
         NAME_BUFFER names[MAX_LANA+1];
     } astat;
     unsigned char kWLA_MAC[6] = { 0x02, 0x00, 0x4c, 0x4f, 0x4f, 0x50 };
+    unsigned char kVista_WLA_MAC[6] = { 0x7F, 0x00, 0x00, 0x01, 0x4f, 0x50 };
     int status;
     HKEY hkConfig;
     LONG rv;
@@ -483,7 +484,8 @@ extern "C" BOOL lana_IsLoopback(lana_number_t lana)
 #endif
         return FALSE;
     }
-    return (memcmp(astat.status.adapter_address, kWLA_MAC, 6) == 0);
+    return (memcmp(astat.status.adapter_address, kWLA_MAC, 6) == 0 ||
+           memcmp(astat.status.adapter_address, kVista_WLA_MAC, 6) == 0);
 }
 
 // Get the netbios named used/to-be-used by the AFS SMB server.
index 090ff853f7ed01bd414b6f375f85ed4665e57335..f7dad97b3655bf1fc7d9ecdfcd1ff260c75b2a3a 100644 (file)
@@ -1481,10 +1481,10 @@ long smb_ReceiveRAPNetShareEnum(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_
     int outDataTotal;  /* total data bytes */
     int code = 0;
     DWORD rv;
-    DWORD allSubmount;
-    USHORT nShares;
-    DWORD nRegShares;
-    DWORD nSharesRet;
+    DWORD allSubmount = 0;
+    USHORT nShares = 0;
+    DWORD nRegShares = 0;
+    DWORD nSharesRet = 0;
     HKEY hkParam;
     HKEY hkSubmount = NULL;
     smb_rap_share_info_1_t * shares;