From 9052974812e33d186613c31e318673f9268467c6 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Fri, 26 Aug 2011 13:57:15 -0400 Subject: [PATCH] Windows: afslogon.dll is not a file system interface 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. Change-Id: I845bc633f17f21946ce7de796d66c0bb429005cd Reviewed-on: http://gerrit.openafs.org/5313 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- src/WINNT/afsd/afslogon.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/WINNT/afsd/afslogon.c b/src/WINNT/afsd/afslogon.c index c34db835c7..34b21b3a23 100644 --- a/src/WINNT/afsd/afslogon.c +++ b/src/WINNT/afsd/afslogon.c @@ -224,8 +224,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 */