Windows: disable short names on Win7 and 2008 R2
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 15 Aug 2012 04:53:21 +0000 (00:53 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 15 Aug 2012 17:04:04 +0000 (10:04 -0700)
After listening to a presentation from Microsoft's file system
team and speaking with anti-virus vendors, it is not only safe
to disable ShortNames on non-boot volumes in Win7 and 2008 R2
but it is a definite win for performance, stability and security
of the system.

Change-Id: I706a8a17b0ae76189aeebaf254c8c70739d12f09
Reviewed-on: http://gerrit.openafs.org/7989
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsd/afsd_init.c

index 714ac2a..4d523b6 100644 (file)
@@ -1376,10 +1376,10 @@ afsd_InitCM(char **reasonP)
     if (code == ERROR_SUCCESS) {
         cm_shortNames = (unsigned short) dwValue;
     } else {
-        /* disable by default on Win8 and Server 2008 R2 */
+        /* disable by default on Win7, Win 8, Server 2008 R2 and Server 2012 */
         if (osVersion.dwMajorVersion > 6 ||
             osVersion.dwMajorVersion == 6 &&
-            osVersion.dwMinorVersion >= 2)
+            osVersion.dwMinorVersion >= 1)
             cm_shortNames = 0;
         else
             cm_shortNames = 1;