windows-error-mapping-20081115
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 15 Nov 2008 17:05:19 +0000 (17:05 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 15 Nov 2008 17:05:19 +0000 (17:05 +0000)
LICENSE MIT

do not map success (0) to an error

src/WINNT/afsd/smb.c

index 7fbb59e..ece4ff4 100644 (file)
@@ -2989,7 +2989,10 @@ void smb_MapNTError(long code, unsigned long *NTStatusp)
 
     /* map CM_ERROR_* errors to NT 32-bit status codes */
     /* NT Status codes are listed in ntstatus.h not winerror.h */
-    if (code == CM_ERROR_NOSUCHCELL) {
+    if (code == 0) {
+        NTStatus = 0;
+    } 
+    else if (code == CM_ERROR_NOSUCHCELL) {
         NTStatus = 0xC000000FL;        /* No such file */
     }
     else if (code == CM_ERROR_NOSUCHVOLUME) {