From 91f98123ae7eb1a12b17a0b07d7a2f11066cfbff 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. Reviewed-on: http://gerrit.openafs.org/5313 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9052974812e33d186613c31e318673f9268467c6) Change-Id: I60bc66440b548c3901914df8193c3999c3388abc Reviewed-on: http://gerrit.openafs.org/6801 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 9ab155166..0ced1bbd5 100644 --- a/src/WINNT/afsd/afslogon.c +++ b/src/WINNT/afsd/afslogon.c @@ -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 */ -- 2.39.5