]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: disable Adv ICF support if not supported
authorJeffrey Altman <jaltman@your-file-system.com>
Sun, 26 Feb 2012 19:45:43 +0000 (14:45 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 26 Feb 2012 20:18:55 +0000 (12:18 -0800)
OpenAFS 1.6.x does not require the use of SDK 6.0 or above.
Therefore the Advanced Internet Connection Firewall support
may not be available.  In particular, the 32-bit distribution
for 1.6.x does not rely on SDK 6.0 or higher.

This is a 1.6.x only change.

Change-Id: I8ab5bbf4c5d6e4893d5389c04ec020114a3d5683
Reviewed-on: http://gerrit.openafs.org/6841
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
src/WINNT/afsd/afsicf.cpp

index 1837302a7db33ec272e3ff57bfaec0eeb6518976..ec1361f3787121e2303d9616635fcc1768be001f 100644 (file)
@@ -100,6 +100,7 @@ global_afs_port_t afs_serverPorts[] = {
 #endif
 };
 
+#ifdef NET_FW_PROFILE2_ALL
 HRESULT icf_CheckAndAddPorts2(WCHAR * wServiceName, global_afs_port_t * ports, int nPorts)
 {
     INetFwPolicy2 *pNetFwPolicy2 = NULL;
@@ -266,7 +267,7 @@ HRESULT icf_CheckAndAddPorts2(WCHAR * wServiceName, global_afs_port_t * ports, i
 
     return 0;
 }
-
+#endif /* NET_FW_PROFILE2_ALL */
 
 HRESULT icf_OpenFirewallProfile(INetFwProfile ** fwProfile)
 {
@@ -483,8 +484,11 @@ long icf_CheckAndAddAFSPorts(int portset) {
     // not necessarily catastrophic if the call failed.  We'll try to
     // continue as if it succeeded.
 
+#ifdef NET_FW_PROFILE2_ALL
     hr = icf_CheckAndAddPorts2(wServiceName, ports, nports);
-    if (FAILED(hr)) {
+    if (FAILED(hr))
+#endif
+    {
         DEBUGOUT(("INetFwProfile2 failed, trying INetFwProfile\n"));
         hr = icf_OpenFirewallProfile(&fwProfile);
         if (FAILED(hr)) {