Windows: afslogon.dll is not a file system interface
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 26 Aug 2011 17:57:15 +0000 (13:57 -0400)
committerDerrick Brashear <shadow@dementix.org>
Sun, 26 Feb 2012 06:30:14 +0000 (22:30 -0800)
Do not return a file system network type that corresponds
to a real file system inter since afslogon is in fact not
associated with a file system interface.  We can't return
WNNC_NET_NONE (0) because that prevents NPLogonNotify()
from being executed.  However, if we return an in use
file system value that can confuse the system when the
actual file system's network provider is also installed.

Reviewed-on: http://gerrit.openafs.org/5313
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 9052974812e33d186613c31e318673f9268467c6)

Change-Id: I60bc66440b548c3901914df8193c3999c3388abc
Reviewed-on: http://gerrit.openafs.org/6801
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

src/WINNT/afsd/afslogon.c

index 9ab1551..0ced1bb 100644 (file)
@@ -221,8 +221,17 @@ DWORD APIENTRY NPGetCaps(DWORD index)
 {
     switch (index) {
     case WNNC_NET_TYPE:
-        /* Don't have our own type; use somebody else's. */
-        return WNNC_NET_OPENAFS;
+        /*
+         * The purpose of this response is to let the system
+         * know which file system the network provider is associated with
+         * Microsoft issues these values starting from 1 with the exception
+         * of WNNC_CRED_MANAGER which is 0xFFFF.  The provider type is
+         * stored in the hiword.  Pick a value that is unused.
+         */
+        return 0x1FFF0000;
+
+    case WNNC_SPEC_VERSION:
+        return WNNC_SPEC_VERSION51;
 
     case WNNC_START:
         /* Say we are already started, even though we might wait after we receive NPLogonNotify */